From df3ba0feef5d9404c65d8b38ca0b79b94ec7feff Mon Sep 17 00:00:00 2001 From: hjl Date: Tue, 5 Feb 2008 14:51:06 +0000 Subject: [PATCH] 2008-02-05 H.J. Lu 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132122 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/config/i386/i386.c | 21 ++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 66da281e3dd..0b612337426 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2008-02-05 H.J. Lu + + 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 * 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 4e5cb22d203..1311f8b12a1 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; -- 2.11.0