arm.h (HOST_INT, HOST_UINT): Delete.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Mon, 22 Oct 2001 19:36:24 +0000 (19:36 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Mon, 22 Oct 2001 19:36:24 +0000 (19:36 +0000)
* arm.h (HOST_INT, HOST_UINT): Delete.  Remove all uses.
* arm.c (HOST_INT, HOST_UINT): Likewise.

From-SVN: r46413

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.h

index e18fb6c5f27f480947c842b263c329c6ca3c6a58..377c0a0747a1012c56db3bc027bc74f34877a386 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * arm.h (HOST_INT, HOST_UINT): Delete.  Remove all uses.
+       * arm.c (HOST_INT, HOST_UINT): Likewise.
+
 2001-10-22  Stan Shebs  <shebs@apple.com>
 
        * config/darwin-protos.h (darwin_exception_section): Declare.
index 3e2192b3b4a735b5ecf956b608ad4db8324c0ca2..0c505bcc6e9baf99deecee9febc8e253b8b8cbf1 100644 (file)
@@ -933,14 +933,14 @@ int
 const_ok_for_arm (i)
      HOST_WIDE_INT i;
 {
-  unsigned HOST_WIDE_INT mask = ~HOST_UINT (0xFF);
+  unsigned HOST_WIDE_INT mask = ~(unsigned HOST_WIDE_INT)0xFF;
 
   /* For machines with >32 bit HOST_WIDE_INT, the bits above bit 31 must 
      be all zero, or all one.  */
-  if ((i & ~HOST_UINT (0xffffffff)) != 0
-      && ((i & ~HOST_UINT (0xffffffff)) 
-         != ((~HOST_UINT (0))
-             & ~HOST_UINT (0xffffffff))))
+  if ((i & ~(unsigned HOST_WIDE_INT) 0xffffffff) != 0
+      && ((i & ~(unsigned HOST_WIDE_INT) 0xffffffff)
+         != ((~(unsigned HOST_WIDE_INT) 0)
+             & ~(unsigned HOST_WIDE_INT) 0xffffffff)))
     return FALSE;
   
   /* Fast return for 0 and powers of 2 */
@@ -949,12 +949,12 @@ const_ok_for_arm (i)
 
   do
     {
-      if ((i & mask & HOST_UINT (0xffffffff)) == 0)
+      if ((i & mask & (unsigned HOST_WIDE_INT) 0xffffffff) == 0)
         return TRUE;
       mask =
-         (mask << 2) | ((mask & HOST_UINT (0xffffffff))
-                        >> (32 - 2)) | ~(HOST_UINT (0xffffffff));
-    } while (mask != ~HOST_UINT (0xFF));
+         (mask << 2) | ((mask & (unsigned HOST_WIDE_INT) 0xffffffff)
+                         >> (32 - 2)) | ~(unsigned HOST_WIDE_INT) 0xffffffff;
+    } while (mask != ~(unsigned HOST_WIDE_INT) 0xFF);
 
   return FALSE;
 }
@@ -1101,7 +1101,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
   int set_zero_bit_copies = 0;
   int insns = 0;
   unsigned HOST_WIDE_INT temp1, temp2;
-  unsigned HOST_WIDE_INT remainder = val & HOST_UINT (0xffffffff);
+  unsigned HOST_WIDE_INT remainder = val & 0xffffffff;
 
   /* Find out which operations are safe for a given CODE.  Also do a quick
      check for degenerate cases; these can occur when DImode operations
@@ -1120,7 +1120,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
       break;
 
     case IOR:
-      if (remainder == HOST_UINT (0xffffffff))
+      if (remainder == 0xffffffff)
        {
          if (generate)
            emit_insn (gen_rtx_SET (VOIDmode, target,
@@ -1144,7 +1144,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
            emit_insn (gen_rtx_SET (VOIDmode, target, const0_rtx));
          return 1;
        }
-      if (remainder == HOST_UINT (0xffffffff))
+      if (remainder == 0xffffffff)
        {
          if (reload_completed && rtx_equal_p (target, source))
            return 0;
@@ -1164,7 +1164,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
            emit_insn (gen_rtx_SET (VOIDmode, target, source));
          return 1;
        }
-      if (remainder == HOST_UINT (0xffffffff))
+      if (remainder == 0xffffffff)
        {
          if (generate)
            emit_insn (gen_rtx_SET (VOIDmode, target,
@@ -1292,16 +1292,15 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
         word.  We only look for the simplest cases, to do more would cost
         too much.  Be careful, however, not to generate this when the
         alternative would take fewer insns.  */
