]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000.c (num_insns_constant_wide): Change satisfies_constraint_[IL] to explicit...
authorDavid Edelsohn <edelsohn@gnu.org>
Tue, 4 Apr 2006 17:58:55 +0000 (17:58 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Tue, 4 Apr 2006 17:58:55 +0000 (13:58 -0400)
* config/rs6000/rs6000.c (num_insns_constant_wide): Change
satisfies_constraint_[IL] to explicit tests on value.

From-SVN: r112676

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 1b34bd3690c13ae07c34d4b3ceeb02e5fb02f5d8..62011292123f394303aeeecad362994016c7250a 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-04  David Edelsohn  <edelsohn@gnu.org>
+
+       * config/rs6000/rs6000.c (num_insns_constant_wide): Change
+       satisfies_constraint_[IL] to explicit tests on value.
+
 2006-04-04  Sebastian Pop  <pop@cri.ensmp.fr>
 
        * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop,
index 9d303c0a97b7c435e6597d6e4c52f0e1ddbe677f..63ee622d52e530354eb1340fc43d165624caafe3 100644 (file)
@@ -2004,11 +2004,12 @@ int
 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