Commit 30cf4896 by Kaveh R. Ghazi Committed by Kaveh Ghazi

arm.h (HOST_INT, HOST_UINT): Delete.

	* arm.h (HOST_INT, HOST_UINT): Delete.  Remove all uses.
	* arm.c (HOST_INT, HOST_UINT): Likewise.

From-SVN: r46413
parent 3be131be
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> 2001-10-22 Stan Shebs <shebs@apple.com>
* config/darwin-protos.h (darwin_exception_section): Declare. * config/darwin-protos.h (darwin_exception_section): Declare.
......
...@@ -933,14 +933,14 @@ int ...@@ -933,14 +933,14 @@ int
const_ok_for_arm (i) const_ok_for_arm (i)
HOST_WIDE_INT 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 /* For machines with >32 bit HOST_WIDE_INT, the bits above bit 31 must
be all zero, or all one. */ be all zero, or all one. */
if ((i & ~HOST_UINT (0xffffffff)) != 0 if ((i & ~(unsigned HOST_WIDE_INT) 0xffffffff) != 0
&& ((i & ~HOST_UINT (0xffffffff)) && ((i & ~(unsigned HOST_WIDE_INT) 0xffffffff)
!= ((~HOST_UINT (0)) != ((~(unsigned HOST_WIDE_INT) 0)
& ~HOST_UINT (0xffffffff)))) & ~(unsigned HOST_WIDE_INT) 0xffffffff)))
return FALSE; return FALSE;
/* Fast return for 0 and powers of 2 */ /* Fast return for 0 and powers of 2 */
...@@ -949,12 +949,12 @@ const_ok_for_arm (i) ...@@ -949,12 +949,12 @@ const_ok_for_arm (i)
do do
{ {
if ((i & mask & HOST_UINT (0xffffffff)) == 0) if ((i & mask & (unsigned HOST_WIDE_INT) 0xffffffff) == 0)
return TRUE; return TRUE;
mask = mask =
(mask << 2) | ((mask & HOST_UINT (0xffffffff)) (mask << 2) | ((mask & (unsigned HOST_WIDE_INT) 0xffffffff)
>> (32 - 2)) | ~(HOST_UINT (0xffffffff)); >> (32 - 2)) | ~(unsigned HOST_WIDE_INT) 0xffffffff;
} while (mask != ~HOST_UINT (0xFF)); } while (mask != ~(unsigned HOST_WIDE_INT) 0xFF);
return FALSE; return FALSE;
} }
...@@ -1101,7 +1101,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate) ...@@ -1101,7 +1101,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
int set_zero_bit_copies = 0; int set_zero_bit_copies = 0;
int insns = 0; int insns = 0;
unsigned HOST_WIDE_INT temp1, temp2; 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 /* Find out which operations are safe for a given CODE. Also do a quick
check for degenerate cases; these can occur when DImode operations check for degenerate cases; these can occur when DImode operations
...@@ -1120,7 +1120,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate) ...@@ -1120,7 +1120,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
break; break;
case IOR: case IOR:
if (remainder == HOST_UINT (0xffffffff)) if (remainder == 0xffffffff)
{ {
if (generate) if (generate)
emit_insn (gen_rtx_SET (VOIDmode, target, emit_insn (gen_rtx_SET (VOIDmode, target,
...@@ -1144,7 +1144,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate) ...@@ -1144,7 +1144,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
emit_insn (gen_rtx_SET (VOIDmode, target, const0_rtx)); emit_insn (gen_rtx_SET (VOIDmode, target, const0_rtx));
return 1; return 1;
} }
if (remainder == HOST_UINT (0xffffffff)) if (remainder == 0xffffffff)
{ {
if (reload_completed && rtx_equal_p (target, source)) if (reload_completed && rtx_equal_p (target, source))
return 0; return 0;
...@@ -1164,7 +1164,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate) ...@@ -1164,7 +1164,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
emit_insn (gen_rtx_SET (VOIDmode, target, source)); emit_insn (gen_rtx_SET (VOIDmode, target, source));
return 1; return 1;
} }
if (remainder == HOST_UINT (0xffffffff)) if (remainder == 0xffffffff)
{ {
if (generate) if (generate)
emit_insn (gen_rtx_SET (VOIDmode, target, emit_insn (gen_rtx_SET (VOIDmode, target,
...@@ -1292,16 +1292,15 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate) ...@@ -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 word. We only look for the simplest cases, to do more would cost
too much. Be careful, however, not to generate this when the too much. Be careful, however, not to generate this when the
alternative would take fewer insns. */ alternative would take fewer insns. */
if (val & HOST_UINT (0xffff0000)) if (val & 0xffff0000)
{ {
temp1 = remainder & HOST_UINT (0xffff0000); temp1 = remainder & 0xffff0000;
temp2 = remainder & 0x0000ffff; temp2 = remainder & 0x0000ffff;
/* Overlaps outside this range are best done using other methods. */ /* Overlaps outside this range are best done using other methods. */
for (i = 9; i < 24; i++) for (i = 9; i < 24; i++)
{ {
if ((((temp2 | (temp2 << i)) if ((((temp2 | (temp2 << i)) & 0xffffffff) == remainder)
& HOST_UINT (0xffffffff)) == remainder)
&& !const_ok_for_arm (temp2)) && !const_ok_for_arm (temp2))
{ {
rtx new_src = (subtargets rtx new_src = (subtargets
...@@ -1439,11 +1438,11 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate) ...@@ -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. */ /* 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) 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)) << (32 - clear_sign_bit_copies))
& HOST_UINT (0xffffffff)); & 0xffffffff);
if ((remainder | shift_mask) != HOST_UINT (0xffffffff)) if ((remainder | shift_mask) != 0xffffffff)
{ {
if (generate) if (generate)
{ {
...@@ -1476,7 +1475,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, 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; 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) if (generate)
{ {
...@@ -1518,9 +1517,9 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate) ...@@ -1518,9 +1517,9 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
num_bits_set++; num_bits_set++;
if (code == AND || (can_invert && num_bits_set > 16)) 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) else if (code == PLUS && num_bits_set > 16)
remainder = (-remainder) & HOST_UINT (0xffffffff); remainder = (-remainder) & 0xffffffff;
else else
{ {
can_invert = 0; can_invert = 0;
...@@ -1671,7 +1670,7 @@ arm_canonicalize_comparison (code, op1) ...@@ -1671,7 +1670,7 @@ arm_canonicalize_comparison (code, op1)
case GT: case GT:
case LE: 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)))) && (const_ok_for_arm (i + 1) || const_ok_for_arm (-(i + 1))))
{ {
*op1 = GEN_INT (i + 1); *op1 = GEN_INT (i + 1);
...@@ -1681,7 +1680,7 @@ arm_canonicalize_comparison (code, op1) ...@@ -1681,7 +1680,7 @@ arm_canonicalize_comparison (code, op1)
case GE: case GE:
case LT: 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)))) && (const_ok_for_arm (i - 1) || const_ok_for_arm (-(i - 1))))
{ {
*op1 = GEN_INT (i - 1); *op1 = GEN_INT (i - 1);
...@@ -1691,7 +1690,7 @@ arm_canonicalize_comparison (code, op1) ...@@ -1691,7 +1690,7 @@ arm_canonicalize_comparison (code, op1)
case GTU: case GTU:
case LEU: 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)))) && (const_ok_for_arm (i + 1) || const_ok_for_arm (-(i + 1))))
{ {
*op1 = GEN_INT (i + 1); *op1 = GEN_INT (i + 1);
...@@ -2714,7 +2713,7 @@ arm_rtx_costs (x, code, outer) ...@@ -2714,7 +2713,7 @@ arm_rtx_costs (x, code, outer)
if (GET_CODE (XEXP (x, 1)) == CONST_INT) if (GET_CODE (XEXP (x, 1)) == CONST_INT)
{ {
unsigned HOST_WIDE_INT i = (INTVAL (XEXP (x, 1)) 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 add_cost = const_ok_for_arm (i) ? 4 : 8;
int j; int j;
...@@ -4885,9 +4884,9 @@ arm_reload_in_hi (operands) ...@@ -4885,9 +4884,9 @@ arm_reload_in_hi (operands)
if (lo == 4095) if (lo == 4095)
lo &= 0x7ff; lo &= 0x7ff;
hi = ((((offset - lo) & HOST_INT (0xffffffff)) hi = ((((offset - lo) & (HOST_WIDE_INT) 0xffffffff)
^ HOST_INT (0x80000000)) ^ (HOST_WIDE_INT) 0x80000000)
- HOST_INT (0x80000000)); - (HOST_WIDE_INT) 0x80000000);
if (hi + lo != offset) if (hi + lo != offset)
abort (); abort ();
...@@ -5027,9 +5026,9 @@ arm_reload_out_hi (operands) ...@@ -5027,9 +5026,9 @@ arm_reload_out_hi (operands)
if (lo == 4095) if (lo == 4095)
lo &= 0x7ff; lo &= 0x7ff;
hi = ((((offset - lo) & HOST_INT (0xffffffff)) hi = ((((offset - lo) & (HOST_WIDE_INT) 0xffffffff)
^ HOST_INT (0x80000000)) ^ (HOST_WIDE_INT) 0x80000000)
- HOST_INT (0x80000000)); - (HOST_WIDE_INT) 0x80000000);
if (hi + lo != offset) if (hi + lo != offset)
abort (); abort ();
...@@ -6748,7 +6747,7 @@ output_multi_immediate (operands, instr1, instr2, immed_op, n) ...@@ -6748,7 +6747,7 @@ output_multi_immediate (operands, instr1, instr2, immed_op, n)
HOST_WIDE_INT n; HOST_WIDE_INT n;
{ {
#if HOST_BITS_PER_WIDE_INT > 32 #if HOST_BITS_PER_WIDE_INT > 32
n &= HOST_UINT (0xffffffff); n &= 0xffffffff;
#endif #endif
if (n == 0) if (n == 0)
...@@ -6897,7 +6896,7 @@ int_log2 (power) ...@@ -6897,7 +6896,7 @@ int_log2 (power)
{ {
HOST_WIDE_INT shift = 0; HOST_WIDE_INT shift = 0;
while ((((HOST_INT (1)) << shift) & power) == 0) while ((((HOST_WIDE_INT) 1 << shift) & power) == 0)
{ {
if (shift > 31) if (shift > 31)
abort (); abort ();
...@@ -7325,7 +7324,7 @@ arm_poke_function_name (stream, name) ...@@ -7325,7 +7324,7 @@ arm_poke_function_name (stream, name)
ASM_OUTPUT_ASCII (stream, name, length); ASM_OUTPUT_ASCII (stream, name, length);
ASM_OUTPUT_ALIGN (stream, 2); 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); ASM_OUTPUT_INT (stream, x);
} }
......
...@@ -1253,9 +1253,9 @@ enum reg_class ...@@ -1253,9 +1253,9 @@ enum reg_class
else \ else \
break; \ break; \
\ \
high = ((((val - low) & HOST_UINT (0xffffffff)) \ high = ((((val - low) & (unsigned HOST_WIDE_INT) 0xffffffff) \
^ HOST_UINT (0x80000000)) \ ^ (unsigned HOST_WIDE_INT) 0x80000000) \
- HOST_UINT (0x80000000)); \ - (unsigned HOST_WIDE_INT) 0x80000000); \
/* Check for overflow or zero */ \ /* Check for overflow or zero */ \
if (low == 0 || high == 0 || (high + low != val)) \ if (low == 0 || high == 0 || (high + low != val)) \
break; \ break; \
...@@ -2661,22 +2661,12 @@ extern int making_const_table; ...@@ -2661,22 +2661,12 @@ extern int making_const_table;
#define PRINT_OPERAND(STREAM, X, CODE) \ #define PRINT_OPERAND(STREAM, X, CODE) \
arm_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) \ #define ARM_SIGN_EXTEND(x) ((HOST_WIDE_INT) \
(HOST_BITS_PER_WIDE_INT <= 32 ? (unsigned HOST_WIDE_INT) (x) \ (HOST_BITS_PER_WIDE_INT <= 32 ? (unsigned HOST_WIDE_INT) (x) \
: ((((unsigned HOST_WIDE_INT)(x)) & HOST_UINT (0xffffffff)) |\ : ((((unsigned HOST_WIDE_INT)(x)) & (unsigned HOST_WIDE_INT) 0xffffffff) |\
((((unsigned HOST_WIDE_INT)(x)) & HOST_UINT (0x80000000)) \ ((((unsigned HOST_WIDE_INT)(x)) & (unsigned HOST_WIDE_INT) 0x80000000) \
? ((~ HOST_UINT (0)) \ ? ((~ (unsigned HOST_WIDE_INT) 0) \
& ~ HOST_UINT(0xffffffff)) \ & ~ (unsigned HOST_WIDE_INT) 0xffffffff) \
: 0)))) : 0))))
/* Output the address of an operand. */ /* Output the address of an operand. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment