The cuids are like uids but increase monotonically always.
We use them to see whether a reg is used outside a given basic block. */
-static short *uid_cuid;
+static int *uid_cuid;
/* Get the cuid of an insn. */
{
if (GET_CODE (XEXP (x, 0)) == REG
&& ! REGNO_QTY_VALID_P (REGNO (XEXP (x, 0))))
- if (insert_regs (XEXP (x, 0), 0, 0))
+ if (insert_regs (XEXP (x, 0), NULL_PTR, 0))
{
rehash_using_reg (XEXP (x, 0));
changed = 1;
if (GET_CODE (XEXP (x, 1)) == REG
&& ! REGNO_QTY_VALID_P (REGNO (XEXP (x, 1))))
- if (insert_regs (XEXP (x, 1), 0, 0))
+ if (insert_regs (XEXP (x, 1), NULL_PTR, 0))
{
rehash_using_reg (XEXP (x, 1));
changed = 1;
else if (GET_CODE (x) == SUBREG && GET_CODE (SUBREG_REG (x)) == REG
&& ! REGNO_QTY_VALID_P (REGNO (SUBREG_REG (x))))
{
- insert_regs (SUBREG_REG (x), 0, 0);
+ insert_regs (SUBREG_REG (x), NULL_PTR, 0);
mention_regs (SUBREG_REG (x));
return 1;
}
subhash = safe_hash (subexp, mode) % NBUCKETS;
subelt = lookup (subexp, subhash, mode);
if (subelt == 0)
- subelt = insert (subexp, 0, subhash, mode);
+ subelt = insert (subexp, NULL_PTR, subhash, mode);
/* Initialize SUBELT's circular chain if it has none. */
if (subelt->related_value == 0)
subelt->related_value = subelt;
register int i;
register struct table_elt *p;
register rtx base;
- register int start, end;
+ register HOST_WIDE_INT start, end;
/* If X is a register, dependencies on its contents
are recorded through the qty number mechanism.
{
next = p->next_same_hash;
if (GET_CODE (p->exp) != REG
- && refers_to_regno_p (regno, regno + 1, p->exp, 0))
+ && refers_to_regno_p (regno, regno + 1, p->exp, NULL_PTR))
remove_from_table (p, i);
}
}
{
register struct table_elt *relt = 0;
register struct table_elt *p, *q;
- int offset;
+ HOST_WIDE_INT offset;
/* First, is there anything related known?
If we have a table element, we can tell from that.
int validate;
int equal_values;
{
- register int i;
+ register int i, j;
register enum rtx_code code;
register char *fmt;
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
- if (fmt[i] == 'e')
+ switch (fmt[i])
{
+ case 'e':
if (! exp_equiv_p (XEXP (x, i), XEXP (y, i), validate, equal_values))
return 0;
- }
- else if (fmt[i] == 'E')
- {
- int j;
+ break;
+
+ case 'E':
if (XVECLEN (x, i) != XVECLEN (y, i))
return 0;
for (j = 0; j < XVECLEN (x, i); j++)
if (! exp_equiv_p (XVECEXP (x, i, j), XVECEXP (y, i, j),
validate, equal_values))
return 0;
- }
- else if (fmt[i] == 's')
- {
+ break;
+
+ case 's':
if (strcmp (XSTR (x, i), XSTR (y, i)))
return 0;
- }
- else if (fmt[i] == 'i')
- {
+ break;
+
+ case 'i':
if (XINT (x, i) != XINT (y, i))
return 0;
+ break;
+
+ case 'w':
+ if (XWINT (x, i) != XWINT (y, i))
+ return 0;
+ break;
+
+ case '0':
+ break;
+
+ default:
+ abort ();
}
- else if (fmt[i] != '0')
- abort ();
- }
+ }
+
return 1;
}
\f
int
refers_to_mem_p (x, base, start, end)
rtx x, base;
- int start, end;
+ HOST_WIDE_INT start, end;
{
- register int i;
+ register HOST_WIDE_INT i;
register enum rtx_code code;
register char *fmt;
if (GET_CODE (base) == PLUS
&& GET_CODE (XEXP (base, 1)) == CONST_INT)
{
- int tem = INTVAL (XEXP (base, 1));
+ HOST_WIDE_INT tem = INTVAL (XEXP (base, 1));
start += tem;
end += tem;
base = XEXP (base, 0);
if (GET_CODE (base) == PLUS
&& GET_CODE (XEXP (base, 1)) == CONST_INT)
{
- int tem = INTVAL (XEXP (base, 1));
+ HOST_WIDE_INT tem = INTVAL (XEXP (base, 1));
start += tem;
end += tem;
base = XEXP (base, 0);
&& (GET_CODE (elt->exp) == REG
|| exp_equiv_p (elt->exp, elt->exp, 1, 0))
&& validate_change (insn, loc,
- canon_reg (copy_rtx (elt->exp), 0), 0))
+ canon_reg (copy_rtx (elt->exp), NULL_RTX), 0))
return;
}
#else
if (found_better)
{
if (validate_change (insn, loc,
- canon_reg (copy_rtx (best_elt->exp), 0), 0))
+ canon_reg (copy_rtx (best_elt->exp),
+ NULL_RTX), 0))
return;
else
best_elt->flag = 1;
if (found_better)
{
if (validate_change (insn, loc,
- canon_reg (copy_rtx (best_rtx), 0), 0))
+ canon_reg (copy_rtx (best_rtx),
+ NULL_RTX), 0))
return;
else
best_elt->flag = 1;
|| ((code == NE
|| (code == LT
&& GET_MODE_CLASS (inner_mode) == MODE_INT
- && GET_MODE_BITSIZE (inner_mode) <= HOST_BITS_PER_INT
+ && (GET_MODE_BITSIZE (inner_mode)
+ <= HOST_BITS_PER_WIDE_INT)
&& (STORE_FLAG_VALUE
- & (1 << (GET_MODE_BITSIZE (inner_mode) - 1))))
+ & ((HOST_WIDE_INT) 1
+ << (GET_MODE_BITSIZE (inner_mode) - 1))))
#ifdef FLOAT_STORE_FLAG_VALUE
|| (code == LT
&& GET_MODE_CLASS (inner_mode) == MODE_FLOAT
else if ((code == EQ
|| (code == GE
&& GET_MODE_CLASS (inner_mode) == MODE_INT
- && GET_MODE_BITSIZE (inner_mode) <= HOST_BITS_PER_INT
+ && (GET_MODE_BITSIZE (inner_mode)
+ <= HOST_BITS_PER_WIDE_INT)
&& (STORE_FLAG_VALUE
- & (1 << (GET_MODE_BITSIZE (inner_mode) - 1))))
+ & ((HOST_WIDE_INT) 1
+ << (GET_MODE_BITSIZE (inner_mode) - 1))))
#ifdef FLOAT_STORE_FLAG_VALUE
|| (code == GE
&& GET_MODE_CLASS (inner_mode) == MODE_FLOAT
if (CONST_DOUBLE_HIGH (op) < 0)
{
d = (double) (~ CONST_DOUBLE_HIGH (op));
- d *= ((double) (1 << (HOST_BITS_PER_INT / 2))
- * (double) (1 << (HOST_BITS_PER_INT / 2)));
- d += (double) (unsigned) (~ CONST_DOUBLE_LOW (op));
+ d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
+ * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
+ d += (double) (unsigned HOST_WIDE_INT) (~ CONST_DOUBLE_LOW (op));
d = (- d - 1.0);
}
else
{
d = (double) CONST_DOUBLE_HIGH (op);
- d *= ((double) (1 << (HOST_BITS_PER_INT / 2))
- * (double) (1 << (HOST_BITS_PER_INT / 2)));
- d += (double) (unsigned) CONST_DOUBLE_LOW (op);
+ d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
+ * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
+ d += (double) (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (op);
}
#endif /* REAL_ARITHMETIC */
return CONST_DOUBLE_FROM_REAL_VALUE (d, mode);
CONST_DOUBLE_HIGH (op));
#else
d = (double) CONST_DOUBLE_HIGH (op);
- d *= ((double) (1 << (HOST_BITS_PER_INT / 2))
- * (double) (1 << (HOST_BITS_PER_INT / 2)));
- d += (double) (unsigned) CONST_DOUBLE_LOW (op);
+ d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
+ * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
+ d += (double) (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (op);
#endif /* REAL_ARITHMETIC */
return CONST_DOUBLE_FROM_REAL_VALUE (d, mode);
}
#endif
else if (GET_CODE (op) == CONST_INT
- && width <= HOST_BITS_PER_INT && width > 0)
+ && width <= HOST_BITS_PER_WIDE_INT && width > 0)
{
- register int arg0 = INTVAL (op);
- register int val;
+ register HOST_WIDE_INT arg0 = INTVAL (op);
+ register HOST_WIDE_INT val;
switch (code)
{
unless they and our sign bit are all one.
So we get either a reasonable negative value or a reasonable
unsigned value for this mode. */
- if (width < HOST_BITS_PER_INT
- && ((val & ((-1) << (width - 1))) != ((-1) << (width - 1))))
+ if (width < HOST_BITS_PER_WIDE_INT
+ && ((val & ((HOST_WIDE_INT) (-1) << (width - 1)))
+ != ((HOST_WIDE_INT) (-1) << (width - 1))))
val &= (1 << width) - 1;
- return gen_rtx (CONST_INT, VOIDmode, val);
+ return GEN_INT (val);
}
/* We can do some operations on integer CONST_DOUBLEs. Also allow
else if (GET_MODE (op) == VOIDmode
&& (GET_CODE (op) == CONST_DOUBLE || GET_CODE (op) == CONST_INT))
{
- int l1, h1, lv, hv;
+ HOST_WIDE_INT l1, h1, lv, hv;
if (GET_CODE (op) == CONST_DOUBLE)
l1 = CONST_DOUBLE_LOW (op), h1 = CONST_DOUBLE_HIGH (op);
case FFS:
hv = 0;
if (l1 == 0)
- lv = HOST_BITS_PER_INT + exact_log2 (h1 & (-h1)) + 1;
+ lv = HOST_BITS_PER_WIDE_INT + exact_log2 (h1 & (-h1)) + 1;
else
lv = exact_log2 (l1 & (-l1)) + 1;
break;
case TRUNCATE:
- if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_INT)
- return gen_rtx (CONST_INT, VOIDmode, l1 & GET_MODE_MASK (mode));
+ if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT)
+ return GEN_INT (l1 & GET_MODE_MASK (mode));
else
return 0;
break;
case ZERO_EXTEND:
if (op_mode == VOIDmode
- || GET_MODE_BITSIZE (op_mode) > HOST_BITS_PER_INT)
+ || GET_MODE_BITSIZE (op_mode) > HOST_BITS_PER_WIDE_INT)
return 0;
hv = 0;
case SIGN_EXTEND:
if (op_mode == VOIDmode
- || GET_MODE_BITSIZE (op_mode) > HOST_BITS_PER_INT)
+ || GET_MODE_BITSIZE (op_mode) > HOST_BITS_PER_WIDE_INT)
return 0;
else
{
lv = l1 & GET_MODE_MASK (op_mode);
- if (GET_MODE_BITSIZE (op_mode) < HOST_BITS_PER_INT
- && (lv & (1 << (GET_MODE_BITSIZE (op_mode) - 1))) != 0)
- lv -= 1 << GET_MODE_BITSIZE (op_mode);
+ if (GET_MODE_BITSIZE (op_mode) < HOST_BITS_PER_WIDE_INT
+ && (lv & ((HOST_WIDE_INT) 1
+ << (GET_MODE_BITSIZE (op_mode) - 1))) != 0)
+ lv -= (HOST_WIDE_INT) 1 << GET_MODE_BITSIZE (op_mode);
- hv = (lv < 0) ? ~0 : 0;
+ hv = (lv < 0) ? ~ (HOST_WIDE_INT) 0 : 0;
}
break;
}
x = immed_real_const_1 (d, mode);
- set_float_handler (0);
+ set_float_handler (NULL_PTR);
return x;
}
else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE_CLASS (mode) == MODE_INT
- && width <= HOST_BITS_PER_INT && width > 0)
+ && width <= HOST_BITS_PER_WIDE_INT && width > 0)
{
REAL_VALUE_TYPE d;
jmp_buf handler;
rtx x;
- int val;
+ HOST_WIDE_INT val;
if (setjmp (handler))
return 0;
abort ();
}
- set_float_handler (0);
+ set_float_handler (NULL_PTR);
/* Clear the bits that don't belong in our mode,
unless they and our sign bit are all one.
So we get either a reasonable negative value or a reasonable
unsigned value for this mode. */
- if (width < HOST_BITS_PER_INT
- && ((val & ((-1) << (width - 1))) != ((-1) << (width - 1))))
- val &= (1 << width) - 1;
+ if (width < HOST_BITS_PER_WIDE_INT
+ && ((val & ((HOST_WIDE_INT) (-1) << (width - 1)))
+ != ((HOST_WIDE_INT) (-1) << (width - 1))))
+ val &= ((HOST_WIDE_INT) 1 << width) - 1;
- return gen_rtx (CONST_INT, VOIDmode, val);
+ return GEN_INT (val);
}
#endif
/* This was formerly used only for non-IEEE float.
enum machine_mode mode;
rtx op0, op1;
{
- register int arg0, arg1, arg0s, arg1s;
- int val;
+ register HOST_WIDE_INT arg0, arg1, arg0s, arg1s;
+ HOST_WIDE_INT val;
int width = GET_MODE_BITSIZE (mode);
/* Relational operations don't work here. We must know the mode
}
#endif
- set_float_handler (0);
+ set_float_handler (NULL_PTR);
value = real_value_truncate (mode, value);
return immed_real_const_1 (value, mode);
}
&& GET_CODE (op0) == CONST_DOUBLE
&& (GET_CODE (op1) == CONST_DOUBLE || GET_CODE (op1) == CONST_INT))
{
- int l1, l2, h1, h2, lv, hv;
+ HOST_WIDE_INT l1, l2, h1, h2, lv, hv;
l1 = CONST_DOUBLE_LOW (op0), h1 = CONST_DOUBLE_HIGH (op0);
break;
case SMIN:
- if (h1 < h2 || (h1 == h2 && (unsigned) l1 < (unsigned) l2))
+ if (h1 < h2
+ || (h1 == h2
+ && ((unsigned HOST_WIDE_INT) l1
+ < (unsigned HOST_WIDE_INT) l2)))
lv = l1, hv = h1;
else
lv = l2, hv = h2;
break;
case SMAX:
- if (h1 > h2 || (h1 == h2 && (unsigned) l1 > (unsigned) l2))
+ if (h1 > h2
+ || (h1 == h2
+ && ((unsigned HOST_WIDE_INT) l1
+ > (unsigned HOST_WIDE_INT) l2)))
lv = l1, hv = h1;
else
lv = l2, hv = h2;
break;
case UMIN:
- if ((unsigned) h1 < (unsigned) h2
- || (h1 == h2 && (unsigned) l1 < (unsigned) l2))
+ if ((unsigned HOST_WIDE_INT) h1 < (unsigned HOST_WIDE_INT) h2
+ || (h1 == h2
+ && ((unsigned HOST_WIDE_INT) l1
+ < (unsigned HOST_WIDE_INT) l2)))
lv = l1, hv = h1;
else
lv = l2, hv = h2;
break;
case UMAX:
- if ((unsigned) h1 > (unsigned) h2
- || (h1 == h2 && (unsigned) l1 > (unsigned) l2))
+ if ((unsigned HOST_WIDE_INT) h1 > (unsigned HOST_WIDE_INT) h2
+ || (h1 == h2
+ && ((unsigned HOST_WIDE_INT) l1
+ > (unsigned HOST_WIDE_INT) l2)))
lv = l1, hv = h1;
else
lv = l2, hv = h2;
#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
if (GET_CODE (op0) != CONST_INT || GET_CODE (op1) != CONST_INT
- || width > HOST_BITS_PER_INT || width == 0)
+ || width > HOST_BITS_PER_WIDE_INT || width == 0)
{
/* Even if we can't compute a constant result,
there are some cases worth simplifying. */
/* Convert multiply by constant power of two into shift. */
if (GET_CODE (op1) == CONST_INT
&& (val = exact_log2 (INTVAL (op1))) >= 0)
- return gen_rtx (ASHIFT, mode, op0,
- gen_rtx (CONST_INT, VOIDmode, val));
+ return gen_rtx (ASHIFT, mode, op0, GEN_INT (val));
if (GET_CODE (op1) == CONST_DOUBLE
&& GET_MODE_CLASS (GET_MODE (op1)) == MODE_FLOAT)
below). */
if (GET_CODE (op1) == CONST_INT
&& (arg1 = exact_log2 (INTVAL (op1))) > 0)
- return gen_rtx (LSHIFTRT, mode, op0,
- gen_rtx (CONST_INT, VOIDmode, arg1));
+ return gen_rtx (LSHIFTRT, mode, op0, GEN_INT (arg1));
/* ... fall through ... */
/* Handle modulus by power of two (mod with 1 handled below). */
if (GET_CODE (op1) == CONST_INT
&& exact_log2 (INTVAL (op1)) > 0)
- return gen_rtx (AND, mode, op0,
- gen_rtx (CONST_INT, VOIDmode, INTVAL (op1) - 1));
+ return gen_rtx (AND, mode, op0, GEN_INT (INTVAL (op1) - 1));
/* ... fall through ... */
case ROTATERT:
case ROTATE:
/* Rotating ~0 always results in ~0. */
- if (GET_CODE (op0) == CONST_INT && width <= HOST_BITS_PER_INT
+ if (GET_CODE (op0) == CONST_INT && width <= HOST_BITS_PER_WIDE_INT
&& INTVAL (op0) == GET_MODE_MASK (mode)
&& ! side_effects_p (op1))
return op0;
break;
case SMIN:
- if (width <= HOST_BITS_PER_INT && GET_CODE (op1) == CONST_INT
- && INTVAL (op1) == 1 << (width -1)
+ if (width <= HOST_BITS_PER_WIDE_INT && GET_CODE (op1) == CONST_INT
+ && INTVAL (op1) == (HOST_WIDE_INT) 1 << (width -1)
&& ! side_effects_p (op0))
return op1;
else if (rtx_equal_p (op0, op1) && ! side_effects_p (op0))
break;
case SMAX:
- if (width <= HOST_BITS_PER_INT && GET_CODE (op1) == CONST_INT
+ if (width <= HOST_BITS_PER_WIDE_INT && GET_CODE (op1) == CONST_INT
&& INTVAL (op1) == GET_MODE_MASK (mode) >> 1
&& ! side_effects_p (op0))
return op1;
arg0 = INTVAL (op0);
arg1 = INTVAL (op1);
- if (width < HOST_BITS_PER_INT)
+ if (width < HOST_BITS_PER_WIDE_INT)
{
- arg0 &= (1 << width) - 1;
- arg1 &= (1 << width) - 1;
+ arg0 &= ((HOST_WIDE_INT) 1 << width) - 1;
+ arg1 &= ((HOST_WIDE_INT) 1 << width) - 1;
arg0s = arg0;
- if (arg0s & (1 << (width - 1)))
- arg0s |= ((-1) << width);
+ if (arg0s & ((HOST_WIDE_INT) 1 << (width - 1)))
+ arg0s |= ((HOST_WIDE_INT) (-1) << width);
arg1s = arg1;
- if (arg1s & (1 << (width - 1)))
- arg1s |= ((-1) << width);
+ if (arg1s & ((HOST_WIDE_INT) 1 << (width - 1)))
+ arg1s |= ((HOST_WIDE_INT) (-1) << width);
}
else
{
case UDIV:
if (arg1 == 0)
return 0;
- val = (unsigned) arg0 / arg1;
+ val = (unsigned HOST_WIDE_INT) arg0 / arg1;
break;
case UMOD:
if (arg1 == 0)
return 0;
- val = (unsigned) arg0 % arg1;
+ val = (unsigned HOST_WIDE_INT) arg0 % arg1;
break;
case AND:
if (arg1 >= width)
return 0;
- val = ((unsigned) arg0) >> arg1;
+ val = ((unsigned HOST_WIDE_INT) arg0) >> arg1;
break;
case ASHIFT:
if (arg1 >= width)
return 0;
- val = ((unsigned) arg0) << arg1;
+ val = ((unsigned HOST_WIDE_INT) arg0) << arg1;
break;
case ASHIFTRT:
return 0;
arg1 %= width;
- val = ((((unsigned) arg0) << (width - arg1))
- | (((unsigned) arg0) >> arg1));
+ val = ((((unsigned HOST_WIDE_INT) arg0) << (width - arg1))
+ | (((unsigned HOST_WIDE_INT) arg0) >> arg1));
break;
case ROTATE:
return 0;
arg1 %= width;
- val = ((((unsigned) arg0) << arg1)
- | (((unsigned) arg0) >> (width - arg1)));
+ val = ((((unsigned HOST_WIDE_INT) arg0) << arg1)
+ | (((unsigned HOST_WIDE_INT) arg0) >> (width - arg1)));
break;
case COMPARE:
break;
case UMIN:
- val = (unsigned int)arg0 <= (unsigned int)arg1 ? arg0 : arg1;
+ val = ((unsigned HOST_WIDE_INT) arg0
+ <= (unsigned HOST_WIDE_INT) arg1 ? arg0 : arg1);
break;
case SMAX:
break;
case UMAX:
- val = (unsigned int)arg0 > (unsigned int)arg1 ? arg0 : arg1;
+ val = ((unsigned HOST_WIDE_INT) arg0
+ > (unsigned HOST_WIDE_INT) arg1 ? arg0 : arg1);
break;
default:
/* Clear the bits that don't belong in our mode, unless they and our sign
bit are all one. So we get either a reasonable negative value or a
reasonable unsigned value for this mode. */
- if (width < HOST_BITS_PER_INT
- && ((val & ((-1) << (width - 1))) != ((-1) << (width - 1))))
- val &= (1 << width) - 1;
-
- return gen_rtx (CONST_INT, VOIDmode, val);
+ if (width < HOST_BITS_PER_WIDE_INT
+ && ((val & ((HOST_WIDE_INT) (-1) << (width - 1)))
+ != ((HOST_WIDE_INT) (-1) << (width - 1))))
+ val &= ((HOST_WIDE_INT) 1 << width) - 1;
+
+ return GEN_INT (val);
}
\f
/* Like simplify_binary_operation except used for relational operators.
enum machine_mode mode;
rtx op0, op1;
{
- register int arg0, arg1, arg0s, arg1s;
- int val;
+ register HOST_WIDE_INT arg0, arg1, arg0s, arg1s;
+ HOST_WIDE_INT val;
int width = GET_MODE_BITSIZE (mode);
/* If op0 is a compare, extract the comparison arguments from it. */
op1 = XEXP (op0, 1), op0 = XEXP (op0, 0);
if (GET_CODE (op0) != CONST_INT || GET_CODE (op1) != CONST_INT
- || width > HOST_BITS_PER_INT || width == 0)
+ || width > HOST_BITS_PER_WIDE_INT || width == 0)
{
/* Even if we can't compute a constant result,
there are some cases worth simplifying. */
&& GET_MODE_CLASS (GET_MODE (op0)) == MODE_FLOAT)
{
REAL_VALUE_TYPE d0, d1;
- int value;
jmp_buf handler;
int op0lt, op1lt, equal;
equal = REAL_VALUES_EQUAL (d0, d1);
op0lt = REAL_VALUES_LESS (d0, d1);
op1lt = REAL_VALUES_LESS (d1, d0);
- set_float_handler (0);
+ set_float_handler (NULL_PTR);
switch (code)
{
arg0 = INTVAL (op0);
arg1 = INTVAL (op1);
- if (width < HOST_BITS_PER_INT)
+ if (width < HOST_BITS_PER_WIDE_INT)
{
- arg0 &= (1 << width) - 1;
- arg1 &= (1 << width) - 1;
+ arg0 &= ((HOST_WIDE_INT) 1 << width) - 1;
+ arg1 &= ((HOST_WIDE_INT) 1 << width) - 1;
arg0s = arg0;
- if (arg0s & (1 << (width - 1)))
- arg0s |= ((-1) << width);
+ if (arg0s & ((HOST_WIDE_INT) 1 << (width - 1)))
+ arg0s |= ((HOST_WIDE_INT) (-1) << width);
arg1s = arg1;
- if (arg1s & (1 << (width - 1)))
- arg1s |= ((-1) << width);
+ if (arg1s & ((HOST_WIDE_INT) 1 << (width - 1)))
+ arg1s |= ((HOST_WIDE_INT) (-1) << width);
}
else
{
break;
case LEU:
- val = ((unsigned) arg0) <= ((unsigned) arg1) ? STORE_FLAG_VALUE : 0;
+ val = (((unsigned HOST_WIDE_INT) arg0)
+ <= ((unsigned HOST_WIDE_INT) arg1) ? STORE_FLAG_VALUE : 0);
break;
case LTU:
- val = ((unsigned) arg0) < ((unsigned) arg1) ? STORE_FLAG_VALUE : 0;
+ val = (((unsigned HOST_WIDE_INT) arg0)
+ < ((unsigned HOST_WIDE_INT) arg1) ? STORE_FLAG_VALUE : 0);
break;
case GEU:
- val = ((unsigned) arg0) >= ((unsigned) arg1) ? STORE_FLAG_VALUE : 0;
+ val = (((unsigned HOST_WIDE_INT) arg0)
+ >= ((unsigned HOST_WIDE_INT) arg1) ? STORE_FLAG_VALUE : 0);
break;
case GTU:
- val = ((unsigned) arg0) > ((unsigned) arg1) ? STORE_FLAG_VALUE : 0;
+ val = (((unsigned HOST_WIDE_INT) arg0)
+ > ((unsigned HOST_WIDE_INT) arg1) ? STORE_FLAG_VALUE : 0);
break;
default:
/* Clear the bits that don't belong in our mode, unless they and our sign
bit are all one. So we get either a reasonable negative value or a
reasonable unsigned value for this mode. */
- if (width < HOST_BITS_PER_INT
- && ((val & ((-1) << (width - 1))) != ((-1) << (width - 1))))
- val &= (1 << width) - 1;
+ if (width < HOST_BITS_PER_WIDE_INT
+ && ((val & ((HOST_WIDE_INT) (-1) << (width - 1)))
+ != ((HOST_WIDE_INT) (-1) << (width - 1))))
+ val &= ((HOST_WIDE_INT) 1 << width) - 1;
- return gen_rtx (CONST_INT, VOIDmode, val);
+ return GEN_INT (val);
}
\f
/* Simplify CODE, an operation with result mode MODE and three operands,
/* VOIDmode means "infinite" precision. */
if (width == 0)
- width = HOST_BITS_PER_INT;
+ width = HOST_BITS_PER_WIDE_INT;
switch (code)
{
&& GET_CODE (op1) == CONST_INT
&& GET_CODE (op2) == CONST_INT
&& INTVAL (op1) + INTVAL (op2) <= GET_MODE_BITSIZE (op0_mode)
- && width <= HOST_BITS_PER_INT)
+ && width <= HOST_BITS_PER_WIDE_INT)
{
/* Extracting a bit-field from a constant */
- int val = INTVAL (op0);
+ HOST_WIDE_INT val = INTVAL (op0);
#if BITS_BIG_ENDIAN
val >>= (GET_MODE_BITSIZE (op0_mode) - INTVAL (op2) - INTVAL (op1));
#else
val >>= INTVAL (op2);
#endif
- if (HOST_BITS_PER_INT != INTVAL (op1))
+ if (HOST_BITS_PER_WIDE_INT != INTVAL (op1))
{
/* First zero-extend. */
- val &= (1 << INTVAL (op1)) - 1;
+ val &= ((HOST_WIDE_INT) 1 << INTVAL (op1)) - 1;
/* If desired, propagate sign bit. */
- if (code == SIGN_EXTRACT && (val & (1 << (INTVAL (op1) - 1))))
- val |= ~ ((1 << INTVAL (op1)) - 1);
+ if (code == SIGN_EXTRACT
+ && (val & ((HOST_WIDE_INT) 1 << (INTVAL (op1) - 1))))
+ val |= ~ (((HOST_WIDE_INT) 1 << INTVAL (op1)) - 1);
}
/* Clear the bits that don't belong in our mode,
unless they and our sign bit are all one.
So we get either a reasonable negative value or a reasonable
unsigned value for this mode. */
- if (width < HOST_BITS_PER_INT
- && ((val & ((-1) << (width - 1))) != ((-1) << (width - 1))))
- val &= (1 << width) - 1;
+ if (width < HOST_BITS_PER_WIDE_INT
+ && ((val & ((HOST_WIDE_INT) (-1) << (width - 1)))
+ != ((HOST_WIDE_INT) (-1) << (width - 1))))
+ val &= ((HOST_WIDE_INT) 1 << width) - 1;
- return gen_rtx (CONST_INT, VOIDmode, val);
+ return GEN_INT (val);
}
break;
register enum rtx_code code;
register enum machine_mode mode;
register char *fmt;
- register int i, val;
+ register int i;
rtx new = 0;
int copied = 0;
int must_swap = 0;
elt; elt = elt->next_same_value)
if (GET_CODE (elt->exp) == SUBREG
&& GET_MODE (SUBREG_REG (elt->exp)) == mode
- && exp_equiv_p (elt->exp, elt->exp, 1))
+ && exp_equiv_p (elt->exp, elt->exp, 1, 0))
return copy_rtx (SUBREG_REG (elt->exp));
}
rtx op0 = SUBREG_REG (XEXP (elt->exp, 0));
if (GET_CODE (op0) != REG && ! CONSTANT_P (op0))
- op0 = fold_rtx (op0, 0);
+ op0 = fold_rtx (op0, NULL_RTX);
op0 = equiv_constant (op0);
if (op0)
rtx op1 = gen_lowpart_common (mode, XEXP (elt->exp, 1));
if (op0 && GET_CODE (op0) != REG && ! CONSTANT_P (op0))
- op0 = fold_rtx (op0, 0);
+ op0 = fold_rtx (op0, NULL_RTX);
if (op0)
op0 = equiv_constant (op0);
if (op1 && GET_CODE (op1) != REG && ! CONSTANT_P (op1))
- op1 = fold_rtx (op1, 0);
+ op1 = fold_rtx (op1, NULL_RTX);
if (op1)
op1 = equiv_constant (op1);
&& GET_MODE (SUBREG_REG (elt->exp)) == mode
&& (GET_MODE_SIZE (GET_MODE (folded_arg0))
<= UNITS_PER_WORD)
- && exp_equiv_p (elt->exp, elt->exp, 1))
+ && exp_equiv_p (elt->exp, elt->exp, 1, 0))
new = copy_rtx (SUBREG_REG (elt->exp));
if (new)
{
/* Even if we don't fold in the insn itself,
we can safely do so here, in hopes of getting a constant. */
- rtx addr = fold_rtx (XEXP (x, 0), 0);
+ rtx addr = fold_rtx (XEXP (x, 0), NULL_RTX);
rtx base = 0;
- int offset = 0;
+ HOST_WIDE_INT offset = 0;
if (GET_CODE (addr) == REG
&& REGNO_QTY_VALID_P (REGNO (addr))
&& INTVAL (inner_const) != 0)
{
int sign_bitnum = GET_MODE_BITSIZE (mode_arg0) - 1;
- int has_sign = (HOST_BITS_PER_INT >= sign_bitnum
- && (INTVAL (inner_const) & (1 << sign_bitnum)));
+ int has_sign = (HOST_BITS_PER_WIDE_INT >= sign_bitnum
+ && (INTVAL (inner_const)
+ & ((HOST_WIDE_INT) 1 << sign_bitnum)));
rtx true = const_true_rtx, false = const0_rtx;
#ifdef FLOAT_STORE_FLAG_VALUE
{
struct table_elt *elt;
- x = fold_rtx (x, 0);
+ x = fold_rtx (x, NULL_RTX);
if (CONSTANT_P (x))
return x;
new quantity number. */
if (op0_elt == 0)
{
- if (insert_regs (op0, 0, 0))
+ if (insert_regs (op0, NULL_PTR, 0))
{
rehash_using_reg (op0);
op0_hash_code = HASH (op0, mode);
}
- op0_elt = insert (op0, 0, op0_hash_code, mode);
+ op0_elt = insert (op0, NULL_PTR, op0_hash_code, mode);
op0_elt->in_memory = op0_in_memory;
op0_elt->in_struct = op0_in_struct;
}
/* Put OP1 in the hash table so it gets a new quantity number. */
if (op1_elt == 0)
{
- if (insert_regs (op1, 0, 0))
+ if (insert_regs (op1, NULL_PTR, 0))
{
rehash_using_reg (op1);
op1_hash_code = HASH (op1, mode);
}
- op1_elt = insert (op1, 0, op1_hash_code, mode);
+ op1_elt = insert (op1, NULL_PTR, op1_hash_code, mode);
op1_elt->in_memory = op1_in_memory;
op1_elt->in_struct = op1_in_struct;
}
because we have already invalidated the reg. */
if (GET_CODE (XEXP (y, 0)) == MEM)
{
- canon_reg (XEXP (y, 0), 0);
+ canon_reg (XEXP (y, 0), NULL_RTX);
note_mem_written (XEXP (y, 0), &writes_memory);
}
}
else if (GET_CODE (y) == USE
&& ! (GET_CODE (XEXP (y, 0)) == REG
&& REGNO (XEXP (y, 0)) < FIRST_PSEUDO_REGISTER))
- canon_reg (y, 0);
+ canon_reg (y, NULL_RTX);
else if (GET_CODE (y) == CALL)
{
canon_reg (y, insn);
{
if (GET_CODE (XEXP (x, 0)) == MEM)
{
- canon_reg (XEXP (x, 0), 0);
+ canon_reg (XEXP (x, 0), NULL_RTX);
note_mem_written (XEXP (x, 0), &writes_memory);
}
}
else if (GET_CODE (x) == USE
&& ! (GET_CODE (XEXP (x, 0)) == REG
&& REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER))
- canon_reg (XEXP (x, 0), 0);
+ canon_reg (XEXP (x, 0), NULL_RTX);
else if (GET_CODE (x) == CALL)
{
canon_reg (x, insn);
if (n_sets == 1 && REG_NOTES (insn) != 0)
{
/* Store the equivalent value in SRC_EQV, if different. */
- rtx tem = find_reg_note (insn, REG_EQUAL, 0);
+ rtx tem = find_reg_note (insn, REG_EQUAL, NULL_RTX);
if (tem && ! rtx_equal_p (XEXP (tem, 0), SET_SRC (sets[0].rtl)))
- src_eqv = canon_reg (XEXP (tem, 0), 0);
+ src_eqv = canon_reg (XEXP (tem, 0), NULL_RTX);
}
/* Canonicalize sources and addresses of destinations.
if (GET_CODE (src) == CONST_INT
&& GET_CODE (width) == CONST_INT
- && INTVAL (width) < HOST_BITS_PER_INT
- && (INTVAL (src) & ((-1) << INTVAL (width))))
- src_folded = gen_rtx (CONST_INT, VOIDmode,
- INTVAL (src) & ((1 << INTVAL (width)) - 1));
+ && INTVAL (width) < HOST_BITS_PER_WIDE_INT
+ && (INTVAL (src) & ((HOST_WIDE_INT) (-1) << INTVAL (width))))
+ src_folded
+ = GEN_INT (INTVAL (src) & (((HOST_WIDE_INT) 1
+ << INTVAL (width)) - 1));
}
/* Compute SRC's hash code, and also notice if it
&& GET_MODE_SIZE (mode) < UNITS_PER_WORD)
{
enum machine_mode tmode;
- rtx new_and = gen_rtx (AND, VOIDmode, 0, XEXP (src, 1));
+ rtx new_and = gen_rtx (AND, VOIDmode, NULL_RTX, XEXP (src, 1));
for (tmode = GET_MODE_WIDER_MODE (mode);
GET_MODE_SIZE (tmode) <= UNITS_PER_WORD;
if (n_sets == 1 && src_const && GET_CODE (dest) == REG
&& GET_CODE (src_const) != REG)
{
- rtx tem = find_reg_note (insn, REG_EQUAL, 0);
+ rtx tem = find_reg_note (insn, REG_EQUAL, NULL_RTX);
/* Record the actual constant value in a REG_EQUAL note, making
a new one if one does not already exist. */
&& qty_const[reg_qty[REGNO (dest)]] == const0_rtx)
{
/* See if we previously had a REG_WAS_0 note. */
- rtx note = find_reg_note (insn, REG_WAS_0, 0);
+ rtx note = find_reg_note (insn, REG_WAS_0, NULL_RTX);
rtx const_insn = qty_const_insn[reg_qty[REGNO (dest)]];
if ((tem = single_set (const_insn)) != 0
if (src_const != 0 && GET_CODE (src_const) == CONST_INT
&& GET_CODE (width) == CONST_INT
- && INTVAL (width) < HOST_BITS_PER_INT
- && ! (INTVAL (src_const) & ((-1) << INTVAL (width))))
+ && INTVAL (width) < HOST_BITS_PER_WIDE_INT
+ && ! (INTVAL (src_const)
+ & ((HOST_WIDE_INT) (-1) << INTVAL (width))))
/* Exception: if the value is constant,
and it won't be truncated, record it. */
;
&& SET_DEST (PATTERN (prev)) == SET_SRC (sets[0].rtl))
{
rtx dest = SET_DEST (sets[0].rtl);
- rtx note = find_reg_note (prev, REG_EQUIV, 0);
+ rtx note = find_reg_note (prev, REG_EQUIV, NULL_RTX);
validate_change (prev, & SET_DEST (PATTERN (prev)), dest, 1);
validate_change (insn, & SET_DEST (sets[0].rtl),
/* If there was a REG_WAS_0 note on PREV, remove it. Move
any REG_WAS_0 note on INSN to PREV. */
- note = find_reg_note (prev, REG_WAS_0, 0);
+ note = find_reg_note (prev, REG_WAS_0, NULL_RTX);
if (note)
remove_note (prev, note);
- note = find_reg_note (insn, REG_WAS_0, 0);
+ note = find_reg_note (insn, REG_WAS_0, NULL_RTX);
if (note)
{
remove_note (insn, note);
case EXPR_LIST:
case INSN_LIST:
if (REG_NOTE_KIND (x) == REG_EQUAL)
- XEXP (x, 0) = cse_process_notes (XEXP (x, 0), 0);
+ XEXP (x, 0) = cse_process_notes (XEXP (x, 0), NULL_RTX);
if (XEXP (x, 1))
- XEXP (x, 1) = cse_process_notes (XEXP (x, 1), 0);
+ XEXP (x, 1) = cse_process_notes (XEXP (x, 1), NULL_RTX);
return x;
case SIGN_EXTEND:
}
/* Otherwise, canonicalize this register. */
- return canon_reg (x, 0);
+ return canon_reg (x, NULL_RTX);
}
for (i = 0; i < GET_RTX_LENGTH (code); i++)
if (fmt[i] == 'e')
validate_change (object, &XEXP (x, i),
- cse_process_notes (XEXP (x, i), object), 0);
+ cse_process_notes (XEXP (x, i), object), NULL_RTX);
return x;
}
/* Find the largest uid. */
i = get_max_uid ();
- uid_cuid = (short *) alloca ((i + 1) * sizeof (short));
- bzero (uid_cuid, (i + 1) * sizeof (short));
+ uid_cuid = (int *) alloca ((i + 1) * sizeof (int));
+ bzero (uid_cuid, (i + 1) * sizeof (int));
/* Compute the mapping from uids to cuids.
CUIDs are numbers assigned to insns, like uids,
looking for duplicate operations. */
if (REG_NOTES (insn))
- REG_NOTES (insn) = cse_process_notes (REG_NOTES (insn), 0);
+ REG_NOTES (insn) = cse_process_notes (REG_NOTES (insn), NULL_RTX);
/* Track when we are inside in LIBCALL block. Inside such a block,
we do not want to record destinations. The last insn of a
its destination is the result of the block and hence should be
recorded. */
- if (find_reg_note (insn, REG_LIBCALL, 0))
+ if (find_reg_note (insn, REG_LIBCALL, NULL_RTX))
in_libcall_block = 1;
- else if (find_reg_note (insn, REG_RETVAL, 0))
+ else if (find_reg_note (insn, REG_RETVAL, NULL_RTX))
in_libcall_block = 0;
cse_insn (insn, in_libcall_block);
/* Don't delete any insns that are part of a libcall block.
Flow or loop might get confused if we did that. Remember
that we are scanning backwards. */
- if (find_reg_note (insn, REG_RETVAL, 0))
+ if (find_reg_note (insn, REG_RETVAL, NULL_RTX))
in_libcall = 1;
if (in_libcall)
delete_insn (insn);
}
- if (find_reg_note (insn, REG_LIBCALL, 0))
+ if (find_reg_note (insn, REG_LIBCALL, NULL_RTX))
in_libcall = 0;
}
}
if (! optimize)
output_loc_descriptor
- (eliminate_regs (SAVE_EXPR_RTL (bound), 0, 0));
+ (eliminate_regs (SAVE_EXPR_RTL (bound), 0, NULL_RTX));
ASM_OUTPUT_LABEL (asm_out_file, end_label);
}
declaration, but not a definition. So sayeth the PLSIG. */
if (! is_pseudo_reg (rtl))
- output_loc_descriptor (eliminate_regs (rtl, 0, 0));
+ output_loc_descriptor (eliminate_regs (rtl, 0, NULL_RTX));
ASM_OUTPUT_LABEL (asm_out_file, end_label);
}
simplicity we always just output CONST_DOUBLEs using 8 bytes. */
ASM_OUTPUT_DWARF_DATA8 (asm_out_file,
- (unsigned) CONST_DOUBLE_HIGH (rtl),
- (unsigned) CONST_DOUBLE_LOW (rtl));
+ (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (rtl),
+ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (rtl));
break;
case CONST_STRING:
fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SECTION);
finalizing = set_finalizing;
- output_decl (decl, NULL);
+ output_decl (decl, NULL_TREE);
/* NOTE: The call above to `output_decl' may have caused one or more
file-scope named types (i.e. tagged types) to be placed onto the
`output_pending_types_for_scope' takes them off of the list and un-sets
their TREE_ASM_WRITTEN flags. */
- output_pending_types_for_scope (NULL);
+ output_pending_types_for_scope (NULL_TREE);
/* The above call should have totally emptied the pending_types_list. */
if (code == CONST_INT)
{
- int arg = va_arg (p, int);
+ HOST_WIDE_INT arg = va_arg (p, HOST_WIDE_INT);
if (arg >= - MAX_SAVED_CONST_INT && arg <= MAX_SAVED_CONST_INT)
return const_int_rtx[arg + MAX_SAVED_CONST_INT];
XINT (rt_val, i) = va_arg (p, int);
break;
+ case 'w': /* A wide integer? */
+ XWINT (rt_val, i) = va_arg (p, HOST_WIDE_INT);
+ break;
+
case 's': /* A string? */
XSTR (rt_val, i) = va_arg (p, char *);
break;
either a reasonable negative value or a reasonable unsigned value
for this mode. */
- if (GET_MODE_BITSIZE (mode) == 2 * HOST_BITS_PER_INT)
+ if (GET_MODE_BITSIZE (mode) == 2 * HOST_BITS_PER_WIDE_INT)
return x;
- else if (GET_MODE_BITSIZE (mode) > HOST_BITS_PER_INT)
+ else if (GET_MODE_BITSIZE (mode) > HOST_BITS_PER_WIDE_INT)
return 0;
- else if (GET_MODE_BITSIZE (mode) == HOST_BITS_PER_INT)
+ else if (GET_MODE_BITSIZE (mode) == HOST_BITS_PER_WIDE_INT)
return (GET_CODE (x) == CONST_INT ? x
- : gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (x)));
+ : GEN_INT (CONST_DOUBLE_LOW (x)));
else
{
/* MODE must be narrower than HOST_BITS_PER_INT. */
int width = GET_MODE_BITSIZE (mode);
- int val = (GET_CODE (x) == CONST_INT ? INTVAL (x)
- : CONST_DOUBLE_LOW (x));
+ HOST_WIDE_INT val = (GET_CODE (x) == CONST_INT ? INTVAL (x)
+ : CONST_DOUBLE_LOW (x));
- if (((val & ((-1) << (width - 1))) != ((-1) << (width - 1))))
- val &= (1 << width) - 1;
+ if (((val & ((HOST_WIDE_INT) (-1) << (width - 1)))
+ != ((HOST_WIDE_INT) (-1) << (width - 1))))
+ val &= ((HOST_WIDE_INT) 1 << width) - 1;
return (GET_CODE (x) == CONST_INT && INTVAL (x) == val ? x
- : gen_rtx (CONST_INT, VOIDmode, val));
+ : GEN_INT (val));
}
}
different. */
else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_INT == BITS_PER_WORD)
+ && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
|| flag_pretend_float)
&& GET_MODE_CLASS (mode) == MODE_FLOAT
&& GET_MODE_SIZE (mode) == UNITS_PER_WORD
&& GET_CODE (x) == CONST_INT
- && sizeof (float) * HOST_BITS_PER_CHAR == HOST_BITS_PER_INT)
+ && sizeof (float) * HOST_BITS_PER_CHAR == HOST_BITS_PER_WIDE_INT)
{
- union {int i; float d; } u;
+ union {HOST_WIDE_INT i; float d; } u;
u.i = INTVAL (x);
return immed_real_const_1 (u.d, mode);
}
else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_INT == BITS_PER_WORD)
+ && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
|| flag_pretend_float)
&& GET_MODE_CLASS (mode) == MODE_FLOAT
&& GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
&& (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE)
&& GET_MODE (x) == VOIDmode
- && sizeof (double) * HOST_BITS_PER_CHAR == 2 * HOST_BITS_PER_INT)
+ && (sizeof (double) * HOST_BITS_PER_CHAR
+ == 2 * HOST_BITS_PER_WIDE_INT))
{
- union {int i[2]; double d; } u;
- int low, high;
+ union {HOST_WIDE_INT i[2]; double d; } u;
+ HOST_WIDE_INT low, high;
if (GET_CODE (x) == CONST_INT)
- low = INTVAL (x), high = low >> (HOST_BITS_PER_INT -1);
+ low = INTVAL (x), high = low >> (HOST_BITS_PER_WIDE_INT -1);
else
low = CONST_DOUBLE_LOW (x), high = CONST_DOUBLE_HIGH (x);
compatible. */
else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_INT == BITS_PER_WORD)
+ && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
|| flag_pretend_float)
&& GET_MODE_CLASS (mode) == MODE_INT
&& GET_CODE (x) == CONST_DOUBLE
compatible. */
else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_INT == BITS_PER_WORD)
+ && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
|| flag_pretend_float)
&& GET_MODE_CLASS (mode) == MODE_INT
&& GET_CODE (x) == CONST_DOUBLE
int validate_address;
enum machine_mode mode;
{
- int val;
- int size_ratio = HOST_BITS_PER_INT / BITS_PER_WORD;
+ HOST_WIDE_INT val;
+ int size_ratio = HOST_BITS_PER_WIDE_INT / BITS_PER_WORD;
if (mode == VOIDmode)
mode = GET_MODE (op);
target floating formats are the same, handling two-word floating
constants are easy. */
if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_INT == BITS_PER_WORD)
+ && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
|| flag_pretend_float)
&& GET_MODE_CLASS (mode) == MODE_FLOAT
&& GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
&& GET_CODE (op) == CONST_DOUBLE)
- return gen_rtx (CONST_INT, VOIDmode,
- i ^ (WORDS_BIG_ENDIAN !=
+ return GEN_INT (i ^ (WORDS_BIG_ENDIAN !=
/* The constant is stored in the host's word-ordering,
but we want to access it in the target's word-ordering. */
#ifdef HOST_WORDS_BIG_ENDIAN
values often do not have the same high-order bits. We have already
verified that we want the only defined word of the single-word value. */
if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_INT == BITS_PER_WORD)
+ && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
|| flag_pretend_float)
&& GET_MODE_CLASS (mode) == MODE_FLOAT
&& GET_MODE_SIZE (mode) == UNITS_PER_WORD
&& GET_CODE (op) == CONST_DOUBLE)
{
double d;
- union {float f; int i; } u;
+ union {float f; HOST_WIDE_INT i; } u;
REAL_VALUE_FROM_CONST_DOUBLE (d, op);
u.f = d;
- return gen_rtx (CONST_INT, VOIDmode, u.i);
+ return GEN_INT (u.i);
}
/* The only remaining cases that we can handle are integers.
? (INTVAL (op) < 0 ? ~0 : 0) : CONST_DOUBLE_HIGH (op)));
/* If BITS_PER_WORD is smaller than an int, get the appropriate bits. */
- if (BITS_PER_WORD < HOST_BITS_PER_INT)
+ if (BITS_PER_WORD < HOST_BITS_PER_WIDE_INT)
val = ((val >> ((i % size_ratio) * BITS_PER_WORD))
- & ((1 << (BITS_PER_WORD % HOST_BITS_PER_INT)) - 1));
+ & (((HOST_WIDE_INT) 1
+ << (BITS_PER_WORD % HOST_BITS_PER_WIDE_INT)) - 1));
- return gen_rtx (CONST_INT, VOIDmode, val);
+ return GEN_INT (val);
}
/* Similar to `operand_subword', but never return 0. If we can't extract
rtx
gen_label_rtx ()
{
- register rtx label = gen_rtx (CODE_LABEL, VOIDmode, 0, 0, 0, label_num++, 0);
+ register rtx label = gen_rtx (CODE_LABEL, VOIDmode, 0, 0, 0,
+ label_num++, NULL_PTR);
LABEL_NUSES (label) = 0;
return label;
}
rtx original_decl_initial;
{
rtx header = gen_rtx (INLINE_HEADER, VOIDmode,
- cur_insn_uid++, NULL,
+ cur_insn_uid++, NULL_RTX,
first_insn, first_parm_insn,
first_labelno, last_labelno,
max_parm_regnum, max_regnum, args_size, pops_args,
next_cc0_user (insn)
rtx insn;
{
- rtx note = find_reg_note (insn, REG_CC_USER, 0);
+ rtx note = find_reg_note (insn, REG_CC_USER, NULL_RTX);
if (note)
return XEXP (note, 0);
prev_cc0_setter (insn)
rtx insn;
{
- rtx note = find_reg_note (insn, REG_CC_SETTER, 0);
+ rtx note = find_reg_note (insn, REG_CC_SETTER, NULL_RTX);
rtx link;
if (note)
}
else
{
- insn = make_insn_raw (pattern, 0);
+ insn = make_insn_raw (pattern, NULL_RTVEC);
add_insn_after (insn, PREV_INSN (before));
}
insn = emit_insn_before (pattern, before);
else
{
- insn = make_jump_insn_raw (pattern, 0);
+ insn = make_jump_insn_raw (pattern, NULL_RTVEC);
add_insn_after (insn, PREV_INSN (before));
}
}
else
{
- insn = make_insn_raw (pattern, 0);
+ insn = make_insn_raw (pattern, NULL_RTVEC);
add_insn_after (insn, after);
}
insn = emit_insn_after (pattern, after);
else
{
- insn = make_jump_insn_raw (pattern, 0);
+ insn = make_jump_insn_raw (pattern, NULL_RTVEC);
add_insn_after (insn, after);
}
}
else
{
- insn = make_insn_raw (pattern, NULL);
+ insn = make_insn_raw (pattern, NULL_RTVEC);
add_insn (insn);
}
return emit_insn (pattern);
else
{
- register rtx insn = make_jump_insn_raw (pattern, NULL);
+ register rtx insn = make_jump_insn_raw (pattern, NULL_RTVEC);
add_insn (insn);
return insn;
}
return emit_insn (pattern);
else
{
- register rtx insn = make_insn_raw (pattern, NULL);
+ register rtx insn = make_insn_raw (pattern, NULL_RTVEC);
add_insn (insn);
PUT_CODE (insn, CALL_INSN);
return insn;
}
/* These four calls obtain some of the rtx expressions made above. */
- const0_rtx = gen_rtx (CONST_INT, VOIDmode, 0);
- const1_rtx = gen_rtx (CONST_INT, VOIDmode, 1);
- const2_rtx = gen_rtx (CONST_INT, VOIDmode, 2);
- constm1_rtx = gen_rtx (CONST_INT, VOIDmode, -1);
+ const0_rtx = GEN_INT (0);
+ const1_rtx = GEN_INT (1);
+ const2_rtx = GEN_INT (2);
+ constm1_rtx = GEN_INT (-1);
/* This will usually be one of the above constants, but may be a new rtx. */
- const_true_rtx = gen_rtx (CONST_INT, VOIDmode, STORE_FLAG_VALUE);
+ const_true_rtx = GEN_INT (STORE_FLAG_VALUE);
dconst0 = REAL_VALUE_ATOF ("0");
dconst1 = REAL_VALUE_ATOF ("1");
const_tiny_rtx[i][(int) mode] = tem;
}
- const_tiny_rtx[i][(int) VOIDmode] = gen_rtx (CONST_INT, VOIDmode, i);
+ const_tiny_rtx[i][(int) VOIDmode] = GEN_INT (i);
for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
- const_tiny_rtx[i][(int) mode] = gen_rtx (CONST_INT, VOIDmode, i);
+ const_tiny_rtx[i][(int) mode] = GEN_INT (i);
}
stack_pointer_rtx = gen_rtx (REG, Pmode, STACK_POINTER_REGNUM);
rtx var, body;
{
pending_chain = gen_rtx (QUEUED, GET_MODE (var),
- var, 0, 0, body, pending_chain);
+ var, NULL_RTX, NULL_RTX, body, pending_chain);
return pending_chain;
}
&& insn_operand_mode[(int) CODE_FOR_slt][0] == word_mode
&& STORE_FLAG_VALUE == -1)
{
- emit_cmp_insn (lowfrom, const0_rtx, NE, 0, lowpart_mode, 0, 0);
+ emit_cmp_insn (lowfrom, const0_rtx, NE, NULL_RTX,
+ lowpart_mode, 0, 0);
fill_value = gen_reg_rtx (word_mode);
emit_insn (gen_slt (fill_value));
}
fill_value
= expand_shift (RSHIFT_EXPR, lowpart_mode, lowfrom,
size_int (GET_MODE_BITSIZE (lowpart_mode) - 1),
- 0, 0);
+ NULL_RTX, 0);
fill_value = convert_to_mode (word_mode, fill_value, 1);
}
}
insns = get_insns ();
end_sequence ();
- emit_no_conflict_block (insns, to, from, 0,
+ emit_no_conflict_block (insns, to, from, NULL_RTX,
gen_rtx (equiv_code, to_mode, from));
return;
}
return x;
/* There is one case that we must handle specially: If we are converting
- a CONST_INT into a mode whose size is twice HOST_BITS_PER_INT and
+ a CONST_INT into a mode whose size is twice HOST_BITS_PER_WIDE_INT and
we are to interpret the constant as unsigned, gen_lowpart will do
the wrong if the constant appears negative. What we want to do is
make the high-order word of the constant zero, not all ones. */
if (unsignedp && GET_MODE_CLASS (mode) == MODE_INT
- && GET_MODE_BITSIZE (mode) == 2 * HOST_BITS_PER_INT
+ && GET_MODE_BITSIZE (mode) == 2 * HOST_BITS_PER_WIDE_INT
&& GET_CODE (x) == CONST_INT && INTVAL (x) < 0)
- return immed_double_const (INTVAL (x), 0, mode);
+ return immed_double_const (INTVAL (x), (HOST_WIDE_INT) 0, mode);
/* We can do this with a gen_lowpart if both desired and current modes
are integer, and this is either a constant integer, a register, or a
#ifdef HAVE_PRE_DECREMENT
if (data->explicit_inc_to < 0)
- emit_insn (gen_add2_insn (data->to_addr,
- gen_rtx (CONST_INT, VOIDmode, -size)));
+ emit_insn (gen_add2_insn (data->to_addr, GEN_INT (-size)));
if (data->explicit_inc_from < 0)
- emit_insn (gen_add2_insn (data->from_addr,
- gen_rtx (CONST_INT, VOIDmode, -size)));
+ emit_insn (gen_add2_insn (data->from_addr, GEN_INT (-size)));
#endif
emit_insn ((*genfun) (to1, from1));
#ifdef HAVE_POST_INCREMENT
if (data->explicit_inc_to > 0)
- emit_insn (gen_add2_insn (data->to_addr,
- gen_rtx (CONST_INT, VOIDmode, size)));
+ emit_insn (gen_add2_insn (data->to_addr, GEN_INT (size)));
if (data->explicit_inc_from > 0)
- emit_insn (gen_add2_insn (data->from_addr,
- gen_rtx (CONST_INT, VOIDmode, size)));
+ emit_insn (gen_add2_insn (data->from_addr, GEN_INT (size)));
#endif
if (! data->reverse) data->offset += size;
abort ();
if (GET_CODE (size) == CONST_INT
- && (move_by_pieces_ninsns ((unsigned) INTVAL (size), align)
- < MOVE_RATIO))
+ && (move_by_pieces_ninsns (INTVAL (size), align) < MOVE_RATIO))
move_by_pieces (x, y, INTVAL (size), align);
else
{
&& ((unsigned) INTVAL (size)
< (1 << (GET_MODE_BITSIZE (QImode) - 1))))
{
- rtx insn = gen_movstrqi (x, y, size,
- gen_rtx (CONST_INT, VOIDmode, align));
+ rtx insn = gen_movstrqi (x, y, size, GEN_INT (align));
if (insn)
{
emit_insn (insn);
&& ((unsigned) INTVAL (size)
< (1 << (GET_MODE_BITSIZE (HImode) - 1))))
{
- rtx insn = gen_movstrhi (x, y, size,
- gen_rtx (CONST_INT, VOIDmode, align));
+ rtx insn = gen_movstrhi (x, y, size, GEN_INT (align));
if (insn)
{
emit_insn (insn);
#ifdef HAVE_movstrsi
if (HAVE_movstrsi)
{
- rtx insn = gen_movstrsi (x, y, size,
- gen_rtx (CONST_INT, VOIDmode, align));
+ rtx insn = gen_movstrsi (x, y, size, GEN_INT (align));
if (insn)
{
emit_insn (insn);
#ifdef HAVE_movstrdi
if (HAVE_movstrdi)
{
- rtx insn = gen_movstrdi (x, y, size,
- gen_rtx (CONST_INT, VOIDmode, align));
+ rtx insn = gen_movstrdi (x, y, size, GEN_INT (align));
if (insn)
{
emit_insn (insn);
#ifdef HAVE_load_multiple
last = get_last_insn ();
pat = gen_load_multiple (gen_rtx (REG, word_mode, regno), x,
- gen_rtx (CONST_INT, VOIDmode, nregs));
+ GEN_INT (nregs));
if (pat)
{
emit_insn (pat);
#ifdef HAVE_store_multiple
last = get_last_insn ();
pat = gen_store_multiple (x, gen_rtx (REG, word_mode, regno),
- gen_rtx (CONST_INT, VOIDmode, nregs));
+ GEN_INT (nregs));
if (pat)
{
emit_insn (pat);
emit_library_call (memset_libfunc, 1,
VOIDmode, 3,
XEXP (object, 0), Pmode, const0_rtx, Pmode,
- gen_rtx (CONST_INT, VOIDmode, size), Pmode);
+ GEN_INT (size), Pmode);
#else
emit_library_call (bzero_libfunc, 1,
VOIDmode, 2,
XEXP (object, 0), Pmode,
- gen_rtx (CONST_INT, VOIDmode, size), Pmode);
+ GEN_INT (size), Pmode);
#endif
}
else
{
rtx temp = copy_to_mode_reg (Pmode, size);
if (extra != 0)
- temp = expand_binop (Pmode, add_optab,
- temp,
- gen_rtx (CONST_INT, VOIDmode, extra),
+ temp = expand_binop (Pmode, add_optab, temp, GEN_INT (extra),
temp, 0, OPTAB_LIB_WIDEN);
anti_adjust_stack (temp);
}
But if space already allocated, this has already been done. */
if (extra && args_addr == 0
&& where_pad != none && where_pad != stack_direction)
- anti_adjust_stack (gen_rtx (CONST_INT, VOIDmode, extra));
+ anti_adjust_stack (GEN_INT (extra));
move_by_pieces (gen_rtx (MEM, BLKmode, gen_push_operand ()), xinner,
INTVAL (size) - used, align);
if (partial != 0)
{
if (GET_CODE (size) == CONST_INT)
- size = gen_rtx (CONST_INT, VOIDmode, INTVAL (size) - used);
+ size = GEN_INT (INTVAL (size) - used);
else
size = expand_binop (GET_MODE (size), sub_optab, size,
- gen_rtx (CONST_INT, VOIDmode, used),
- 0, 0, OPTAB_LIB_WIDEN);
+ GEN_INT (used), NULL_RTX, 0,
+ OPTAB_LIB_WIDEN);
}
/* Get the address of the stack space.
< (1 << (GET_MODE_BITSIZE (QImode) - 1))))
{
emit_insn (gen_movstrqi (gen_rtx (MEM, BLKmode, temp),
- xinner, size,
- gen_rtx (CONST_INT, VOIDmode, align)));
+ xinner, size, GEN_INT (align)));
goto ret;
}
#endif
< (1 << (GET_MODE_BITSIZE (HImode) - 1))))
{
emit_insn (gen_movstrhi (gen_rtx (MEM, BLKmode, temp),
- xinner, size,
- gen_rtx (CONST_INT, VOIDmode, align)));
+ xinner, size, GEN_INT (align)));
goto ret;
}
#endif
if (HAVE_movstrsi)
{
emit_insn (gen_movstrsi (gen_rtx (MEM, BLKmode, temp),
- xinner, size,
- gen_rtx (CONST_INT, VOIDmode, align)));
+ xinner, size, GEN_INT (align)));
goto ret;
}
#endif
if (HAVE_movstrdi)
{
emit_insn (gen_movstrdi (gen_rtx (MEM, BLKmode, temp),
- xinner, size,
- gen_rtx (CONST_INT, VOIDmode, align)));
+ xinner, size, GEN_INT (align)));
goto ret;
}
#endif
But if space already allocated, this has already been done. */
if (extra && args_addr == 0
&& where_pad != none && where_pad != stack_direction)
- anti_adjust_stack (gen_rtx (CONST_INT, VOIDmode, extra));
+ anti_adjust_stack (GEN_INT (extra));
/* If we make space by pushing it, we might as well push
the real data. Otherwise, we can leave OFFSET nonzero
#endif
if (i >= not_stack + offset)
emit_push_insn (operand_subword_force (x, i, mode),
- word_mode, 0, 0, align, 0, 0, 0, args_addr,
- gen_rtx (CONST_INT, VOIDmode,
- args_offset + ((i - not_stack + skip)
+ word_mode, NULL_TREE, NULL_RTX, align, 0, NULL_RTX,
+ 0, args_addr,
+ GEN_INT (args_offset + ((i - not_stack + skip)
* UNITS_PER_WORD)));
}
else
But if space already allocated, this has already been done. */
if (extra && args_addr == 0
&& where_pad != none && where_pad != stack_direction)
- anti_adjust_stack (gen_rtx (CONST_INT, VOIDmode, extra));
+ anti_adjust_stack (GEN_INT (extra));
#ifdef PUSH_ROUNDING
if (args_addr == 0)
move_block_to_reg (REGNO (reg), x, partial, mode);
if (extra && args_addr == 0 && where_pad == stack_direction)
- anti_adjust_stack (gen_rtx (CONST_INT, VOIDmode, extra));
+ anti_adjust_stack (GEN_INT (extra));
}
\f
/* Output a library call to function FUN (a SYMBOL_REF rtx)
/* Make sure it is a reasonable operand for a move or push insn. */
if (GET_CODE (val) != REG && GET_CODE (val) != MEM
&& ! (CONSTANT_P (val) && LEGITIMATE_CONSTANT_P (val)))
- val = force_operand (val, 0);
+ val = force_operand (val, NULL_RTX);
argvec[count].value = val;
argvec[count].mode = mode;
#ifdef FUNCTION_ARG_PASS_BY_REFERENCE
- if (FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, mode, (tree)0, 1))
+ if (FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, mode, NULL_TREE, 1))
abort ();
#endif
- argvec[count].reg = FUNCTION_ARG (args_so_far, mode, (tree)0, 1);
+ argvec[count].reg = FUNCTION_ARG (args_so_far, mode, NULL_TREE, 1);
if (argvec[count].reg && GET_CODE (argvec[count].reg) == EXPR_LIST)
abort ();
#ifdef FUNCTION_ARG_PARTIAL_NREGS
argvec[count].partial
- = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, mode, (tree)0, 1);
+ = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, mode, NULL_TREE, 1);
#else
argvec[count].partial = 0;
#endif
- locate_and_pad_parm (mode, 0,
+ locate_and_pad_parm (mode, NULL_TREE,
argvec[count].reg && argvec[count].partial == 0,
- 0, &args_size, &argvec[count].offset,
+ NULL_TREE, &args_size, &argvec[count].offset,
&argvec[count].size);
if (argvec[count].size.var)
#endif
#ifndef PUSH_ROUNDING
- argblock = push_block (gen_rtx (CONST_INT, VOIDmode, args_size.constant),
- 0, 0);
+ argblock = push_block (GEN_INT (args_size.constant), 0, 0);
#endif
#ifdef PUSH_ARGS_REVERSED
int partial = argvec[argnum].partial;
if (! (reg != 0 && partial == 0))
- emit_push_insn (val, mode, 0, 0, 0, partial, reg, 0, argblock,
- gen_rtx (CONST_INT, VOIDmode,
- argvec[count].offset.constant));
+ emit_push_insn (val, mode, NULL_TREE, NULL_RTX, 0, partial, reg, 0,
+ argblock, GEN_INT (argvec[count].offset.constant));
NO_DEFER_POP;
}
use_insns = get_insns ();
end_sequence ();
- fun = prepare_call_address (fun, 0, &use_insns);
+ fun = prepare_call_address (fun, NULL_TREE, &use_insns);
/* Don't allow popping to be deferred, since then
cse'ing of library calls could delete a call and leave the pop. */
emit_call_1 (fun, get_identifier (XSTR (orgfun, 0)), args_size.constant, 0,
FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1),
- outmode != VOIDmode ? hard_libcall_value (outmode) : 0,
+ outmode != VOIDmode ? hard_libcall_value (outmode) : NULL_RTX,
old_inhibit_defer_pop + 1, use_insns, no_queue);
/* Now restore inhibit_defer_pop to its actual original value. */
/* Don't crash if the lhs of the assignment was erroneous. */
if (TREE_CODE (to) == ERROR_MARK)
- return expand_expr (from, 0, VOIDmode, 0);
+ return expand_expr (from, NULL_RTX, VOIDmode, 0);
/* Assignment of a structure component needs special treatment
if the structure component's rtx is not simply a MEM.
if (mode1 == VOIDmode && want_value)
tem = stabilize_reference (tem);
- to_rtx = expand_expr (tem, 0, VOIDmode, 0);
+ to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, 0);
if (offset != 0)
{
- rtx offset_rtx = expand_expr (offset, 0, VOIDmode, 0);
+ rtx offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode, 0);
if (GET_CODE (to_rtx) != MEM)
abort ();
Don't re-expand if it was expanded already (in COMPONENT_REF case). */
if (to_rtx == 0)
- to_rtx = expand_expr (to, 0, VOIDmode, 0);
+ to_rtx = expand_expr (to, NULL_RTX, VOIDmode, 0);
/* In case we are returning the contents of an object which overlaps
the place the value is being stored, use a safe function when copying
&& current_function_returns_struct
&& !current_function_returns_pcc_struct)
{
- rtx from_rtx = expand_expr (from, 0, VOIDmode, 0);
+ rtx from_rtx = expand_expr (from, NULL_RTX, VOIDmode, 0);
rtx size = expr_size (from);
#ifdef TARGET_MEM_FUNCTIONS
if EXP is another assignment, SUGGEST_REG will be nonzero for it.
We know expand_expr will not use the target in that case. */
{
- temp = expand_expr (exp, cse_not_expected ? 0 : target,
+ temp = expand_expr (exp, cse_not_expected ? NULL_RTX : target,
GET_MODE (target), 0);
if (GET_MODE (temp) != BLKmode && GET_MODE (temp) != VOIDmode)
temp = copy_to_reg (temp);
temp = expand_expr (exp, temp, GET_MODE (target), 0);
}
else
- temp = expand_expr (exp, 0, GET_MODE (target), 0);
+ temp = expand_expr (exp, NULL_RTX, GET_MODE (target), 0);
dont_return_target = 1;
}
else
size_int (BITS_PER_UNIT)),
convert (sizetype,
build_int_2 (TREE_STRING_LENGTH (exp), 0))));
- rtx copy_size_rtx = expand_expr (copy_size, 0, VOIDmode, 0);
+ rtx copy_size_rtx = expand_expr (copy_size, NULL_RTX,
+ VOIDmode, 0);
rtx label = 0;
/* Copy that much. */
temp = force_reg (Pmode, XEXP (target, 0));
temp = expand_binop (size_mode, add_optab, temp,
- copy_size_rtx, 0, 0, OPTAB_LIB_WIDEN);
+ copy_size_rtx, NULL_RTX, 0,
+ OPTAB_LIB_WIDEN);
size = expand_binop (size_mode, sub_optab, size,
- copy_size_rtx, 0, 0, OPTAB_LIB_WIDEN);
+ copy_size_rtx, NULL_RTX, 0,
+ OPTAB_LIB_WIDEN);
- emit_cmp_insn (size, const0_rtx, LT, 0,
+ emit_cmp_insn (size, const0_rtx, LT, NULL_RTX,
GET_MODE (size), 0, 0);
label = gen_label_rtx ();
emit_jump_insn (gen_blt (label));
register tree elt;
register int i;
tree domain = TYPE_DOMAIN (type);
- int minelt = TREE_INT_CST_LOW (TYPE_MIN_VALUE (domain));
- int maxelt = TREE_INT_CST_LOW (TYPE_MAX_VALUE (domain));
+ HOST_WIDE_INT minelt = TREE_INT_CST_LOW (TYPE_MIN_VALUE (domain));
+ HOST_WIDE_INT maxelt = TREE_INT_CST_LOW (TYPE_MAX_VALUE (domain));
tree elttype = TREE_TYPE (type);
/* If the constructor has fewer fields than the structure,
int align;
int total_size;
{
- int width_mask = 0;
+ HOST_WIDE_INT width_mask = 0;
- if (bitsize < HOST_BITS_PER_INT)
- width_mask = (1 << bitsize) - 1;
+ if (bitsize < HOST_BITS_PER_WIDE_INT)
+ width_mask = ((HOST_WIDE_INT) 1 << bitsize) - 1;
/* If we are storing into an unaligned field of an aligned union that is
in a register, we may have the mode of TARGET being an integer mode but
|| GET_CODE (target) == REG
|| GET_CODE (target) == SUBREG)
{
- rtx temp = expand_expr (exp, 0, VOIDmode, 0);
+ rtx temp = expand_expr (exp, NULL_RTX, VOIDmode, 0);
/* Store the value in the bitfield. */
store_bit_field (target, bitsize, bitpos, mode, temp, align, total_size);
if (value_mode != VOIDmode)
/* If possible, avoid refetching from the bitfield itself. */
if (width_mask != 0
&& ! (GET_CODE (target) == MEM && MEM_VOLATILE_P (target)))
- return expand_and (temp,
- gen_rtx (CONST_INT, VOIDmode, width_mask), 0);
+ return expand_and (temp, GEN_INT (width_mask), NULL_RTX);
return extract_bit_field (target, bitsize, bitpos, unsignedp,
- 0, value_mode, 0, align, total_size);
+ NULL_RTX, value_mode, 0, align,
+ total_size);
}
return const0_rtx;
}
subtarget = 0;
tmp = force_operand (XEXP (value, 0), subtarget);
return expand_mult (GET_MODE (value), tmp,
- force_operand (op2, 0),
+ force_operand (op2, NULL_RTX),
target, 0);
}
tmp = force_operand (XEXP (value, 0), subtarget);
return expand_binop (GET_MODE (value), binoptab, tmp,
- force_operand (op2, 0),
+ force_operand (op2, NULL_RTX),
target, 0, OPTAB_LIB_WIDEN);
/* We give UNSIGNEP = 0 to expand_binop
because the only operations we are expanding here are signed ones. */
{
tree part = TREE_VALUE (tail);
tree part_type = TREE_TYPE (part);
- tree to_be_saved = build (COMPONENT_REF, part_type, lhs, part, 0);
+ tree to_be_saved = build (COMPONENT_REF, part_type, lhs, part);
rtx target = assign_stack_temp (TYPE_MODE (part_type),
int_size_in_bytes (part_type), 0);
if (! memory_address_p (TYPE_MODE (part_type), XEXP (target, 0)))
- target = change_address (target, TYPE_MODE (part_type), 0);
+ target = change_address (target, TYPE_MODE (part_type), NULL_RTX);
parts = tree_cons (to_be_saved,
- build (RTL_EXPR, part_type, 0, (tree) target),
+ build (RTL_EXPR, part_type, NULL_TREE,
+ (tree) target),
parts);
store_expr (TREE_PURPOSE (parts), RTL_EXPR_RTL (TREE_VALUE (parts)), 0);
}
{
tree part = TREE_VALUE (tail);
tree part_type = TREE_TYPE (part);
- tree to_be_initialized = build (COMPONENT_REF, part_type, lhs, part, 0);
+ tree to_be_initialized = build (COMPONENT_REF, part_type, lhs, part);
parts = tree_cons (TREE_PURPOSE (tail), to_be_initialized, parts);
}
return parts;
/* Exit the current loop if the body-expression is true. */
{
rtx label = gen_label_rtx ();
- do_jump (TREE_OPERAND (exp, 0), label, 0);
- expand_exit_loop (0);
+ do_jump (TREE_OPERAND (exp, 0), label, NULL_RTX);
+ expand_exit_loop (NULL_PTR);
emit_label (label);
}
return const0_rtx;
&& TYPE_MODE (TREE_TYPE (exp1)) == Pmode
&& TYPE_MODE (TREE_TYPE (exp2)) == Pmode)
{
- temp = expand_expr (TREE_OPERAND (exp1, 0), 0, VOIDmode, EXPAND_SUM);
+ temp = expand_expr (TREE_OPERAND (exp1, 0), NULL_RTX,
+ VOIDmode, EXPAND_SUM);
op0 = memory_address (mode, temp);
op0 = copy_all_regs (op0);
SAVE_EXPR_RTL (exp1) = op0;
}
else
{
- op0 = expand_expr (exp1, 0, VOIDmode, EXPAND_SUM);
+ op0 = expand_expr (exp1, NULL_RTX, VOIDmode, EXPAND_SUM);
op0 = memory_address (mode, op0);
}
else if (TREE_CODE (init) == STRING_CST
&& i < TREE_STRING_LENGTH (init))
{
- temp = gen_rtx (CONST_INT, VOIDmode,
- TREE_STRING_POINTER (init)[i]);
+ temp = GEN_INT (TREE_STRING_POINTER (init)[i]);
return convert_to_mode (mode, temp, 0);
}
}
/* In some cases, we will be offsetting OP0's address by a constant.
So get it as a sum, if possible. If we will be using it
directly in an insn, we validate it. */
- op0 = expand_expr (tem, 0, VOIDmode, EXPAND_SUM);
+ op0 = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_SUM);
/* If this is a constant, put it into a register if it is a
legimate constant and memory if it isn't. */
if (offset != 0)
{
- rtx offset_rtx = expand_expr (offset, 0, VOIDmode, 0);
+ rtx offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode, 0);
if (GET_CODE (op0) != MEM)
abort ();
{
tree base = build_unary_op (ADDR_EXPR, TREE_OPERAND (exp, 0), 0);
tree addr = build (PLUS_EXPR, type, base, TREE_OPERAND (exp, 1));
- op0 = expand_expr (addr, 0, VOIDmode, EXPAND_SUM);
+ op0 = expand_expr (addr, NULL_RTX, VOIDmode, EXPAND_SUM);
temp = gen_rtx (MEM, mode, memory_address (mode, op0));
MEM_IN_STRUCT_P (temp) = 1;
MEM_VOLATILE_P (temp) = TREE_THIS_VOLATILE (exp) || flag_volatile;
{
RTL_EXPR_RTL (exp)
= expand_expr (TREE_OPERAND (exp, 0), target, tmode, modifier);
- cleanups_this_call = tree_cons (0, TREE_OPERAND (exp, 2), cleanups_this_call);
+ cleanups_this_call
+ = tree_cons (NULL_TREE, TREE_OPERAND (exp, 2), cleanups_this_call);
/* That's it for this cleanup. */
TREE_OPERAND (exp, 2) = 0;
}
if (GET_CODE (target) == MEM)
/* Store data into beginning of memory target. */
store_expr (TREE_OPERAND (exp, 0),
- change_address (target, TYPE_MODE (valtype), 0), 0);
+ change_address (target, TYPE_MODE (valtype), 0),
+ NULL_RTX);
else if (GET_CODE (target) == REG)
/* Store this field into a union of the proper type. */
store_field (target, GET_MODE_BITSIZE (TYPE_MODE (valtype)), 0,
/* Return the entire union. */
return target;
}
- op0 = expand_expr (TREE_OPERAND (exp, 0), 0, mode, 0);
+ op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, mode, 0);
if (GET_MODE (op0) == mode || GET_MODE (op0) == VOIDmode)
return op0;
if (flag_force_mem && GET_CODE (op0) == MEM)
If this is an EXPAND_SUM call, always return the sum. */
if (TREE_CODE (TREE_OPERAND (exp, 0)) == INTEGER_CST
- && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_INT
+ && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
&& (modifier == EXPAND_SUM || modifier == EXPAND_INITIALIZER
|| mode == Pmode))
{
subtarget = 0;
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, modifier);
- op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, modifier);
+ op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, modifier);
/* Make sure any term that's a sum with a constant comes last. */
if (GET_CODE (op0) == PLUS
&& really_constant_p (TREE_OPERAND (exp, 0))
&& really_constant_p (TREE_OPERAND (exp, 1)))
{
- rtx op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode, modifier);
- rtx op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, modifier);
+ rtx op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX,
+ VOIDmode, modifier);
+ rtx op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX,
+ VOIDmode, modifier);
return gen_rtx (MINUS, mode, op0, op1);
}
/* Convert A - const to A + (-const). */
if (modifier == EXPAND_SUM && mode == Pmode
&& TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST
- && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_INT)
+ && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT)
{
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, EXPAND_SUM);
&& GET_CODE (XEXP (op0, 1)) == CONST_INT)
return gen_rtx (PLUS, mode,
gen_rtx (MULT, mode, XEXP (op0, 0),
- gen_rtx (CONST_INT, VOIDmode,
- TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)))),
- gen_rtx (CONST_INT, VOIDmode,
- (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1))
- * INTVAL (XEXP (op0, 1)))));
+ GEN_INT (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)))),
+ GEN_INT (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1))
+ * INTVAL (XEXP (op0, 1))));
if (GET_CODE (op0) != REG)
- op0 = force_operand (op0, 0);
+ op0 = force_operand (op0, NULL_RTX);
if (GET_CODE (op0) != REG)
op0 = copy_to_mode_reg (mode, op0);
return gen_rtx (MULT, mode, op0,
- gen_rtx (CONST_INT, VOIDmode,
- TREE_INT_CST_LOW (TREE_OPERAND (exp, 1))));
+ GEN_INT (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1))));
}
if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1)))
TREE_TYPE (TREE_OPERAND (TREE_OPERAND (exp, 0), 0)))
/* Don't use a widening multiply if a shift will do. */
&& ((GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 1))))
- > HOST_BITS_PER_INT)
+ > HOST_BITS_PER_WIDE_INT)
|| exact_log2 (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1))) < 0))
||
(TREE_CODE (TREE_OPERAND (exp, 1)) == NOP_EXPR
&& this_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing)
{
op0 = expand_expr (TREE_OPERAND (TREE_OPERAND (exp, 0), 0),
- 0, VOIDmode, 0);
+ NULL_RTX, VOIDmode, 0);
if (TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST)
- op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0);
+ op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX,
+ VOIDmode, 0);
else
op1 = expand_expr (TREE_OPERAND (TREE_OPERAND (exp, 1), 0),
- 0, VOIDmode, 0);
+ NULL_RTX, VOIDmode, 0);
goto binop2;
}
}
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
- op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0);
+ op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
return expand_mult (mode, op0, op1, target, unsignedp);
case TRUNC_DIV_EXPR:
then if the divisor is constant can optimize the case
where some terms of the dividend have coeffs divisible by it. */
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
- op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0);
+ op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
return expand_divmod (0, code, mode, op0, op1, target, unsignedp);
case RDIV_EXPR:
if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1)))
subtarget = 0;
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
- op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0);
+ op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
return expand_divmod (1, code, mode, op0, op1, target, unsignedp);
case FIX_ROUND_EXPR:
abort (); /* Not used for C. */
case FIX_TRUNC_EXPR:
- op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode, 0);
+ op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
if (target == 0)
target = gen_reg_rtx (mode);
expand_fix (target, op0, unsignedp);
return target;
case FLOAT_EXPR:
- op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode, 0);
+ op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
if (target == 0)
target = gen_reg_rtx (mode);
/* expand_float can't figure out what to do if FROM has VOIDmode.
{
rtx extended = expand_shift (RSHIFT_EXPR, mode, op0,
size_int (GET_MODE_BITSIZE (mode) - 1),
- 0, 0);
+ NULL_RTX, 0);
temp = expand_binop (mode, xor_optab, extended, op0, target, 0,
OPTAB_LIB_WIDEN);
emit_move_insn (target, op0);
emit_cmp_insn (target,
expand_expr (convert (type, integer_zero_node),
- 0, VOIDmode, 0),
- GE, 0, mode, 0, 0);
+ NULL_RTX, VOIDmode, 0),
+ GE, NULL_RTX, mode, 0, 0);
NO_DEFER_POP;
emit_jump_insn (gen_bge (temp));
op0 = expand_unop (mode, neg_optab, target, target, 0);
|| (GET_CODE (target) == REG
&& REGNO (target) < FIRST_PSEUDO_REGISTER))
target = gen_reg_rtx (mode);
- op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0);
+ op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
op0 = expand_expr (TREE_OPERAND (exp, 0), target, VOIDmode, 0);
/* First try to do it with a special MIN or MAX instruction.
op0 = gen_label_rtx ();
if (code == MAX_EXPR)
temp = (TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 1)))
- ? compare_from_rtx (target, op1, GEU, 1, mode, 0, 0)
- : compare_from_rtx (target, op1, GE, 0, mode, 0, 0));
+ ? compare_from_rtx (target, op1, GEU, 1, mode, NULL_RTX, 0)
+ : compare_from_rtx (target, op1, GE, 0, mode, NULL_RTX, 0));
else
temp = (TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 1)))
- ? compare_from_rtx (target, op1, LEU, 1, mode, 0, 0)
- : compare_from_rtx (target, op1, LE, 0, mode, 0, 0));
+ ? compare_from_rtx (target, op1, LEU, 1, mode, NULL_RTX, 0)
+ : compare_from_rtx (target, op1, LE, 0, mode, NULL_RTX, 0));
if (temp == const0_rtx)
emit_move_insn (target, op1);
else if (temp != const_true_rtx)
if (temp != original_target)
temp = copy_to_reg (temp);
op1 = gen_label_rtx ();
- emit_cmp_insn (temp, const0_rtx, EQ, 0,
+ emit_cmp_insn (temp, const0_rtx, EQ, NULL_RTX,
GET_MODE (temp), unsignedp, 0);
emit_jump_insn (gen_beq (op1));
emit_move_insn (temp, const1_rtx);
op0 = expand_expr (TREE_OPERAND (exp, 0), target, VOIDmode, 0);
/* The parser is careful to generate TRUTH_NOT_EXPR
only with operands that are always zero or one. */
- temp = expand_binop (mode, xor_optab, op0,
- gen_rtx (CONST_INT, mode, 1),
+ temp = expand_binop (mode, xor_optab, op0, const1_rtx,
target, 1, OPTAB_LIB_WIDEN);
if (temp == 0)
abort ();
= invert_truthvalue (TREE_OPERAND (exp, 0));
result = do_store_flag (TREE_OPERAND (exp, 0),
- safe_from_p (temp, singleton) ? temp : 0,
+ (safe_from_p (temp, singleton)
+ ? temp : NULL_RTX),
mode, BRANCH_COST <= 1);
if (result)
{
- op1 = expand_expr (singleton, 0, VOIDmode, 0);
+ op1 = expand_expr (singleton, NULL_RTX, VOIDmode, 0);
return expand_binop (mode, boptab, op1, result, temp,
unsignedp, OPTAB_LIB_WIDEN);
}
store_expr (singleton, temp, 0);
}
else
- expand_expr (singleton, ignore ? const1_rtx : 0, VOIDmode, 0);
+ expand_expr (singleton,
+ ignore ? const1_rtx : NULL_RTX, VOIDmode, 0);
if (cleanups_this_call)
{
sorry ("aggregate value in COND_EXPR");
if (binary_op && temp == 0)
/* Just touch the other operand. */
expand_expr (TREE_OPERAND (binary_op, 1),
- ignore ? const0_rtx : 0, VOIDmode, 0);
+ ignore ? const0_rtx : NULL_RTX, VOIDmode, 0);
else if (binary_op)
store_expr (build (TREE_CODE (binary_op), type,
make_tree (type, temp),
if (temp != 0)
store_expr (TREE_OPERAND (exp, 1), temp, 0);
else
- expand_expr (TREE_OPERAND (exp, 1), ignore ? const0_rtx : 0,
- VOIDmode, 0);
+ expand_expr (TREE_OPERAND (exp, 1),
+ ignore ? const0_rtx : NULL_RTX, VOIDmode, 0);
if (cleanups_this_call)
{
sorry ("aggregate value in COND_EXPR");
if (temp != 0)
store_expr (TREE_OPERAND (exp, 2), temp, 0);
else
- expand_expr (TREE_OPERAND (exp, 2), ignore ? const0_rtx : 0,
- VOIDmode, 0);
+ expand_expr (TREE_OPERAND (exp, 2),
+ ignore ? const0_rtx : NULL_RTX, VOIDmode, 0);
}
if (cleanups_this_call)
if (TREE_OPERAND (exp, 2) == 0)
TREE_OPERAND (exp, 2) = maybe_build_cleanup (slot);
if (TREE_OPERAND (exp, 2))
- cleanups_this_call = tree_cons (0, TREE_OPERAND (exp, 2),
- cleanups_this_call);
+ cleanups_this_call = tree_cons (NULL_TREE, TREE_OPERAND (exp, 2),
+ cleanups_this_call);
#endif
}
else
}
else
{
- op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode,
+ op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode,
(modifier == EXPAND_INITIALIZER
? modifier : EXPAND_CONST_ADDRESS));
if (GET_CODE (op0) != MEM)
if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1)))
subtarget = 0;
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
- op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0);
+ op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
binop2:
temp = expand_binop (mode, this_optab, op0, op1, target,
unsignedp, OPTAB_LIB_WIDEN);
{
/* By checking op > 0 we are able to catch all of the
IEEE special cases with a single if conditional. */
- emit_cmp_insn (op0, CONST0_RTX (GET_MODE (op0)), GT, 0,
+ emit_cmp_insn (op0, CONST0_RTX (GET_MODE (op0)), GT, NULL_RTX,
GET_MODE (op0), 0, 0);
emit_jump_insn (gen_bgt (lab1));
if (wordnum < 0 || wordnum >= nwords)
error ("argument of __builtin_args_info out of range");
else
- return gen_rtx (CONST_INT, VOIDmode, word_ptr[wordnum]);
+ return GEN_INT (word_ptr[wordnum]);
}
}
else
TREE_STATIC (result) = 1;
result = build (INDIRECT_REF, build_pointer_type (type), result);
TREE_CONSTANT (result) = 1;
- return expand_expr (result, 0, VOIDmode, 0);
+ return expand_expr (result, NULL_RTX, VOIDmode, 0);
#endif
}
return expand_binop (Pmode, add_optab,
current_function_internal_arg_pointer,
current_function_arg_offset_rtx,
- 0, 0, OPTAB_LIB_WIDEN);
+ NULL_RTX, 0, OPTAB_LIB_WIDEN);
case BUILT_IN_CLASSIFY_TYPE:
if (arglist != 0)
tree type = TREE_TYPE (TREE_VALUE (arglist));
enum tree_code code = TREE_CODE (type);
if (code == VOID_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, void_type_class);
+ return GEN_INT (void_type_class);
if (code == INTEGER_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, integer_type_class);
+ return GEN_INT (integer_type_class);
if (code == CHAR_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, char_type_class);
+ return GEN_INT (char_type_class);
if (code == ENUMERAL_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, enumeral_type_class);
+ return GEN_INT (enumeral_type_class);
if (code == BOOLEAN_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, boolean_type_class);
+ return GEN_INT (boolean_type_class);
if (code == POINTER_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, pointer_type_class);
+ return GEN_INT (pointer_type_class);
if (code == REFERENCE_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, reference_type_class);
+ return GEN_INT (reference_type_class);
if (code == OFFSET_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, offset_type_class);
+ return GEN_INT (offset_type_class);
if (code == REAL_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, real_type_class);
+ return GEN_INT (real_type_class);
if (code == COMPLEX_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, complex_type_class);
+ return GEN_INT (complex_type_class);
if (code == FUNCTION_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, function_type_class);
+ return GEN_INT (function_type_class);
if (code == METHOD_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, method_type_class);
+ return GEN_INT (method_type_class);
if (code == RECORD_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, record_type_class);
+ return GEN_INT (record_type_class);
if (code == UNION_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, union_type_class);
+ return GEN_INT (union_type_class);
if (code == ARRAY_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, array_type_class);
+ return GEN_INT (array_type_class);
if (code == STRING_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, string_type_class);
+ return GEN_INT (string_type_class);
if (code == SET_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, set_type_class);
+ return GEN_INT (set_type_class);
if (code == FILE_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, file_type_class);
+ return GEN_INT (file_type_class);
if (code == LANG_TYPE)
- return gen_rtx (CONST_INT, VOIDmode, lang_type_class);
+ return GEN_INT (lang_type_class);
}
- return gen_rtx (CONST_INT, VOIDmode, no_type_class);
+ return GEN_INT (no_type_class);
case BUILT_IN_CONSTANT_P:
if (arglist == 0)
return const0_rtx;
current_function_calls_alloca = 1;
/* Compute the argument. */
- op0 = expand_expr (TREE_VALUE (arglist), 0, VOIDmode, 0);
+ op0 = expand_expr (TREE_VALUE (arglist), NULL_RTX, VOIDmode, 0);
/* Allocate the desired space. */
target = allocate_dynamic_stack_space (op0, target, BITS_PER_UNIT);
/* Record the new stack level for nonlocal gotos. */
if (nonlocal_goto_handler_slot != 0)
- emit_stack_save (SAVE_NONLOCAL, &nonlocal_goto_stack_level, 0);
+ emit_stack_save (SAVE_NONLOCAL, &nonlocal_goto_stack_level, NULL_RTX);
return target;
case BUILT_IN_FFS:
result = gen_reg_rtx (insn_mode);
src_rtx = memory_address (BLKmode,
- expand_expr (src, 0, Pmode,
+ expand_expr (src, NULL_RTX, Pmode,
EXPAND_NORMAL));
if (! (*insn_operand_predicate[(int)icode][1]) (src_rtx, Pmode))
src_rtx = copy_to_mode_reg (Pmode, src_rtx);
emit_insn (GEN_FCN (icode) (result,
gen_rtx (MEM, BLKmode, src_rtx),
- char_rtx,
- gen_rtx (CONST_INT, VOIDmode, align)));
+ char_rtx, GEN_INT (align)));
/* Return the value in the proper mode for this function. */
if (GET_MODE (result) == value_mode)
len = size_binop (PLUS_EXPR, len, integer_one_node);
- chainon (arglist, build_tree_list (0, len));
+ chainon (arglist, build_tree_list (NULL_TREE, len));
}
/* Drops in. */
break;
}
- dest_rtx = expand_expr (dest, 0, Pmode, EXPAND_NORMAL);
+ dest_rtx = expand_expr (dest, NULL_RTX, Pmode, EXPAND_NORMAL);
/* Copy word part most expediently. */
emit_block_move (gen_rtx (MEM, BLKmode,
memory_address (BLKmode, dest_rtx)),
gen_rtx (MEM, BLKmode,
memory_address (BLKmode,
- expand_expr (src, 0, Pmode,
+ expand_expr (src, NULL_RTX,
+ Pmode,
EXPAND_NORMAL))),
- expand_expr (len, 0, VOIDmode, 0),
+ expand_expr (len, NULL_RTX, VOIDmode, 0),
MIN (src_align, dest_align));
return dest_rtx;
}
len = len2;
}
- chainon (arglist, build_tree_list (0, len));
+ chainon (arglist, build_tree_list (NULL_TREE, len));
}
/* Drops in. */
emit_insn (gen_cmpstrsi (result,
gen_rtx (MEM, BLKmode,
- expand_expr (arg1, 0, Pmode, EXPAND_NORMAL)),
+ expand_expr (arg1, NULL_RTX, Pmode,
+ EXPAND_NORMAL)),
gen_rtx (MEM, BLKmode,
- expand_expr (arg2, 0, Pmode, EXPAND_NORMAL)),
- expand_expr (len, 0, VOIDmode, 0),
- gen_rtx (CONST_INT, VOIDmode,
- MIN (arg1_align, arg2_align))));
+ expand_expr (arg2, NULL_RTX, Pmode,
+ EXPAND_NORMAL)),
+ expand_expr (len, NULL_RTX, VOIDmode, 0),
+ GEN_INT (MIN (arg1_align, arg2_align))));
/* Return the value in the proper mode for this function. */
mode = TYPE_MODE (TREE_TYPE (exp));
I believe it is a copy iff it is a register or subreg
and insns were generated in computing it. */
temp = get_last_insn ();
- op0 = expand_expr (incremented, 0, VOIDmode, 0);
+ op0 = expand_expr (incremented, NULL_RTX, VOIDmode, 0);
op0_is_copy = ((GET_CODE (op0) == SUBREG || GET_CODE (op0) == REG)
&& temp != get_last_insn ());
- op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0);
+ op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
/* Decide whether incrementing or decrementing. */
if (TREE_CODE (exp) == POSTDECREMENT_EXPR
if (this_optab == sub_optab
&& GET_CODE (op1) == CONST_INT)
{
- op1 = gen_rtx (CONST_INT, VOIDmode, - INTVAL (op1));
+ op1 = GEN_INT (- INTVAL (op1));
this_optab = add_optab;
}
if (TREE_CODE (TREE_OPERAND (exp, 0)) != ADDR_EXPR
|| TREE_CODE (TREE_OPERAND (TREE_OPERAND (exp, 0), 0)) != FUNCTION_DECL
|| ! DECL_BUILT_IN (TREE_OPERAND (TREE_OPERAND (exp, 0), 0)))
- CALL_EXPR_RTL (exp) = expand_call (exp, 0, 0);
+ CALL_EXPR_RTL (exp) = expand_call (exp, NULL_RTX, 0);
return;
case COMPOUND_EXPR:
if (inhibit_defer_pop == 0)
{
if (pending_stack_adjust != 0)
- adjust_stack (gen_rtx (CONST_INT, VOIDmode, pending_stack_adjust));
+ adjust_stack (GEN_INT (pending_stack_adjust));
pending_stack_adjust = 0;
}
}
{
while (cleanups_this_call != old_cleanups)
{
- expand_expr (TREE_VALUE (cleanups_this_call), 0, VOIDmode, 0);
+ expand_expr (TREE_VALUE (cleanups_this_call), NULL_RTX, VOIDmode, 0);
cleanups_this_call = TREE_CHAIN (cleanups_this_call);
}
}
tree exp;
rtx label;
{
- do_jump (exp, label, 0);
+ do_jump (exp, label, NULL_RTX);
}
/* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */
tree exp;
rtx label;
{
- do_jump (exp, 0, label);
+ do_jump (exp, NULL_RTX, label);
}
/* Generate code to evaluate EXP and jump to IF_FALSE_LABEL if
if (! SLOW_BYTE_ACCESS
&& TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST
- && TYPE_PRECISION (TREE_TYPE (exp)) <= HOST_BITS_PER_INT
+ && TYPE_PRECISION (TREE_TYPE (exp)) <= HOST_BITS_PER_WIDE_INT
&& (i = floor_log2 (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)))) >= 0
&& (type = type_for_size (i + 1, 1)) != 0
&& TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (exp))
case TRUTH_ANDIF_EXPR:
if (if_false_label == 0)
if_false_label = drop_through_label = gen_label_rtx ();
- do_jump (TREE_OPERAND (exp, 0), if_false_label, 0);
+ do_jump (TREE_OPERAND (exp, 0), if_false_label, NULL_RTX);
do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label);
break;
case TRUTH_ORIF_EXPR:
if (if_true_label == 0)
if_true_label = drop_through_label = gen_label_rtx ();
- do_jump (TREE_OPERAND (exp, 0), 0, if_true_label);
+ do_jump (TREE_OPERAND (exp, 0), NULL_RTX, if_true_label);
do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label);
break;
{
register rtx label1 = gen_label_rtx ();
drop_through_label = gen_label_rtx ();
- do_jump (TREE_OPERAND (exp, 0), label1, 0);
+ do_jump (TREE_OPERAND (exp, 0), label1, NULL_RTX);
/* Now the THEN-expression. */
do_jump (TREE_OPERAND (exp, 1),
if_false_label ? if_false_label : drop_through_label,
default:
normal:
- temp = expand_expr (exp, 0, VOIDmode, 0);
+ temp = expand_expr (exp, NULL_RTX, VOIDmode, 0);
#if 0
/* This is not needed any more and causes poor code since it causes
comparisons and tests from non-SI objects to have different code
do_jump_by_parts_equality_rtx (temp, if_true_label, if_false_label);
else if (GET_MODE (temp) != VOIDmode)
comparison = compare_from_rtx (temp, CONST0_RTX (GET_MODE (temp)),
- NE, 1, GET_MODE (temp), 0, 0);
+ NE, 1, GET_MODE (temp), NULL_RTX, 0);
else
abort ();
}
int swap;
rtx if_false_label, if_true_label;
{
- rtx op0 = expand_expr (TREE_OPERAND (exp, swap), 0, VOIDmode, 0);
- rtx op1 = expand_expr (TREE_OPERAND (exp, !swap), 0, VOIDmode, 0);
+ rtx op0 = expand_expr (TREE_OPERAND (exp, swap), NULL_RTX, VOIDmode, 0);
+ rtx op1 = expand_expr (TREE_OPERAND (exp, !swap), NULL_RTX, VOIDmode, 0);
enum machine_mode mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)));
int nwords = (GET_MODE_SIZE (mode) / UNITS_PER_WORD);
rtx drop_through_label = 0;
/* All but high-order word must be compared as unsigned. */
comp = compare_from_rtx (op0_word, op1_word,
(unsignedp || i > 0) ? GTU : GT,
- unsignedp, word_mode, 0, 0);
+ unsignedp, word_mode, NULL_RTX, 0);
if (comp == const_true_rtx)
emit_jump (if_true_label);
else if (comp != const0_rtx)
- do_jump_for_compare (comp, 0, if_true_label);
+ do_jump_for_compare (comp, NULL_RTX, if_true_label);
/* Consider lower words only if these are equal. */
comp = compare_from_rtx (op0_word, op1_word, NE, unsignedp, word_mode,
- 0, 0);
+ NULL_RTX, 0);
if (comp == const_true_rtx)
emit_jump (if_false_label);
else if (comp != const0_rtx)
- do_jump_for_compare (comp, 0, if_false_label);
+ do_jump_for_compare (comp, NULL_RTX, if_false_label);
}
if (if_false_label)
tree exp;
rtx if_false_label, if_true_label;
{
- rtx op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode, 0);
- rtx op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0);
+ rtx op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
+ rtx op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
enum machine_mode mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)));
int nwords = (GET_MODE_SIZE (mode) / UNITS_PER_WORD);
int i;
{
rtx comp = compare_from_rtx (operand_subword_force (op0, i, mode),
operand_subword_force (op1, i, mode),
- EQ, 0, word_mode, 0, 0);
+ EQ, 0, word_mode, NULL_RTX, 0);
if (comp == const_true_rtx)
emit_jump (if_false_label);
else if (comp != const0_rtx)
- do_jump_for_compare (comp, if_false_label, 0);
+ do_jump_for_compare (comp, if_false_label, NULL_RTX);
}
if (if_true_label)
{
rtx comp = compare_from_rtx (operand_subword_force (op0, i,
GET_MODE (op0)),
- const0_rtx, EQ, 0, word_mode, 0, 0);
+ const0_rtx, EQ, 0, word_mode, NULL_RTX, 0);
if (comp == const_true_rtx)
emit_jump (if_false_label);
else if (comp != const0_rtx)
- do_jump_for_compare (comp, if_false_label, 0);
+ do_jump_for_compare (comp, if_false_label, NULL_RTX);
}
if (if_true_label)
register tree exp;
enum rtx_code signed_code, unsigned_code;
{
- register rtx op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode, 0);
- register rtx op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0);
+ register rtx op0
+ = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
+ register rtx op1
+ = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
register tree type = TREE_TYPE (TREE_OPERAND (exp, 0));
register enum machine_mode mode = TYPE_MODE (type);
int unsignedp = TREE_UNSIGNED (type);
return compare_from_rtx (op0, op1, code, unsignedp, mode,
((mode == BLKmode)
- ? expr_size (TREE_OPERAND (exp, 0)) : 0),
+ ? expr_size (TREE_OPERAND (exp, 0)) : NULL_RTX),
TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT);
}
sign-extension is. If we are comparing against a constant, we must
convert it to what it would look like unsigned. */
if ((code == EQ || code == NE) && ! unsignedp
- && GET_MODE_BITSIZE (GET_MODE (op0)) <= HOST_BITS_PER_INT)
+ && GET_MODE_BITSIZE (GET_MODE (op0)) <= HOST_BITS_PER_WIDE_INT)
{
if (GET_CODE (op1) == CONST_INT
&& (INTVAL (op1) & GET_MODE_MASK (GET_MODE (op0))) != INTVAL (op1))
- op1 = gen_rtx (CONST_INT, VOIDmode,
- INTVAL (op1) & GET_MODE_MASK (GET_MODE (op0)));
+ op1 = GEN_INT (INTVAL (op1) & GET_MODE_MASK (GET_MODE (op0)));
unsignedp = 1;
}
if ((code == NE || code == EQ)
&& TREE_CODE (arg0) == BIT_AND_EXPR && integer_zerop (arg1)
&& integer_pow2p (TREE_OPERAND (arg0, 1))
- && TYPE_PRECISION (type) <= HOST_BITS_PER_INT)
+ && TYPE_PRECISION (type) <= HOST_BITS_PER_WIDE_INT)
{
int bitnum = exact_log2 (INTVAL (expand_expr (TREE_OPERAND (arg0, 1),
- 0, VOIDmode, 0)));
+ NULL_RTX, VOIDmode, 0)));
if (subtarget == 0 || GET_CODE (subtarget) != REG
|| GET_MODE (subtarget) != operand_mode
subtarget = 0;
op0 = expand_expr (arg0, subtarget, VOIDmode, 0);
- op1 = expand_expr (arg1, 0, VOIDmode, 0);
+ op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0);
if (target == 0)
target = gen_reg_rtx (mode);
target = gen_reg_rtx (GET_MODE (target));
emit_move_insn (target, invert ? const0_rtx : const1_rtx);
- result = compare_from_rtx (op0, op1, code, unsignedp, operand_mode, 0, 0);
+ result = compare_from_rtx (op0, op1, code, unsignedp,
+ operand_mode, NULL_RTX, 0);
if (GET_CODE (result) == CONST_INT)
return (((result == const0_rtx && ! invert)
|| (result != const0_rtx && invert))
or equal to the minimum value of the range and less than or equal to
the maximum value of the range. */
- emit_cmp_insn (range, index, LTU, 0, mode, 0, 0);
+ emit_cmp_insn (range, index, LTU, NULL_RTX, mode, 0, 0);
emit_jump_insn (gen_bltu (default_label));
/* If index is in range, it must fit in Pmode.
(CASE_VECTOR_MODE,
gen_rtx (PLUS, Pmode,
gen_rtx (MULT, Pmode, index,
- gen_rtx (CONST_INT, VOIDmode,
- GET_MODE_SIZE (CASE_VECTOR_MODE))),
+ GEN_INT (GET_MODE_SIZE (CASE_VECTOR_MODE))),
gen_rtx (LABEL_REF, Pmode, table_label)));
temp = gen_reg_rtx (CASE_VECTOR_MODE);
vector = gen_rtx (MEM, CASE_VECTOR_MODE, index);
assemble_integer (gen_rtx (SYMBOL_REF, Pmode, name), UNITS_PER_WORD, 1);
ASM_GENERATE_INTERNAL_LABEL (name, "LPBX", 2);
assemble_integer (gen_rtx (SYMBOL_REF, Pmode, name), UNITS_PER_WORD, 1);
- assemble_integer (gen_rtx (CONST_INT, VOIDmode, count_basic_blocks),
- UNITS_PER_WORD, 1);
+ assemble_integer (GEN_INT (count_basic_blocks), UNITS_PER_WORD, 1);
assemble_integer (const0_rtx, UNITS_PER_WORD, 1);
ASM_GENERATE_INTERNAL_LABEL (name, "LPBX", 3);
assemble_integer (gen_rtx (SYMBOL_REF, Pmode, name), UNITS_PER_WORD, 1);
char *template;
int count = 1;
- for (template = decode_asm_operands (body, 0, 0, 0, 0);
+ for (template = decode_asm_operands (body, NULL_PTR, NULL_PTR,
+ NULL_PTR, NULL_PTR);
*template; template++)
if (*template == ';' || *template == '\n')
count++;
of the insn that branched here. So recover the cc status
from the insn that set it. */
- note = find_reg_note (insn, REG_CC_SETTER, 0);
+ note = find_reg_note (insn, REG_CC_SETTER, NULL_RTX);
if (note)
{
NOTICE_UPDATE_CC (PATTERN (XEXP (note, 0)), XEXP (note, 0));
}
/* Get out the operand values. */
- string = decode_asm_operands (body, ops, 0, 0, 0);
+ string = decode_asm_operands (body, ops, NULL_PTR,
+ NULL_PTR, NULL_PTR);
/* Inhibit aborts on what would otherwise be compiler bugs. */
insn_noperands = noperands;
this_is_asm_operands = insn;
else if (letter == 'n')
{
if (GET_CODE (operands[c]) == CONST_INT)
- fprintf (asm_out_file, "%d", - INTVAL (operands[c]));
+ fprintf (asm_out_file,
+#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
+ "%d",
+#else
+ "%ld",
+#endif
+ - INTVAL (operands[c]));
else
{
putc ('-', asm_out_file);
The PRINT_OPERAND macro decides what is actually done. */
#ifdef PRINT_OPERAND_PUNCT_VALID_P
else if (PRINT_OPERAND_PUNCT_VALID_P (*p))
- output_operand (0, *p++);
+ output_operand (NULL_RTX, *p++);
#endif
else
output_operand_lossage ("invalid %%-code");
break;
case CONST_INT:
- fprintf (file, "%d", INTVAL (x));
+ fprintf (file,
+#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
+ "%d",
+#else
+ "%ld",
+#endif
+ INTVAL (x));
break;
case CONST:
case CONST_DOUBLE:
if (GET_MODE (x) == VOIDmode)
{
- /* We can use %d if the number is <32 bits and positive. */
+ /* We can use %d if the number is one word and positive. */
if (CONST_DOUBLE_HIGH (x) || CONST_DOUBLE_LOW (x) < 0)
- fprintf (file, "0x%x%08x",
+ fprintf (file,
+#if HOST_BITS_PER_WIDE_INT == 64
+#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
+ " 0x%lx%016lx",
+#else
+ " 0x%x%016x",
+#endif
+#else
+#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
+ " 0x%lx%08lx",
+#else
+ " 0x%x%08x",
+#endif
+#endif
CONST_DOUBLE_HIGH (x), CONST_DOUBLE_LOW (x));
else
- fprintf (file, "%d", CONST_DOUBLE_LOW (x));
+ fprintf (file,
+#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
+ "%d",
+#else
+ "%ld",
+#endif
+ CONST_DOUBLE_LOW (x));
}
else
/* We can't handle floating point constants;
/* In an integer, the words are defined as most and least significant.
So order them by the target's convention. */
#if WORDS_BIG_ENDIAN
- *first = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_HIGH (value));
- *second = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (value));
+ *first = GEN_INT (CONST_DOUBLE_HIGH (value));
+ *second = GEN_INT (CONST_DOUBLE_LOW (value));
#else
- *first = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (value));
- *second = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_HIGH (value));
+ *first = GEN_INT (CONST_DOUBLE_LOW (value));
+ *second = GEN_INT (CONST_DOUBLE_HIGH (value));
#endif
}
else
{
if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
- || HOST_BITS_PER_INT != BITS_PER_WORD)
+ || HOST_BITS_PER_WIDE_INT != BITS_PER_WORD)
&& ! flag_pretend_float)
abort ();
#if defined (HOST_WORDS_BIG_ENDIAN) == WORDS_BIG_ENDIAN
/* Host and target agree => no need to swap. */
- *first = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (value));
- *second = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_HIGH (value));
+ *first = GEN_INT (CONST_DOUBLE_LOW (value));
+ *second = GEN_INT (CONST_DOUBLE_HIGH (value));
#else
- *second = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (value));
- *first = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_HIGH (value));
+ *second = GEN_INT (CONST_DOUBLE_LOW (value));
+ *first = GEN_INT (CONST_DOUBLE_HIGH (value));
#endif
}
}
#define BRANCH_COST 1
#endif
\f
-/* To do constant folding on INTEGER_CST nodes requires 64-bit arithmetic.
- We do that by representing the 64-bit integer as 8 shorts,
+/* To do constant folding on INTEGER_CST nodes requires two-word arithmetic.
+ We do that by representing the two-word integer as MAX_SHORTS shorts,
with only 8 bits stored in each short, as a positive number. */
-/* Unpack a 64-bit integer into 8 shorts.
- LOW and HI are the integer, as two `int' pieces.
+/* Unpack a two-word integer into MAX_SHORTS shorts.
+ LOW and HI are the integer, as two `HOST_WIDE_INT' pieces.
SHORTS points to the array of shorts. */
static void
encode (shorts, low, hi)
short *shorts;
- int low, hi;
+ HOST_WIDE_INT low, hi;
{
- shorts[0] = low & 0xff;
- shorts[1] = (low >> 8) & 0xff;
- shorts[2] = (low >> 16) & 0xff;
- shorts[3] = (low >> 24) & 0xff;
- shorts[4] = hi & 0xff;
- shorts[5] = (hi >> 8) & 0xff;
- shorts[6] = (hi >> 16) & 0xff;
- shorts[7] = (hi >> 24) & 0xff;
+ register int i;
+
+ for (i = 0; i < MAX_SHORTS / 2; i++)
+ {
+ shorts[i] = (low >> (i * 8)) & 0xff;
+ shorts[i + MAX_SHORTS / 2] = (hi >> (i * 8) & 0xff);
+ }
}
-/* Pack an array of 8 shorts into a 64-bit integer.
+/* Pack an array of MAX_SHORTS shorts into a two-word integer.
SHORTS points to the array of shorts.
- The integer is stored into *LOW and *HI as two `int' pieces. */
+ The integer is stored into *LOW and *HI as two `HOST_WIDE_INT' pieces. */
static void
decode (shorts, low, hi)
short *shorts;
- int *low, *hi;
+ HOST_WIDE_INT *low, *hi;
{
- /* The casts in the following statement should not be
- needed, but they get around bugs in some C compilers. */
- *low = (((long)shorts[3] << 24) | ((long)shorts[2] << 16)
- | ((long)shorts[1] << 8) | (long)shorts[0]);
- *hi = (((long)shorts[7] << 24) | ((long)shorts[6] << 16)
- | ((long)shorts[5] << 8) | (long)shorts[4]);
+ register int i;
+ HOST_WIDE_INT lv = 0, hv = 0;
+
+ for (i = 0; i < MAX_SHORTS / 2; i++)
+ {
+ lv |= (HOST_WIDE_INT) shorts[i] << (i * 8);
+ hv |= (HOST_WIDE_INT) shorts[i + MAX_SHORTS / 2] << (i * 8);
+ }
+
+ *low = lv, *hi = hv;
}
\f
/* Make the integer constant T valid for its type
/* First clear all bits that are beyond the type's precision. */
- if (prec == 2 * HOST_BITS_PER_INT)
+ if (prec == 2 * HOST_BITS_PER_WIDE_INT)
;
- else if (prec > HOST_BITS_PER_INT)
+ else if (prec > HOST_BITS_PER_WIDE_INT)
{
TREE_INT_CST_HIGH (t)
- &= ~((-1) << (prec - HOST_BITS_PER_INT));
+ &= ~((HOST_WIDE_INT) (-1) << (prec - HOST_BITS_PER_WIDE_INT));
}
else
{
TREE_INT_CST_HIGH (t) = 0;
- if (prec < HOST_BITS_PER_INT)
- TREE_INT_CST_LOW (t)
- &= ~((-1) << prec);
+ if (prec < HOST_BITS_PER_WIDE_INT)
+ TREE_INT_CST_LOW (t) &= ~((HOST_WIDE_INT) (-1) << prec);
}
/* If it's a signed type and value's sign bit is set, extend the sign. */
if (! TREE_UNSIGNED (TREE_TYPE (t))
- && prec != 2 * HOST_BITS_PER_INT
- && (prec > HOST_BITS_PER_INT
- ? TREE_INT_CST_HIGH (t) & (1 << (prec - HOST_BITS_PER_INT - 1))
- : TREE_INT_CST_LOW (t) & (1 << (prec - 1))))
+ && prec != 2 * HOST_BITS_PER_WIDE_INT
+ && (prec > HOST_BITS_PER_WIDE_INT
+ ? (TREE_INT_CST_HIGH (t)
+ & ((HOST_WIDE_INT) 1 << (prec - HOST_BITS_PER_WIDE_INT - 1)))
+ : TREE_INT_CST_LOW (t) & ((HOST_WIDE_INT) 1 << (prec - 1))))
{
/* Value is negative:
set to 1 all the bits that are outside this type's precision. */
- if (prec > HOST_BITS_PER_INT)
+ if (prec > HOST_BITS_PER_WIDE_INT)
{
TREE_INT_CST_HIGH (t)
- |= ((-1) << (prec - HOST_BITS_PER_INT));
+ |= ((HOST_WIDE_INT) (-1) << (prec - HOST_BITS_PER_WIDE_INT));
}
else
{
TREE_INT_CST_HIGH (t) = -1;
- if (prec < HOST_BITS_PER_INT)
- TREE_INT_CST_LOW (t)
- |= ((-1) << prec);
+ if (prec < HOST_BITS_PER_WIDE_INT)
+ TREE_INT_CST_LOW (t) |= ((HOST_WIDE_INT) (-1) << prec);
}
}
}
\f
-/* Add two 64-bit integers with 64-bit result.
- Each argument is given as two `int' pieces.
+/* Add two doubleword integers with doubleword result.
+ Each argument is given as two `HOST_WIDE_INT' pieces.
One argument is L1 and H1; the other, L2 and H2.
- The value is stored as two `int' pieces in *LV and *HV.
+ The value is stored as two `HOST_WIDE_INT' pieces in *LV and *HV.
We use the 8-shorts representation internally. */
void
add_double (l1, h1, l2, h2, lv, hv)
- int l1, h1, l2, h2;
- int *lv, *hv;
+ HOST_WIDE_INT l1, h1, l2, h2;
+ HOST_WIDE_INT *lv, *hv;
{
- short arg1[8];
- short arg2[8];
+ short arg1[MAX_SHORTS];
+ short arg2[MAX_SHORTS];
register int carry = 0;
register int i;
encode (arg1, l1, h1);
encode (arg2, l2, h2);
- for (i = 0; i < 8; i++)
+ for (i = 0; i < MAX_SHORTS; i++)
{
carry += arg1[i] + arg2[i];
arg1[i] = carry & 0xff;
decode (arg1, lv, hv);
}
-/* Negate a 64-bit integers with 64-bit result.
- The argument is given as two `int' pieces in L1 and H1.
- The value is stored as two `int' pieces in *LV and *HV.
+/* Negate a doubleword integer with doubleword result.
+ The argument is given as two `HOST_WIDE_INT' pieces in L1 and H1.
+ The value is stored as two `HOST_WIDE_INT' pieces in *LV and *HV.
We use the 8-shorts representation internally. */
void
neg_double (l1, h1, lv, hv)
- int l1, h1;
- int *lv, *hv;
+ HOST_WIDE_INT l1, h1;
+ HOST_WIDE_INT *lv, *hv;
{
if (l1 == 0)
{
}
}
\f
-/* Multiply two 64-bit integers with 64-bit result.
- Each argument is given as two `int' pieces.
+/* Multiply two doubleword integers with doubleword result.
+ Each argument is given as two `HOST_WIDE_INT' pieces.
One argument is L1 and H1; the other, L2 and H2.
- The value is stored as two `int' pieces in *LV and *HV.
+ The value is stored as two `HOST_WIDE_INT' pieces in *LV and *HV.
We use the 8-shorts representation internally. */
void
mul_double (l1, h1, l2, h2, lv, hv)
- int l1, h1, l2, h2;
- int *lv, *hv;
+ HOST_WIDE_INT l1, h1, l2, h2;
+ HOST_WIDE_INT *lv, *hv;
{
- short arg1[8];
- short arg2[8];
- short prod[16];
+ short arg1[MAX_SHORTS];
+ short arg2[MAX_SHORTS];
+ short prod[MAX_SHORTS * 2];
register int carry = 0;
register int i, j, k;
{
if (l2 == 2)
{
- unsigned temp = l1 + l1;
+ unsigned HOST_WIDE_INT temp = l1 + l1;
*hv = h1 * 2 + (temp < l1);
*lv = temp;
return;
}
if (l2 == 4)
{
- unsigned temp = l1 + l1;
+ unsigned HOST_WIDE_INT temp = l1 + l1;
h1 = h1 * 4 + ((temp < l1) << 1);
l1 = temp;
temp += temp;
}
if (l2 == 8)
{
- unsigned temp = l1 + l1;
+ unsigned HOST_WIDE_INT temp = l1 + l1;
h1 = h1 * 8 + ((temp < l1) << 2);
l1 = temp;
temp += temp;
bzero (prod, sizeof prod);
- for (i = 0; i < 8; i++)
- for (j = 0; j < 8; j++)
+ for (i = 0; i < MAX_SHORTS; i++)
+ for (j = 0; j < MAX_SHORTS; j++)
{
k = i + j;
carry = arg1[i] * arg2[j];
}
}
- decode (prod, lv, hv); /* @@decode ignores prod[8] -> prod[15] */
+ decode (prod, lv, hv); /* ?? decode ignores
+ prod[MAX_SHORTS] -> prod[MAX_SHORTS*2-1] */
}
\f
-/* Shift the 64-bit integer in L1, H1 left by COUNT places
+/* Shift the doubleword integer in L1, H1 left by COUNT places
keeping only PREC bits of result.
Shift right if COUNT is negative.
ARITH nonzero specifies arithmetic shifting; otherwise use logical shift.
- Store the value as two `int' pieces in *LV and *HV. */
+ Store the value as two `HOST_WIDE_INT' pieces in *LV and *HV. */
void
lshift_double (l1, h1, count, prec, lv, hv, arith)
- int l1, h1, count, prec;
- int *lv, *hv;
+ HOST_WIDE_INT l1, h1;
+ int count, prec;
+ HOST_WIDE_INT *lv, *hv;
int arith;
{
- short arg1[8];
+ short arg1[MAX_SHORTS];
register int i;
register int carry;
while (count > 0)
{
carry = 0;
- for (i = 0; i < 8; i++)
+ for (i = 0; i < MAX_SHORTS; i++)
{
carry += arg1[i] << 1;
arg1[i] = carry & 0xff;
decode (arg1, lv, hv);
}
-/* Shift the 64-bit integer in L1, H1 right by COUNT places
+/* Shift the doubleword integer in L1, H1 right by COUNT places
keeping only PREC bits of result. COUNT must be positive.
ARITH nonzero specifies arithmetic shifting; otherwise use logical shift.
- Store the value as two `int' pieces in *LV and *HV. */
+ Store the value as two `HOST_WIDE_INT' pieces in *LV and *HV. */
void
rshift_double (l1, h1, count, prec, lv, hv, arith)
- int l1, h1, count, prec;
- int *lv, *hv;
+ HOST_WIDE_INT l1, h1, count, prec;
+ HOST_WIDE_INT *lv, *hv;
int arith;
{
- short arg1[8];
+ short arg1[MAX_SHORTS];
register int i;
register int carry;
while (count > 0)
{
carry = arith && arg1[7] >> 7;
- for (i = 7; i >= 0; i--)
+ for (i = MAX_SHORTS - 1; i >= 0; i--)
{
carry <<= 8;
carry += arg1[i];
decode (arg1, lv, hv);
}
\f
-/* Rotate the 64-bit integer in L1, H1 left by COUNT places
+/* Rotate the doubldword integer in L1, H1 left by COUNT places
keeping only PREC bits of result.
Rotate right if COUNT is negative.
- Store the value as two `int' pieces in *LV and *HV. */
+ Store the value as two `HOST_WIDE_INT' pieces in *LV and *HV. */
void
lrotate_double (l1, h1, count, prec, lv, hv)
- int l1, h1, count, prec;
- int *lv, *hv;
+ HOST_WIDE_INT l1, h1, count, prec;
+ HOST_WIDE_INT *lv, *hv;
{
- short arg1[8];
+ short arg1[MAX_SHORTS];
register int i;
register int carry;
if (count > prec)
count = prec;
- carry = arg1[7] >> 7;
+ carry = arg1[MAX_SHORTS - 1] >> 7;
while (count > 0)
{
- for (i = 0; i < 8; i++)
+ for (i = 0; i < MAX_SHORTS; i++)
{
carry += arg1[i] << 1;
arg1[i] = carry & 0xff;
decode (arg1, lv, hv);
}
-/* Rotate the 64-bit integer in L1, H1 left by COUNT places
+/* Rotate the doubleword integer in L1, H1 left by COUNT places
keeping only PREC bits of result. COUNT must be positive.
- Store the value as two `int' pieces in *LV and *HV. */
+ Store the value as two `HOST_WIDE_INT' pieces in *LV and *HV. */
void
rrotate_double (l1, h1, count, prec, lv, hv)
- int l1, h1, count, prec;
- int *lv, *hv;
+ HOST_WIDE_INT l1, h1, count, prec;
+ HOST_WIDE_INT *lv, *hv;
{
- short arg1[8];
+ short arg1[MAX_SHORTS];
register int i;
register int carry;
carry = arg1[0] & 1;
while (count > 0)
{
- for (i = 7; i >= 0; i--)
+ for (i = MAX_SHORTS - 1; i >= 0; i--)
{
carry <<= 8;
carry += arg1[i];
decode (arg1, lv, hv);
}
\f
-/* Divide 64 bit integer LNUM, HNUM by 64 bit integer LDEN, HDEN
+/* Divide doubleword integer LNUM, HNUM by doubleword integer LDEN, HDEN
for a quotient (stored in *LQUO, *HQUO) and remainder (in *LREM, *HREM).
CODE is a tree code for a kind of division, one of
TRUNC_DIV_EXPR, FLOOR_DIV_EXPR, CEIL_DIV_EXPR, ROUND_DIV_EXPR
lquo, hquo, lrem, hrem)
enum tree_code code;
int uns;
- int lnum_orig, hnum_orig; /* num == numerator == dividend */
- int lden_orig, hden_orig; /* den == denominator == divisor */
- int *lquo, *hquo, *lrem, *hrem;
+ HOST_WIDE_INT lnum_orig, hnum_orig; /* num == numerator == dividend */
+ HOST_WIDE_INT lden_orig, hden_orig; /* den == denominator == divisor */
+ HOST_WIDE_INT *lquo, *hquo, *lrem, *hrem;
{
int quo_neg = 0;
- short num[9], den[8], quo[8]; /* extra element for scaling. */
+ short num[MAX_SHORTS + 1]; /* extra element for scaling. */
+ short den[MAX_SHORTS], quo[MAX_SHORTS];
register int i, j, work;
register int carry = 0;
unsigned int lnum = lnum_orig;
if (hden == 0 && ((lden << 8) >> 8) == lden)
{ /* simpler algorithm */
/* hnum != 0 already checked. */
- for (i = 7; i >= 0; i--)
+ for (i = MAX_SHORTS - 1; i >= 0; i--)
{
work = num[i] + (carry << 8);
quo[i] = work / lden;
int quo_est, scale, num_hi_sig, den_hi_sig, quo_hi_sig;
/* Find the highest non-zero divisor digit. */
- for (i = 7; ; i--)
+ for (i = MAX_SHORTS - 1; ; i--)
if (den[i] != 0) {
den_hi_sig = i;
break;
}
- for (i = 7; ; i--)
+ for (i = MAX_SHORTS - 1; ; i--)
if (num[i] != 0) {
num_hi_sig = i;
break;
scale = BASE / (den[den_hi_sig] + 1);
if (scale > 1) { /* scale divisor and dividend */
carry = 0;
- for (i = 0; i <= 8; i++) {
+ for (i = 0; i <= MAX_SHORTS - 1; i++) {
work = (num[i] * scale) + carry;
num[i] = work & 0xff;
carry = work >> 8;
if (num[i] != 0) num_hi_sig = i;
}
carry = 0;
- for (i = 0; i <= 7; i++) {
+ for (i = 0; i <= MAX_SHORTS - 1; i++) {
work = (den[i] * scale) + carry;
den[i] = work & 0xff;
carry = work >> 8;
if (quo_neg && (*lrem != 0 || *hrem != 0)) /* ratio < 0 && rem != 0 */
{
/* quo = quo - 1; */
- add_double (*lquo, *hquo, -1, -1, lquo, hquo);
+ add_double (*lquo, *hquo, (HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1,
+ lquo, hquo);
}
else return;
break;
case CEIL_MOD_EXPR: /* round toward positive infinity */
if (!quo_neg && (*lrem != 0 || *hrem != 0)) /* ratio > 0 && rem != 0 */
{
- add_double (*lquo, *hquo, 1, 0, lquo, hquo);
+ add_double (*lquo, *hquo, (HOST_WIDE_INT) 1, (HOST_WIDE_INT) 0,
+ lquo, hquo);
}
else return;
break;
case ROUND_DIV_EXPR:
case ROUND_MOD_EXPR: /* round to closest integer */
{
- int labs_rem = *lrem, habs_rem = *hrem;
- int labs_den = lden, habs_den = hden, ltwice, htwice;
+ HOST_WIDE_INT labs_rem = *lrem, habs_rem = *hrem;
+ HOST_WIDE_INT labs_den = lden, habs_den = hden, ltwice, htwice;
/* get absolute values */
if (*hrem < 0) neg_double (*lrem, *hrem, &labs_rem, &habs_rem);
if (hden < 0) neg_double (lden, hden, &labs_den, &habs_den);
/* if (2 * abs (lrem) >= abs (lden)) */
- mul_double (2, 0, labs_rem, habs_rem, <wice, &htwice);
- if (((unsigned) habs_den < (unsigned) htwice)
- || (((unsigned) habs_den == (unsigned) htwice)
- && ((unsigned) labs_den < (unsigned) ltwice)))
+ mul_double ((HOST_WIDE_INT) 2, (HOST_WIDE_INT) 0,
+ labs_rem, habs_rem, <wice, &htwice);
+ if (((unsigned HOST_WIDE_INT) habs_den
+ < (unsigned HOST_WIDE_INT) htwice)
+ || (((unsigned HOST_WIDE_INT) habs_den
+ == (unsigned HOST_WIDE_INT) htwice)
+ && ((HOST_WIDE_INT unsigned) labs_den
+ < (unsigned HOST_WIDE_INT) ltwice)))
{
if (*hquo < 0)
/* quo = quo - 1; */
- add_double (*lquo, *hquo, -1, -1, lquo, hquo);
+ add_double (*lquo, *hquo,
+ (HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
else
/* quo = quo + 1; */
- add_double (*lquo, *hquo, 1, 0, lquo, hquo);
+ add_double (*lquo, *hquo, (HOST_WIDE_INT) 1, (HOST_WIDE_INT) 0,
+ lquo, hquo);
}
else return;
}
}
set_float_handler (handler);
value = REAL_VALUE_TRUNCATE (mode, arg);
- set_float_handler (0);
+ set_float_handler (NULL_PTR);
return value;
}
{
if (TREE_CODE (arg1) == INTEGER_CST)
{
- register int int1l = TREE_INT_CST_LOW (arg1);
- register int int1h = TREE_INT_CST_HIGH (arg1);
- int int2l = TREE_INT_CST_LOW (arg2);
- int int2h = TREE_INT_CST_HIGH (arg2);
- int low, hi;
- int garbagel, garbageh;
+ register HOST_WIDE_INT int1l = TREE_INT_CST_LOW (arg1);
+ register HOST_WIDE_INT int1h = TREE_INT_CST_HIGH (arg1);
+ HOST_WIDE_INT int2l = TREE_INT_CST_LOW (arg2);
+ HOST_WIDE_INT int2h = TREE_INT_CST_HIGH (arg2);
+ HOST_WIDE_INT low, hi;
+ HOST_WIDE_INT garbagel, garbageh;
register tree t;
int uns = TREE_UNSIGNED (TREE_TYPE (arg1));
if (int1h == 0)
{
int2l += int1l;
- if ((unsigned) int2l < int1l)
+ if ((unsigned HOST_WIDE_INT) int2l < int1l)
int2h += 1;
t = build_int_2 (int2l, int2h);
break;
if (int2h == 0)
{
int1l += int2l;
- if ((unsigned) int1l < int2l)
+ if ((unsigned HOST_WIDE_INT) int1l < int2l)
int1h += 1;
t = build_int_2 (int1l, int1h);
break;
/* Optimize simple cases. */
if (int1h == 0)
{
- unsigned temp;
+ unsigned HOST_WIDE_INT temp;
switch (int1l)
{
case MAX_EXPR:
if (uns)
{
- low = (((unsigned) int1h < (unsigned) int2h)
- || (((unsigned) int1h == (unsigned) int2h)
- && ((unsigned) int1l < (unsigned) int2l)));
+ low = (((unsigned HOST_WIDE_INT) int1h
+ < (unsigned HOST_WIDE_INT) int2h)
+ || (((unsigned HOST_WIDE_INT) int1h
+ == (unsigned HOST_WIDE_INT) int2h)
+ && ((unsigned HOST_WIDE_INT) int1l
+ < (unsigned HOST_WIDE_INT) int2l)));
}
else
{
low = ((int1h < int2h)
|| ((int1h == int2h)
- && ((unsigned) int1l < (unsigned) int2l)));
+ && ((unsigned HOST_WIDE_INT) int1l
+ < (unsigned HOST_WIDE_INT) int2l)));
}
if (low == (code == MIN_EXPR))
t = build_int_2 (int1l, int1h);
#endif /* no REAL_ARITHMETIC */
t = build_real (TREE_TYPE (arg1),
real_value_truncate (TYPE_MODE (TREE_TYPE (arg1)), value));
- set_float_handler (0);
+ set_float_handler (NULL_PTR);
return t;
}
#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
{
register tree t;
/* Type-size nodes already made for small sizes. */
- static tree size_table[2*HOST_BITS_PER_INT+1];
+ static tree size_table[2*HOST_BITS_PER_WIDE_INT + 1];
- if (number >= 0 && number < 2*HOST_BITS_PER_INT+1 && size_table[number] != 0)
+ if (number >= 0 && number < 2*HOST_BITS_PER_WIDE_INT + 1
+ && size_table[number] != 0)
return size_table[number];
- if (number >= 0 && number < 2*HOST_BITS_PER_INT+1)
+ if (number >= 0 && number < 2*HOST_BITS_PER_WIDE_INT + 1)
{
push_obstacks_nochange ();
/* Make this a permanent node. */
#ifndef REAL_ARITHMETIC
{
REAL_VALUE_TYPE d;
- int low, high;
- int half_word = 1 << (HOST_BITS_PER_INT / 2);
+ HOST_WIDE_INT low, high;
+ HOST_WIDE_INT half_word
+ = (HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2);
d = TREE_REAL_CST (arg1);
if (d < 0)
d = -d;
- high = (int) (d / half_word / half_word);
+ high = (HOST_WIDE_INT) (d / half_word / half_word);
d -= (REAL_VALUE_TYPE) high * half_word * half_word;
- low = (unsigned) d;
+ low = (unsigned HOST_WIDE_INT) d;
if (TREE_REAL_CST (arg1) < 0)
neg_double (low, high, &low, &high);
t = build_int_2 (low, high);
}
#else
{
- int low, high;
+ HOST_WIDE_INT low, high;
REAL_VALUE_TO_INT (low, high, TREE_REAL_CST (arg1));
t = build_int_2 (low, high);
}
t = build_real (type, real_value_truncate (TYPE_MODE (type),
TREE_REAL_CST (arg1)));
- set_float_handler (0);
+ set_float_handler (NULL_PTR);
return t;
}
}
&& TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (arg1, 0))))
{
int prec = TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (arg1, 0)));
- if (prec < BITS_PER_WORD && prec < HOST_BITS_PER_INT
- && (~TREE_INT_CST_LOW (arg0) & ((1 << prec) - 1)) == 0)
+ if (prec < BITS_PER_WORD && prec < HOST_BITS_PER_WIDE_INT
+ && (~TREE_INT_CST_LOW (arg0)
+ & (((HOST_WIDE_INT) 1 << prec) - 1)) == 0)
return build1 (NOP_EXPR, type, TREE_OPERAND (arg1, 0));
}
if (TREE_CODE (arg1) == INTEGER_CST && TREE_CODE (arg0) == NOP_EXPR
&& TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (arg0, 0))))
{
int prec = TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (arg0, 0)));
- if (prec < BITS_PER_WORD && prec < HOST_BITS_PER_INT
- && (~TREE_INT_CST_LOW (arg1) & ((1 << prec) - 1)) == 0)
+ if (prec < BITS_PER_WORD && prec < HOST_BITS_PER_WIDE_INT
+ && (~TREE_INT_CST_LOW (arg1)
+ & (((HOST_WIDE_INT) 1 << prec) - 1)) == 0)
return build1 (NOP_EXPR, type, TREE_OPERAND (arg0, 0));
}
goto associate;
{
tree new_op
= build_int_2 (TREE_INT_CST_LOW (TREE_OPERAND (arg0, 1))
- / TREE_INT_CST_LOW (arg1));
+ / TREE_INT_CST_LOW (arg1), 0);
TREE_TYPE (new_op) = type;
return build (MULT_EXPR, type, TREE_OPERAND (arg0, 0), new_op);
{
tree new_op
= build_int_2 (TREE_INT_CST_LOW (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
- / TREE_INT_CST_LOW (arg1));
+ / TREE_INT_CST_LOW (arg1), 0);
TREE_TYPE (new_op) = type;
return build (MULT_EXPR, type,
#define X_OK 1
#endif
+#ifndef NULL
+#define NULL 0
+#endif
+
+#ifndef NULL_PTR
+#define NULL_PTR (char *) NULL
+#endif
+
#ifdef USG
#define vfork fork
#endif /* USG */
if (gcc_exec_prefix)
{
- add_prefix (&exec_prefix, gcc_exec_prefix, 0, 0, 0);
- add_prefix (&startfile_prefix, gcc_exec_prefix, 0, 0, 0);
+ add_prefix (&exec_prefix, gcc_exec_prefix, 0, 0, NULL_PTR);
+ add_prefix (&startfile_prefix, gcc_exec_prefix, 0, 0, NULL_PTR);
}
/* COMPILER_PATH and LIBRARY_PATH have values
}
else
nstore[endp-startp] = 0;
- add_prefix (&exec_prefix, nstore, 0, 0, 0);
+ add_prefix (&exec_prefix, nstore, 0, 0, NULL_PTR);
if (*endp == 0)
break;
endp = startp = endp + 1;
}
else
nstore[endp-startp] = 0;
- add_prefix (&startfile_prefix, nstore, 0, 0, 0);
+ add_prefix (&startfile_prefix, nstore, 0, 0, NULL_PTR);
/* Make separate list of dirs that came from LIBRARY_PATH. */
- add_prefix (&library_prefix, nstore, 0, 0, 0);
+ add_prefix (&library_prefix, nstore, 0, 0, NULL_PTR);
if (*endp == 0)
break;
endp = startp = endp + 1;
}
else
nstore[endp-startp] = 0;
- add_prefix (&startfile_prefix, nstore, 0, 0, 0);
+ add_prefix (&startfile_prefix, nstore, 0, 0, NULL_PTR);
/* Make separate list of dirs that came from LIBRARY_PATH. */
- add_prefix (&library_prefix, nstore, 0, 0, 0);
+ add_prefix (&library_prefix, nstore, 0, 0, NULL_PTR);
if (*endp == 0)
break;
endp = startp = endp + 1;
/* These come before the md prefixes so that we will find gcc's subcommands
(such as cpp) rather than those of the host system. */
- add_prefix (&exec_prefix, standard_exec_prefix, 0, 1, 0);
- add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 1, 0);
+ add_prefix (&exec_prefix, standard_exec_prefix, 0, 1, NULL_PTR);
+ add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 1, NULL_PTR);
- add_prefix (&startfile_prefix, standard_exec_prefix, 0, 1, 0);
- add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 1, 0);
+ add_prefix (&startfile_prefix, standard_exec_prefix, 0, 1, NULL_PTR);
+ add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 1, NULL_PTR);
/* More prefixes are enabled in main, after we read the specs file
and determine whether this is cross-compilation or not. */
this_is_output_file = 0;
this_is_library_file = 0;
- value = do_spec_1 (spec, 0, NULL);
+ value = do_spec_1 (spec, 0, NULL_PTR);
/* Force out any unfinished command.
If -pipe, this forces out the last command if it ended in `|'. */
{
if (is_linker_dir (pl->prefix, machine_suffix))
{
- do_spec_1 ("-L", 0, 0);
+ do_spec_1 ("-L", 0, NULL_PTR);
#ifdef SPACE_AFTER_L_OPTION
- do_spec_1 (" ", 0, 0);
+ do_spec_1 (" ", 0, NULL_PTR);
#endif
- do_spec_1 (pl->prefix, 1, 0);
+ do_spec_1 (pl->prefix, 1, NULL_PTR);
/* Remove slash from machine_suffix. */
if (strlen (machine_suffix) >= bufsize)
bufsize = strlen (machine_suffix) * 2 + 1;
idx = strlen (buffer);
if (buffer[idx - 1] == '/')
buffer[idx - 1] = 0;
- do_spec_1 (buffer, 1, 0);
+ do_spec_1 (buffer, 1, NULL_PTR);
/* Make this a separate argument. */
- do_spec_1 (" ", 0, 0);
+ do_spec_1 (" ", 0, NULL_PTR);
}
}
if (!pl->require_machine_suffix)
{
if (is_linker_dir (pl->prefix, ""))
{
- do_spec_1 ("-L", 0, 0);
+ do_spec_1 ("-L", 0, NULL_PTR);
#ifdef SPACE_AFTER_L_OPTION
- do_spec_1 (" ", 0, 0);
+ do_spec_1 (" ", 0, NULL_PTR);
#endif
/* Remove slash from pl->prefix. */
if (strlen (pl->prefix) >= bufsize)
idx = strlen (buffer);
if (buffer[idx - 1] == '/')
buffer[idx - 1] = 0;
- do_spec_1 (buffer, 1, 0);
+ do_spec_1 (buffer, 1, NULL_PTR);
/* Make this a separate argument. */
- do_spec_1 (" ", 0, 0);
+ do_spec_1 (" ", 0, NULL_PTR);
}
}
}
case 'X':
for (i = 0; i < n_linker_options; i++)
{
- do_spec_1 (linker_options[i], 1, NULL);
+ do_spec_1 (linker_options[i], 1, NULL_PTR);
/* Make each accumulated option a separate argument. */
- do_spec_1 (" ", 0, NULL);
+ do_spec_1 (" ", 0, NULL_PTR);
}
break;
a certain constant string as a spec. */
case '1':
- do_spec_1 (cc1_spec, 0, NULL);
+ do_spec_1 (cc1_spec, 0, NULL_PTR);
break;
case '2':
- do_spec_1 (cc1plus_spec, 0, NULL);
+ do_spec_1 (cc1plus_spec, 0, NULL_PTR);
break;
case 'a':
- do_spec_1 (asm_spec, 0, NULL);
+ do_spec_1 (asm_spec, 0, NULL_PTR);
break;
case 'A':
- do_spec_1 (asm_final_spec, 0, NULL);
+ do_spec_1 (asm_final_spec, 0, NULL_PTR);
break;
case 'c':
- do_spec_1 (signed_char_spec, 0, NULL);
+ do_spec_1 (signed_char_spec, 0, NULL_PTR);
break;
case 'C':
- do_spec_1 (cpp_spec, 0, NULL);
+ do_spec_1 (cpp_spec, 0, NULL_PTR);
break;
case 'E':
- do_spec_1 (endfile_spec, 0, NULL);
+ do_spec_1 (endfile_spec, 0, NULL_PTR);
break;
case 'l':
- do_spec_1 (link_spec, 0, NULL);
+ do_spec_1 (link_spec, 0, NULL_PTR);
break;
case 'L':
- do_spec_1 (lib_spec, 0, NULL);
+ do_spec_1 (lib_spec, 0, NULL_PTR);
break;
case 'p':
*x = 0;
- do_spec_1 (buf, 0, NULL);
+ do_spec_1 (buf, 0, NULL_PTR);
}
break;
*x = 0;
- do_spec_1 (buf, 0, NULL);
+ do_spec_1 (buf, 0, NULL_PTR);
}
break;
case 'S':
- do_spec_1 (startfile_spec, 0, NULL);
+ do_spec_1 (startfile_spec, 0, NULL_PTR);
break;
/* Here we define characters other than letters and digits. */
break;
case '*':
- do_spec_1 (soft_matched_part, 1, NULL);
- do_spec_1 (" ", 0, NULL);
+ do_spec_1 (soft_matched_part, 1, NULL_PTR);
+ do_spec_1 (" ", 0, NULL_PTR);
break;
/* Process a string found as the value of a spec given by name.
if (sl)
{
if (c == '(')
- do_spec_1 (name, 0, NULL);
+ do_spec_1 (name, 0, NULL_PTR);
else
{
char *x = (char *) alloca (strlen (name) * 2 + 1);
}
*x = 0;
- do_spec_1 (buf, 0, NULL);
+ do_spec_1 (buf, 0, NULL_PTR);
}
}
abort ();
if (negate != found
- && do_spec_1 (save_string (p + 1, q - p - 2), 0, NULL) < 0)
+ && do_spec_1 (save_string (p + 1, q - p - 2), 0, NULL_PTR) < 0)
return 0;
return q;
}
else
{
- if (do_spec_1 (save_string (p + 1, q - p - 2), 0, NULL) < 0)
+ if (do_spec_1 (save_string (p + 1, q - p - 2), 0, NULL_PTR) < 0)
return 0;
}
}
{
/* Here if a %{|...} conditional fails: output a minus sign,
which means "standard output" or "standard input". */
- do_spec_1 ("-", 0, NULL);
+ do_spec_1 ("-", 0, NULL_PTR);
}
}
{
if (!omit_first_word)
{
- do_spec_1 ("-", 0, NULL);
- do_spec_1 (switches[switchnum].part1, 1, NULL);
+ do_spec_1 ("-", 0, NULL_PTR);
+ do_spec_1 (switches[switchnum].part1, 1, NULL_PTR);
}
- do_spec_1 (" ", 0, NULL);
+ do_spec_1 (" ", 0, NULL_PTR);
if (switches[switchnum].args != 0)
{
char **p;
for (p = switches[switchnum].args; *p; p++)
{
- do_spec_1 (*p, 1, NULL);
- do_spec_1 (" ", 0, NULL);
+ do_spec_1 (*p, 1, NULL_PTR);
+ do_spec_1 (" ", 0, NULL_PTR);
}
}
switches[switchnum].valid = 1;
if (!cross_compile)
{
#ifdef MD_EXEC_PREFIX
- add_prefix (&exec_prefix, md_exec_prefix, 0, 0, 0);
- add_prefix (&startfile_prefix, md_exec_prefix, 0, 0, 0);
+ add_prefix (&exec_prefix, md_exec_prefix, 0, 0, NULL_PTR);
+ add_prefix (&startfile_prefix, md_exec_prefix, 0, 0, NULL_PTR);
#endif
#ifdef MD_STARTFILE_PREFIX
- add_prefix (&startfile_prefix, md_startfile_prefix, 0, 0, 0);
+ add_prefix (&startfile_prefix, md_startfile_prefix, 0, 0, NULL_PTR);
#endif
#ifdef MD_STARTFILE_PREFIX_1
- add_prefix (&startfile_prefix, md_startfile_prefix_1, 0, 0, 0);
+ add_prefix (&startfile_prefix, md_startfile_prefix_1, 0, 0, NULL_PTR);
#endif
- add_prefix (&startfile_prefix, standard_startfile_prefix, 0, 0, 0);
- add_prefix (&startfile_prefix, standard_startfile_prefix_1, 0, 0, 0);
- add_prefix (&startfile_prefix, standard_startfile_prefix_2, 0, 0, 0);
+ add_prefix (&startfile_prefix, standard_startfile_prefix, 0, 0,
+ NULL_PTR);
+ add_prefix (&startfile_prefix, standard_startfile_prefix_1, 0, 0,
+ NULL_PTR);
+ add_prefix (&startfile_prefix, standard_startfile_prefix_2, 0, 0,
+ NULL_PTR);
#if 0 /* Can cause surprises, and one can use -B./ instead. */
- add_prefix (&startfile_prefix, "./", 0, 1, 0);
+ add_prefix (&startfile_prefix, "./", 0, 1, NULL_PTR);
#endif
}
language = cp->spec + 1;
new = (struct compiler *) xmalloc (sizeof (struct compiler));
new->suffix = cp->suffix;
- new->spec = lookup_compiler (0, 0, language)->spec;
+ new->spec = lookup_compiler (NULL_PTR, 0, language)->spec;
return new;
}
/* A non-alias entry: return it. */
name if any. */
if (indent > 0)
fprintf (file, " ");
- fprintf (file, "%s <%s %x", prefix,
- tree_code_name[(int) TREE_CODE (node)], (int) node);
+ fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
+ fprintf (file, HOST_PTR_PRINTF, node);
if (class == 'd')
{
&& TREE_INT_CST_LOW (node) != 0)
fprintf (file, " -%1u", -TREE_INT_CST_LOW (node));
else
- fprintf (file, " 0x%x%08x",
- TREE_INT_CST_HIGH (node),
- TREE_INT_CST_LOW (node));
+ fprintf (file,
+#if HOST_BITS_PER_WIDE_INT == 64
+#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
+ " 0x%lx%016lx",
+#else
+ " 0x%x%016x",
+#endif
+#else
+#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
+ " 0x%lx%08lx",
+#else
+ " 0x%x%08x",
+#endif
+#endif
+ TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node));
}
if (TREE_CODE (node) == REAL_CST)
{
indent_to (file, indent);
/* Print the slot this node is in, and its code, and address. */
- fprintf (file, "%s <%s %x", prefix,
- tree_code_name[(int) TREE_CODE (node)], (int) node);
+ fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
+ fprintf (file, HOST_PTR_PRINTF, node);
/* Print the name, if any. */
if (class == 'd')
print_rtl (file, DECL_INCOMING_RTL (node));
}
else if (TREE_CODE (node) == FUNCTION_DECL)
- fprintf (file, "saved-insns 0x%x", DECL_SAVED_INSNS (node));
+ {
+ fprintf (file, "saved-insns ");
+ fprintf (file, HOST_PTR_PRINTF, DECL_SAVED_INSNS (node));
+ }
}
/* Print the decl chain only if decl is at second level. */
&& TREE_INT_CST_LOW (node) != 0)
fprintf (file, " -%1u", -TREE_INT_CST_LOW (node));
else
- fprintf (file, " 0x%x%08x",
- TREE_INT_CST_HIGH (node),
- TREE_INT_CST_LOW (node));
+ fprintf (file,
+#if HOST_BITS_PER_WIDE_INT == 64
+#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
+ " 0x%lx%016lx",
+#else
+ " 0x%x%016x",
+#endif
+#else
+#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
+ " 0x%lx%08lx",
+#else
+ " 0x%x%08x",
+#endif
+#endif
+ TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node));
break;
case REAL_CST: