Commit 7074bc2e by H.J. Lu Committed by H.J. Lu

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
parent 52f56431
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> 2008-02-05 Joseph Myers <joseph@codesourcery.com>
* doc/include/texinfo.tex: Update to version 2008-02-04.16. * doc/include/texinfo.tex: Update to version 2008-02-04.16.
......
...@@ -3254,7 +3254,7 @@ ix86_function_regparm (const_tree type, const_tree decl) ...@@ -3254,7 +3254,7 @@ ix86_function_regparm (const_tree type, const_tree decl)
indirectly or considering a libcall. Otherwise return 0. */ indirectly or considering a libcall. Otherwise return 0. */
static int 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); gcc_assert (!TARGET_64BIT);
...@@ -3265,12 +3265,15 @@ ix86_function_sseregparm (const_tree type, const_tree decl) ...@@ -3265,12 +3265,15 @@ ix86_function_sseregparm (const_tree type, const_tree decl)
{ {
if (!TARGET_SSE) if (!TARGET_SSE)
{ {
if (decl) if (warn)
error ("Calling %qD with attribute sseregparm without " {
"SSE/SSE2 enabled", decl); if (decl)
else error ("Calling %qD with attribute sseregparm without "
error ("Calling %qT with attribute sseregparm without " "SSE/SSE2 enabled", decl);
"SSE/SSE2 enabled", type); else
error ("Calling %qT with attribute sseregparm without "
"SSE/SSE2 enabled", type);
}
return 0; return 0;
} }
...@@ -3485,7 +3488,7 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */ ...@@ -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 /* Set up the number of SSE registers used for passing SFmode
and DFmode arguments. Warn for mismatching ABI. */ 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, ...@@ -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. */ SSE math is enabled or for functions with sseregparm attribute. */
if ((fn || fntype) && (mode == SFmode || mode == DFmode)) 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) if ((sse_level >= 1 && mode == SFmode)
|| (sse_level == 2 && mode == DFmode)) || (sse_level == 2 && mode == DFmode))
regno = FIRST_SSE_REG; regno = FIRST_SSE_REG;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment