[PATCH v4 07/12] x86: Use -mavx instead of -msse2avx
H.J. Lu
hjl.tools@gmail.com
Wed Nov 12 22:24:12 GMT 2025
On Thu, Nov 13, 2025 at 2:44 AM Adhemerval Zanella Netto
<adhemerval.zanella@linaro.org> wrote:
>
>
>
> On 10/11/25 22:49, H.J. Lu wrote:
> > On Mon, Nov 10, 2025 at 9:32 PM Adhemerval Zanella
> > <adhemerval.zanella@linaro.org> wrote:
> >>
> >> clang supports it from version 19 and onwards, but it should be gated
> >> as an option to assembler (either with -Wa or -Xassembler). Use
> >> -mavx which is supported on both compilers.
> >
> > This isn't clang specific. "-msse2avx -DSSE2AVX" was used because
> > there were asm statements with SSE-only instructions which was fixed by
> >
> > commit ff8be6152bcd1048283663aef2da6a458f27832a
> > Author: Uros Bizjak <ubizjak@gmail.com>
> > Date: Sun Sep 21 20:33:09 2025 +0200
> >
> > x86: Use "%v" to emit VEX encoded instructions for AVX targets
> >
> > Now we can simply use -mavx.
>
> I changed to:
>
> --
> x86: Use -mavx instead of -msse2avx
>
> clang supports -msse2avx from version 19 and onwards, but it should
> be gated as an option to assembler (either with -Wa or -Xassembler).
>
> The -DSSE2AVX option was used because there were asm statements wit
with
LGTM with the typo fix.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Thanks.
> SSE-only instructions which was fixed by commit ff8be6152bc.
>
> Now we can simply use -mavx.
> --
>
> Ok with this commit message change?
>
> >
> >> ---
> >> sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
> >> 1 file changed, 7 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
> >> index 708b14297fa..145ad08207b 100644
> >> --- a/sysdeps/x86_64/fpu/multiarch/Makefile
> >> +++ b/sysdeps/x86_64/fpu/multiarch/Makefile
> >> @@ -150,13 +150,13 @@ CFLAGS-s_sin-fma4.c = -mfma4
> >> CFLAGS-s_tan-fma4.c = -mfma4
> >> CFLAGS-s_sincos-fma4.c = -mfma4
> >>
> >> -CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
> >> -CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
> >> -CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
> >> -CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
> >> -CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
> >> -CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
> >> -CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
> >> +CFLAGS-e_atan2-avx.c = -mavx
> >> +CFLAGS-e_exp-avx.c = -mavx
> >> +CFLAGS-e_log-avx.c = -mavx
> >> +CFLAGS-s_atan-avx.c = -mavx
> >> +CFLAGS-s_sin-avx.c = -mavx
> >> +CFLAGS-s_tan-avx.c = -mavx
> >> +CFLAGS-s_sincos-avx.c = -mavx
> >>
> >> CFLAGS-s_modf-sse4_1.c = -msse4.1 -fno-builtin-modff32x -fno-builtin-modff64
> >> CFLAGS-s_modff-sse4_1.c = -msse4.1 -fno-builtin-modff32
> >> --
> >> 2.43.0
> >>
> >
> >
>
--
H.J.
More information about the Libc-alpha
mailing list