[PATCH, committed] PPC64 bootstrap fix

David Edelsohn dje@watson.ibm.com
Tue Apr 4 18:00:00 GMT 2006


	The appended patch fixes the PPC64 bootstrap problems experienced
by Roger and Diego due to the additional GEN_INT calls.

Bootstrapped and regression tested on powerpc-ibm-aix5.2.0.0

David

	* config/rs6000/rs6000.c (num_insns_constant_wide): Change
	satisfies_constraint_[IL] to explicit tests on value.

Index: rs6000.c
===================================================================
--- rs6000.c	(revision 112675)
+++ rs6000.c	(working copy)
@@ -2004,11 +2004,12 @@
 num_insns_constant_wide (HOST_WIDE_INT value)
 {
   /* signed constant loadable with {cal|addi} */
-  if (satisfies_constraint_I (GEN_INT (value)))
+  if ((unsigned HOST_WIDE_INT) (value + 0x8000) < 0x10000)
     return 1;
 
   /* constant loadable with {cau|addis} */
-  else if (satisfies_constraint_L (GEN_INT (value)))
+  else if ((value & 0xffff) == 0
+	   && (value >> 31 == -1 || value >> 31 == 0))
     return 1;
 
 #if HOST_BITS_PER_WIDE_INT == 64



More information about the Gcc-patches mailing list