From nobody Thu Feb 23 22:14:13 2023 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PN6l10QbVz3sqv3 for ; Thu, 23 Feb 2023 22:14:37 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:300:2185:123::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4PN6l05Ffsz3jrt for ; Thu, 23 Feb 2023 22:14:36 +0000 (UTC) (envelope-from jamie@catflap.org) Authentication-Results: mx1.freebsd.org; none X-Catflap-Envelope-From: Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [104.207.135.49]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id 31NMEFbQ026599; Thu, 23 Feb 2023 22:14:15 GMT (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id 31NMEDVL026598; Thu, 23 Feb 2023 22:14:13 GMT (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <202302232214.31NMEDVL026598@donotpassgo.dyslexicfish.net> Date: Thu, 23 Feb 2023 22:14:13 +0000 Organization: Dyslexic Fish To: pmc@citylink.dinoex.sub.org, jamie@catflap.org Cc: freebsd-stable@freebsd.org Subject: Re: 13.2-BETA2: xz: illegal instruction References: <202302231422.31NEM1dn001786@donotpassgo.dyslexicfish.net> In-Reply-To: User-Agent: Heirloom mailx 12.4 7/29/08 List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [104.207.135.49]); Thu, 23 Feb 2023 22:14:15 +0000 (GMT) X-Rspamd-Queue-Id: 4PN6l05Ffsz3jrt X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0::/38, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Peter wrote: > -target-cpu westmere > > But when building with CPTYPE?=native, the code works! That's weird! I notice the only difference between those 2 is that the "native" one specifically sets (-target-feature +...) or unsets (-target-feature -...) the features to use. Presumably there is something enabled by default that shouldn't be (for westmere), but the extra flags added with "native" fix that. This is more a question for the clang folks, but if you're really interested, you could try (on your -march=westmere build) disabling them in ever decreasing group sizes until you narrow down the culprit! This is what your native enables: +64bit +cmov +crc32 +cx16 +cx8 +fxsr +mmx +popcnt +sahf +sse +sse2 +sse3 +sse4.1 +sse4.2 +ssse3 And this is what it disables: -adx -aes -amx-bf16 -amx-int8 -amx-tile -avx -avx2 -avx512bf16 -avx512bitalg -avx512bw -avx512cd -avx512dq -avx512er -avx512f -avx512fp16 -avx512ifma -avx512pf -avx512vbmi -avx512vbmi2 -avx512vl -avx512vnni -avx512vp2intersect -avx512vpopcntdq -avxvnni -bmi -bmi2 -cldemote -clflushopt -clwb -clzero -enqcmd -f16c -fma -fma4 -fsgsbase -gfni -hreset -invpcid -kl -lwp -lzcnt -movbe -movdir64b -movdiri -mwaitx -pclmul -pconfig -pku -prefetchwt1 -prfchw -ptwrite -rdpid -rdrnd -rdseed -rtm -serialize -sgx -sha -shstk -sse4a -tbm -tsxldtrk -uintr -vaes -vpclmulqdq -waitpkg -wbnoinvd -widekl -xop -xsave -xsavec -xsaveopt -xsaves Cheers, Jamie