This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: PR target/39476: Typo in ix86_function_regparm in i386.c


We never change regparm for 64bit. OK for trunk if it has no regressions
on Linux/x86-64?

Thanks.


H.J.
---
2009-03-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/39476
	* config/i386/i386.c (ix86_function_regparm): Rewrite for
	64bit.

--- gcc/config/i386/i386.c.pr39476	2009-03-16 12:07:41.000000000 -0700
+++ gcc/config/i386/i386.c	2009-03-16 18:19:28.000000000 -0700
@@ -4273,17 +4273,15 @@ static int
 ix86_function_regparm (const_tree type, const_tree decl)
 {
   tree attr;
-  int regparm = ix86_regparm;
+  int regparm;
 
   static bool error_issued;
 
   if (TARGET_64BIT)
-    {
-      if (ix86_function_type_abi (type) == DEFAULT_ABI)
-        return regparm;
-      return DEFAULT_ABI != SYSV_ABI ? X86_64_REGPARM_MAX : X64_REGPARM_MAX;
-    }
+    return (ix86_function_type_abi (type) == SYSV_ABI
+	    ? X86_64_REGPARM_MAX : X64_REGPARM_MAX);
 
+  regparm = ix86_regparm;
   attr = lookup_attribute ("regparm", TYPE_ATTRIBUTES (type));
   if (attr)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]