-      if (val & HOST_UINT (0xffff0000))
+      if (val & 0xffff0000)
        {
-         temp1 = remainder & HOST_UINT (0xffff0000);
+         temp1 = remainder & 0xffff0000;
          temp2 = remainder & 0x0000ffff;
 
          /* Overlaps outside this range are best done using other methods.  */
          for (i = 9; i < 24; i++)
            {
-             if ((((temp2 | (temp2 << i))
-                   & HOST_UINT (0xffffffff)) == remainder)
+             if ((((temp2 | (temp2 << i)) & 0xffffffff) == remainder)
                  && !const_ok_for_arm (temp2))
                {
                  rtx new_src = (subtargets
@@ -1439,11 +1438,11 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
       /* See if two shifts will do 2 or more insn's worth of work.  */
       if (clear_sign_bit_copies >= 16 && clear_sign_bit_copies < 24)
        {
-         HOST_WIDE_INT shift_mask = (((HOST_UINT (0xffffffff))
+         HOST_WIDE_INT shift_mask = ((0xffffffff
                                       << (32 - clear_sign_bit_copies))
-                                     & HOST_UINT (0xffffffff));
+                                     & 0xffffffff);
 
-         if ((remainder | shift_mask) != HOST_UINT (0xffffffff))
+         if ((remainder | shift_mask) != 0xffffffff)
            {
              if (generate)
                {
@@ -1476,7 +1475,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
        {
          HOST_WIDE_INT shift_mask = (1 << clear_zero_bit_copies) - 1;
          
-         if ((remainder | shift_mask) != HOST_UINT (0xffffffff))
+         if ((remainder | shift_mask) != 0xffffffff)
            {
              if (generate)
                {
@@ -1518,9 +1517,9 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
       num_bits_set++;
 
   if (code == AND || (can_invert && num_bits_set > 16))
-    remainder = (~remainder) & HOST_UINT (0xffffffff);
+    remainder = (~remainder) & 0xffffffff;
   else if (code == PLUS && num_bits_set > 16)
-    remainder = (-remainder) & HOST_UINT (0xffffffff);
+    remainder = (-remainder) & 0xffffffff;
   else
     {
       can_invert = 0;
@@ -1671,7 +1670,7 @@ arm_canonicalize_comparison (code, op1)
 
     case GT:
     case LE:
-      if (i != (((HOST_UINT (1)) << (HOST_BITS_PER_WIDE_INT - 1)) - 1)
+      if (i != ((((unsigned HOST_WIDE_INT) 1) << (HOST_BITS_PER_WIDE_INT - 1)) - 1)
          && (const_ok_for_arm (i + 1) || const_ok_for_arm (-(i + 1))))
        {
          *op1 = GEN_INT (i + 1);
@@ -1681,7 +1680,7 @@ arm_canonicalize_comparison (code, op1)
 
     case GE:
     case LT:
-      if (i != ((HOST_UINT (1)) << (HOST_BITS_PER_WIDE_INT - 1))
+      if (i != (((unsigned HOST_WIDE_INT) 1) << (HOST_BITS_PER_WIDE_INT - 1))
          && (const_ok_for_arm (i - 1) || const_ok_for_arm (-(i - 1))))
        {
          *op1 = GEN_INT (i - 1);
@@ -1691,7 +1690,7 @@ arm_canonicalize_comparison (code, op1)
 
     case GTU:
     case LEU:
-      if (i != ~(HOST_UINT (0))
+      if (i != ~((unsigned HOST_WIDE_INT) 0)
          && (const_ok_for_arm (i + 1) || const_ok_for_arm (-(i + 1))))
        {
          *op1 = GEN_INT (i + 1);
@@ -2714,7 +2713,7 @@ arm_rtx_costs (x, code, outer)
       if (GET_CODE (XEXP (x, 1)) == CONST_INT)
        {
          unsigned HOST_WIDE_INT i = (INTVAL (XEXP (x, 1))
-                                     & HOST_UINT (0xffffffff));
+                                     & (unsigned HOST_WIDE_INT) 0xffffffff);
          int add_cost = const_ok_for_arm (i) ? 4 : 8;
          int j;
          
@@ -4885,9 +4884,9 @@ arm_reload_in_hi (operands)
       if (lo == 4095)
        lo &= 0x7ff;
 
-      hi = ((((offset - lo) & HOST_INT (0xffffffff))
-            ^ HOST_INT (0x80000000))
-           -  HOST_INT (0x80000000));
+      hi = ((((offset - lo) & (HOST_WIDE_INT) 0xffffffff)
+            ^ (HOST_WIDE_INT) 0x80000000)
+           - (HOST_WIDE_INT) 0x80000000);
 
       if (hi + lo != offset)
        abort ();
@@ -5027,9 +5026,9 @@ arm_reload_out_hi (operands)
       if (lo == 4095)
        lo &= 0x7ff;
 
-      hi = ((((offset - lo) & HOST_INT (0xffffffff))
-            ^ HOST_INT (0x80000000))
-           - HOST_INT (0x80000000));
+      hi = ((((offset - lo) & (HOST_WIDE_INT) 0xffffffff)
+            ^ (HOST_WIDE_INT) 0x80000000)
+           - (HOST_WIDE_INT) 0x80000000);
 
       if (hi + lo != offset)
        abort ();
@@ -6748,7 +6747,7 @@ output_multi_immediate (operands, instr1, instr2, immed_op, n)
      HOST_WIDE_INT n;
 {
 #if HOST_BITS_PER_WIDE_INT > 32
-  n &= HOST_UINT (0xffffffff);
+  n &= 0xffffffff;
 #endif
 
   if (n == 0)
@@ -6897,7 +6896,7 @@ int_log2 (power)
 {
   HOST_WIDE_INT shift = 0;
 
-  while ((((HOST_INT (1)) << shift) & power) == 0)
+  while ((((HOST_WIDE_INT) 1 << shift) & power) == 0)
     {
       if (shift > 31)
        abort ();
@@ -7325,7 +7324,7 @@ arm_poke_function_name (stream, name)
   
   ASM_OUTPUT_ASCII (stream, name, length);
   ASM_OUTPUT_ALIGN (stream, 2);
-  x = GEN_INT (HOST_UINT(0xff000000) + alignlength);
+  x = GEN_INT ((unsigned HOST_WIDE_INT) 0xff000000 + alignlength);
   ASM_OUTPUT_INT (stream, x);
 }
 
index 7347298772f90e0d84c5aad03599f8c94af96bc6..4c076ff238063fd1e4203dc3ab6d6023f1f800c0 100644 (file)
@@ -1253,9 +1253,9 @@ enum reg_class
          else                                                             \
            break;                                                         \
                                                                           \
-         high = ((((val - low) & HOST_UINT (0xffffffff))                  \
-                  ^ HOST_UINT (0x80000000))                               \
-                 - HOST_UINT (0x80000000));                               \
+         high = ((((val - low) & (unsigned HOST_WIDE_INT) 0xffffffff)     \
+                  ^ (unsigned HOST_WIDE_INT) 0x80000000)                  \
+                 - (unsigned HOST_WIDE_INT) 0x80000000);                  \
          /* Check for overflow or zero */                                 \
          if (low == 0 || high == 0 || (high + low != val))                \
            break;                                                         \
@@ -2661,22 +2661,12 @@ extern int making_const_table;
 #define PRINT_OPERAND(STREAM, X, CODE)  \
   arm_print_operand (STREAM, X, CODE)
 
-/* Create an [unsigned] host sized integer declaration that
-   avoids compiler warnings.  */
-#ifdef __STDC__
-#define HOST_INT(x)  ((signed HOST_WIDE_INT) x##UL)
-#define HOST_UINT(x) ((unsigned HOST_WIDE_INT) x##UL)
-#else
-#define HOST_INT(x)  ((HOST_WIDE_INT) x)
-#define HOST_UINT(x) ((unsigned HOST_WIDE_INT) x)
-#endif
-
 #define ARM_SIGN_EXTEND(x)  ((HOST_WIDE_INT)                   \
   (HOST_BITS_PER_WIDE_INT <= 32 ? (unsigned HOST_WIDE_INT) (x) \
-   : ((((unsigned HOST_WIDE_INT)(x)) & HOST_UINT (0xffffffff)) |\
-      ((((unsigned HOST_WIDE_INT)(x)) & HOST_UINT (0x80000000))        \
-       ? ((~ HOST_UINT (0))                                    \
-         & ~ HOST_UINT(0xffffffff))                            \
+   : ((((unsigned HOST_WIDE_INT)(x)) & (unsigned HOST_WIDE_INT) 0xffffffff) |\
+      ((((unsigned HOST_WIDE_INT)(x)) & (unsigned HOST_WIDE_INT) 0x80000000) \
+       ? ((~ (unsigned HOST_WIDE_INT) 0)                       \
+         & ~ (unsigned HOST_WIDE_INT) 0xffffffff)              \
        : 0))))
 
 /* Output the address of an operand.  */