aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2005-07-11 09:35:16 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2005-07-11 09:35:16 +0000
commit1f97667f30ad19585986527b282e4ae0d1b3a1a3 (patch)
treeb06db0f8c7a561943bf6b26a8da3e03236e15025
parent4dda0c663b09f9f80065635fd804d27f67a1114d (diff)
downloadgcc-1f97667f30ad19585986527b282e4ae0d1b3a1a3.zip
gcc-1f97667f30ad19585986527b282e4ae0d1b3a1a3.tar.gz
gcc-1f97667f30ad19585986527b282e4ae0d1b3a1a3.tar.bz2
i386.opt: New target option -msseregparm.
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. From-SVN: r101871
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/i386.c10
-rw-r--r--gcc/config/i386/i386.opt4
-rw-r--r--gcc/doc/invoke.texi15
4 files changed, 33 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 61a5bfe..6178124 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 673acd5..da2b8e6 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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)
{
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index aec7cf1..effd1e1 100644
--- a/gcc/config/i386/i386.opt
+++ b/gcc/config/i386/i386.opt
@@ -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
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 8acfd0f..fb9c64d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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}