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 arm] remove bogus conditional in PROMOTE_FUNCTION_MODE


The reference to MODE_COMPLEX_INT in PROMOTE_FUNCTION_MODE is bogus.  I
tried adding to an i686-pc-linux-gnu bootstrap an assertion that such a
class is never found; the result is that complex types are passed to
promote_mode, but they never reach PROMOTE_FUNCTION_MODE.

Therefore, I propose this patch for ARM.

Ok for mainline?  Or is this the sign of a wrongly-implemented part of
the ABI?

Paolo

2009-04-22  Paolo Bonzini  <bonzini@gnu.org>

	* config/arm/arm.h (PROMOTE_FUNCTION_MODE): Remove handling
	of MODE_COMPLEX_INT.

Index: config/arm/arm.h
===================================================================
--- config/arm/arm.h    (revision 146555)
+++ config/arm/arm.h    (working copy)
@@ -480,8 +480,7 @@ extern int arm_arch_hwdiv;
     }

 #define PROMOTE_FUNCTION_MODE(MODE, UNSIGNEDP, TYPE)   \
-  if ((GET_MODE_CLASS (MODE) == MODE_INT               \
-       || GET_MODE_CLASS (MODE) == MODE_COMPLEX_INT)    \
+  if (GET_MODE_CLASS (MODE) == MODE_INT                        \
       && GET_MODE_SIZE (MODE) < 4)                      \
     (MODE) = SImode;                                   \


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