From bd459cb6ab900df00b20dc018126bc5bc2574b43 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 30 Sep 2008 00:32:29 +0000 Subject: [PATCH] i386.opt: Add msse2avx. 2008-09-29 H.J. Lu * config/i386/i386.opt: Add msse2avx. * config/i386/linux.h (ASM_SPEC): New. Support -msse2avx. * config/i386/linux64.h (ASM_SPEC): Likewise. * doc/invoke.texi: Document -msse2avx. From-SVN: r140774 --- gcc/ChangeLog | 9 +++++++++ gcc/config/i386/i386.opt | 4 ++++ gcc/config/i386/linux.h | 5 +++++ gcc/config/i386/linux64.h | 5 +++++ gcc/doc/invoke.texi | 8 +++++++- 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d8b9d1709ec..5a9b48249dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2008-09-29 H.J. Lu + + * config/i386/i386.opt: Add msse2avx. + + * config/i386/linux.h (ASM_SPEC): New. Support -msse2avx. + * config/i386/linux64.h (ASM_SPEC): Likewise. + + * doc/invoke.texi: Document -msse2avx. + 2008-09-29 Eric Botcazou * dwarf2out.c (constant_size): Use HOST_WIDE_INT in parameter type. diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt index f362ddeda26..406727139c8 100644 --- a/gcc/config/i386/i386.opt +++ b/gcc/config/i386/i386.opt @@ -338,3 +338,7 @@ Support AES built-in functions and code generation mpclmul Target Report Mask(ISA_PCLMUL) Var(ix86_isa_flags) VarExists Save Support PCLMUL built-in functions and code generation + +msse2avx +Target Report Var(ix86_sse2avx) +Encode SSE instructions with VEX prefix diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h index 78326b05ec0..ca9a136b3e5 100644 --- a/gcc/config/i386/linux.h +++ b/gcc/config/i386/linux.h @@ -102,6 +102,11 @@ along with GCC; see the file COPYING3. If not see #define LINK_EMULATION "elf_i386" #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#undef ASM_SPEC +#define ASM_SPEC \ + "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ + %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" + #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ { "link_emulation", LINK_EMULATION },\ diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h index 04d12cadada..88c875a0980 100644 --- a/gcc/config/i386/linux64.h +++ b/gcc/config/i386/linux64.h @@ -56,6 +56,11 @@ along with GCC; see the file COPYING3. If not see #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" +#undef ASM_SPEC +#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \ + %{Wa,*:%*} %{m32:--32} %{m64:--64} \ + %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" + #if TARGET_64BIT_DEFAULT #define SPEC_32 "m32" #define SPEC_64 "!m32" diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a289830a465..62ae31fda46 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -581,7 +581,7 @@ Objective-C and Objective-C++ Dialects}. -momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol -mcmodel=@var{code-model} @gol -m32 -m64 -mlarge-data-threshold=@var{num} @gol --mfused-madd -mno-fused-madd} +-mfused-madd -mno-fused-madd -msse2avx} @emph{IA-64 Options} @gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol @@ -11213,6 +11213,12 @@ Enable automatic generation of fused floating point multiply-add instructions if the ISA supports such instructions. The -mfused-madd option is on by default. The fused multiply-add instructions have a different rounding behavior compared to executing a multiply followed by an add. + +@item -msse2avx +@itemx -mno-sse2avx +@opindex msse2avx +Specify that the assembler should encode SSE instructions with VEX +prefix. The option @option{-mavx} turns this on by default. @end table These @samp{-m} switches are supported in addition to the above