OSDN Git Service

2008-02-05 H.J. Lu <hongjiu.lu@intel.com>
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Feb 2008 14:51:06 +0000 (14:51 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Feb 2008 14:51:06 +0000 (14:51 +0000)
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
gcc/config/i386/i386.c

index 66da281..0b61233 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.
 2008-02-05  Joseph Myers  <joseph@codesourcery.com>
 
        * doc/include/texinfo.tex: Update to version 2008-02-04.16.
index 4e5cb22..1311f8b 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
    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);
 
 {
   gcc_assert (!TARGET_64BIT);
 
@@ -3265,12 +3265,15 @@ ix86_function_sseregparm (const_tree type, const_tree decl)
     {
       if (!TARGET_SSE)
        {
     {
       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;
        }
 
          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.  */
 
       /* 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))
     {
      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;
       if ((sse_level >= 1 && mode == SFmode)
          || (sse_level == 2 && mode == DFmode))
        regno = FIRST_SSE_REG;