i386.opt: Add msse2avx.
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 30 Sep 2008 00:32:29 +0000 (00:32 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 30 Sep 2008 00:32:29 +0000 (17:32 -0700)
2008-09-29  H.J. Lu  <hongjiu.lu@intel.com>

* 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
gcc/config/i386/i386.opt
gcc/config/i386/linux.h
gcc/config/i386/linux64.h
gcc/doc/invoke.texi

index d8b9d1709ec8619988acbaa3b6de9d68f31f8400..5a9b48249dc5c66543e5947c3c8e8df78ddac13a 100644 (file)
@@ -1,3 +1,12 @@
+2008-09-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * 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  <ebotcazou@adacore.com>
 
        * dwarf2out.c (constant_size): Use HOST_WIDE_INT in parameter type.
index f362ddeda261d12ad1031998f39d9977ae5ad5c4..406727139c8a995c0f5907f78a7329e084c93961 100644 (file)
@@ -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
index 78326b05ec0c4e63b4b2c35e0ae4a4cc8057e019..ca9a136b3e5b44563950c2a095cf024d14704c0c 100644 (file)
@@ -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 },\
index 04d12cadada6ad31d053f879d0277aa4c088d526..88c875a098065bfb8080e55134292df8bba19e8c 100644 (file)
@@ -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"
index a289830a465dc0b7e28229e1098e2af44f229e8a..62ae31fda461a3c024fa7281b57e0a6b2ea3db8e 100644 (file)
@@ -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