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, committed] PPC64 bootstrap fix


	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


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