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 */
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;
}
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
break;
case IOR:
- if (remainder == HOST_UINT (0xffffffff))
+ if (remainder == 0xffffffff)
{
if (generate)
emit_insn (gen_rtx_SET (VOIDmode, target,
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;
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,
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
/* 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)
{
{
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)
{
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;
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);
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);
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);
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;
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 ();
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 ();
HOST_WIDE_INT n;
{
#if HOST_BITS_PER_WIDE_INT > 32
- n &= HOST_UINT (0xffffffff);
+ n &= 0xffffffff;
#endif
if (n == 0)
{
HOST_WIDE_INT shift = 0;
- while ((((HOST_INT (1)) << shift) & power) == 0)
+ while ((((HOST_WIDE_INT) 1 << shift) & power) == 0)
{
if (shift > 31)
abort ();
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);
}
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; \
#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. */