aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2008-02-05 14:51:06 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2008-02-05 06:51:06 -0800
commit7074bc2ebf6a223a6e514d951dfd5bcef1732a6d (patch)
treec629302ee9868221ee4a6426e3f02b3693a9745b /gcc
parent52f5643130fe569c48beef68233e75d9db9b9eb7 (diff)
downloadgcc-7074bc2ebf6a223a6e514d951dfd5bcef1732a6d.zip
gcc-7074bc2ebf6a223a6e514d951dfd5bcef1732a6d.tar.gz
gcc-7074bc2ebf6a223a6e514d951dfd5bcef1732a6d.tar.bz2
re PR target/35084 (Strang error messages)
2008-02-05 H.J. Lu <hongjiu.lu@intel.com> PR target/35084 * config/i386/i386.c (ix86_function_sseregparm): Add an arg to indicate if a message should be generated. (init_cumulative_args): Updated. (function_value_32): Likewise. From-SVN: r132122
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/i386.c21
2 files changed, 20 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 66da281..0b61233 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2008-02-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/35084
+ * config/i386/i386.c (ix86_function_sseregparm): Add an arg
+ to indicate if a message should be generated.
+ (init_cumulative_args): Updated.
+ (function_value_32): Likewise.
+
2008-02-05 Joseph Myers <joseph@codesourcery.com>
* doc/include/texinfo.tex: Update to version 2008-02-04.16.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 4e5cb22..1311f8b 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3254,7 +3254,7 @@ ix86_function_regparm (const_tree type, const_tree decl)
indirectly or considering a libcall. Otherwise return 0. */
static int
-ix86_function_sseregparm (const_tree type, const_tree decl)
+ix86_function_sseregparm (const_tree type, const_tree decl, bool warn)
{
gcc_assert (!TARGET_64BIT);
@@ -3265,12 +3265,15 @@ ix86_function_sseregparm (const_tree type, const_tree decl)
{
if (!TARGET_SSE)
{
- if (decl)
- error ("Calling %qD with attribute sseregparm without "
- "SSE/SSE2 enabled", decl);
- else
- error ("Calling %qT with attribute sseregparm without "
- "SSE/SSE2 enabled", type);
+ if (warn)
+ {
+ if (decl)
+ error ("Calling %qD with attribute sseregparm without "
+ "SSE/SSE2 enabled", decl);
+ else
+ error ("Calling %qT with attribute sseregparm without "
+ "SSE/SSE2 enabled", type);
+ }
return 0;
}
@@ -3485,7 +3488,7 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */
/* Set up the number of SSE registers used for passing SFmode
and DFmode arguments. Warn for mismatching ABI. */
- cum->float_in_sse = ix86_function_sseregparm (fntype, fndecl);
+ cum->float_in_sse = ix86_function_sseregparm (fntype, fndecl, true);
}
}
@@ -4610,7 +4613,7 @@ function_value_32 (enum machine_mode orig_mode, enum machine_mode mode,
SSE math is enabled or for functions with sseregparm attribute. */
if ((fn || fntype) && (mode == SFmode || mode == DFmode))
{
- int sse_level = ix86_function_sseregparm (fntype, fn);
+ int sse_level = ix86_function_sseregparm (fntype, fn, false);
if ((sse_level >= 1 && mode == SFmode)
|| (sse_level == 2 && mode == DFmode))
regno = FIRST_SSE_REG;