OSDN Git Service

2005-07-11 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jul 2005 09:35:16 +0000 (09:35 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jul 2005 09:35:16 +0000 (09:35 +0000)
* config/i386/i386.opt: New target option -msseregparm.
* config/i386/i386.c (override_options): Error out for
-msseregparm but no SSE support.
(ix86_function_sseregparm): Check for global sseregparm.
* doc/invoke.texi: Document -msseregparm.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101871 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.opt
gcc/doc/invoke.texi

index 61a5bfe..6178124 100644 (file)
@@ -1,3 +1,11 @@
+2005-07-11  Richard Guenther  <rguenther@suse.de>
+
+       * config/i386/i386.opt: New target option -msseregparm.
+       * config/i386/i386.c (override_options): Error out for
+       -msseregparm but no SSE support.
+       (ix86_function_sseregparm): Check for global sseregparm.
+       * doc/invoke.texi: Document -msseregparm.
+
 2005-07-11  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
 
        * config.gcc (m32r-*-linux*): Use the default extra_parts.
index 673acd5..da2b8e6 100644 (file)
@@ -1573,6 +1573,11 @@ override_options (void)
         target_flags |= MASK_NO_RED_ZONE;
     }
 
+  /* Accept -msseregparm only if at least SSE support is enabled.  */
+  if (TARGET_SSEREGPARM
+      && ! TARGET_SSE)
+    error ("-msseregparm used without SSE enabled");
+
   ix86_fpmath = TARGET_FPMATH_DEFAULT;
 
   if (ix86_fpmath_string != 0)
@@ -1947,8 +1952,9 @@ ix86_function_sseregparm (tree type, tree decl)
 {
   /* Use SSE registers to pass SFmode and DFmode arguments if requested
      by the sseregparm attribute.  */
-  if (type
-      && lookup_attribute ("sseregparm", TYPE_ATTRIBUTES (type)))
+  if (TARGET_SSEREGPARM
+      || (type
+         && lookup_attribute ("sseregparm", TYPE_ATTRIBUTES (type))))
     {
       if (!TARGET_SSE)
        {
index aec7cf1..effd1e1 100644 (file)
@@ -193,6 +193,10 @@ msse3
 Target Report Mask(SSE3)
 Support MMX, SSE, SSE2 and SSE3 built-in functions and code generation
 
+msseregparm
+Target RejectNegative Mask(SSEREGPARM)
+Use SSE register passing conventions for SF and DF mode
+
 msvr3-shlib
 Target Report Mask(SVR3_SHLIB)
 Uninitialized locals in .bss
index 8acfd0f..fb9c64d 100644 (file)
@@ -514,8 +514,8 @@ Objective-C and Objective-C++ Dialects}.
 -mmmx  -msse  -msse2 -msse3 -m3dnow @gol
 -mthreads  -mno-align-stringops  -minline-all-stringops @gol
 -mpush-args  -maccumulate-outgoing-args  -m128bit-long-double @gol
--m96bit-long-double  -mregparm=@var{num}  -momit-leaf-frame-pointer @gol
--mno-red-zone -mno-tls-direct-seg-refs @gol
+-m96bit-long-double  -mregparm=@var{num}  -msseregparm @gol
+-momit-leaf-frame-pointer  -mno-red-zone -mno-tls-direct-seg-refs @gol
 -mcmodel=@var{code-model} @gol
 -m32  -m64}
 
@@ -9030,6 +9030,17 @@ function by using the function attribute @samp{regparm}.
 value, including any libraries.  This includes the system libraries and
 startup modules.
 
+@item -msseregparm
+@opindex msseregparm
+Use SSE register passing conventions for float and double arguments
+and return values.  You can control this behavior for a specific
+function by using the function attribute @samp{sseregparm}.
+@xref{Function Attributes}.
+
+@strong{Warning:} if you use this switch then you must build all
+modules with the same value, including any libraries.  This includes
+the system libraries and startup modules.
+
 @item -mpreferred-stack-boundary=@var{num}
 @opindex mpreferred-stack-boundary
 Attempt to keep the stack boundary aligned to a 2 raised to @var{num}