]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/35084 (Strang error messages)
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 5 Feb 2008 14:51:06 +0000 (14:51 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 5 Feb 2008 14:51:06 +0000 (06:51 -0800)
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

gcc/ChangeLog
gcc/config/i386/i386.c

index 66da281e3dd8d28214508c0948807d4dacb9b5c1..0b612337426c612b3d0e31c661d5abf95c5b67a4 100644 (file)
@@ -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.
index 4e5cb22d203f6e6ef4952d1b9a336916744f9e7d..1311f8b12a13608070a28cdc1a6a8ee048c7bfef 100644 (file)
@@ -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;