* emit-rtl.c (gen_int_mode): New function.
* rtl.h: Prototype for it.
* combine.c (make_extraction, simplify_comparison), expmed.c
(store_bit_field, expand_mult_highpart, expand_divmod), expr.c
(convert_modes, store_field), optabs.c (expand_fix),
simplify-rtx.c (neg_const_int, simplify_unary_real),
* config/rs6000/rs6000.c, config/rs6000/rs6000.md:
Use it instead of GEN_INT (trunc_int_for_mode (...)).
From-SVN: r51030
+2002-03-19 Lars Brinkhoff <lars@nocrew.org>
+
+ * emit-rtl.c (gen_int_mode): New function.
+ * rtl.h: Prototype for it.
+ * combine.c (make_extraction, simplify_comparison), expmed.c
+ (store_bit_field, expand_mult_highpart, expand_divmod), expr.c
+ (convert_modes, store_field), optabs.c (expand_fix),
+ simplify-rtx.c (neg_const_int, simplify_unary_real),
+
+ * config/rs6000/rs6000.c, config/rs6000/rs6000.md:
+ Use it instead of GEN_INT (trunc_int_for_mode (...)).
+
2002-03-19 Jakub Jelinek <jakub@redhat.com>
PR c/5656
2002-03-18 Aldy Hernandez <aldyh@redhat.com>
- * config/rs6000/rs6000.h (PREDICATE_CODES): Add PARALLEL to
- any_operand.
+ * config/rs6000/rs6000.h (PREDICATE_CODES): Add PARALLEL to
+ any_operand.
2002-03-17 Richard Henderson <rth@redhat.com>
return new;
if (GET_CODE (new) == CONST_INT)
- return GEN_INT (trunc_int_for_mode (INTVAL (new), mode));
+ return gen_int_mode (INTVAL (new), mode);
/* If we know that no extraneous bits are set, and that the high
bit is not set, convert the extraction to the cheaper of
unsigned HOST_WIDE_INT temp = const_op & GET_MODE_MASK (mode);
temp >>= INTVAL (XEXP (op0, 1));
- op1 = GEN_INT (trunc_int_for_mode (temp, mode));
+ op1 = gen_int_mode (temp, mode);
op0 = XEXP (op0, 0);
continue;
}
/* FIXME. This should never happen. */
/* Since it seems that it does, do the safe thing and convert
to a CONST_INT. */
- operands[1] =
- GEN_INT (trunc_int_for_mode (CONST_DOUBLE_LOW (operands[1]), mode));
+ operands[1] = gen_int_mode (CONST_DOUBLE_LOW (operands[1]), mode);
}
if (GET_CODE (operands[1]) == CONST_DOUBLE
&& ! FLOAT_MODE_P (mode)
bottom_of_stack, stacksize,
NULL_RTX, 1, OPTAB_WIDEN);
- emit_move_insn (tocompare,
- GEN_INT (trunc_int_for_mode (TARGET_32BIT
- ? 0x80410014
- : 0xE8410028, SImode)));
+ emit_move_insn (tocompare, gen_int_mode (TARGET_32BIT ? 0x80410014
+ : 0xE8410028, SImode));
if (insn_after_throw == NULL_RTX)
abort ();
else
operands[2] = gen_lowpart (SImode, operands[0]);
- operands[3] = GEN_INT (trunc_int_for_mode (l, SImode));
+ operands[3] = gen_int_mode (l, SImode);
}")
(define_insn "*movsf_hardfloat"
operands[2] = operand_subword (operands[0], endian, 0, DFmode);
operands[3] = operand_subword (operands[0], 1 - endian, 0, DFmode);
- operands[4] = GEN_INT (trunc_int_for_mode (l[endian], SImode));
- operands[5] = GEN_INT (trunc_int_for_mode (l[1 - endian], SImode));
+ operands[4] = gen_int_mode (l[endian], SImode);
+ operands[5] = gen_int_mode (l[1 - endian], SImode);
}")
(define_split
return (rtx) *slot;
}
+rtx
+gen_int_mode (c, mode)
+ HOST_WIDE_INT c;
+ enum machine_mode mode;
+{
+ return GEN_INT (trunc_int_for_mode (c, mode));
+}
+
/* CONST_DOUBLEs needs special handling because their length is known
only at run-time. */
value1 = gen_lowpart (maxmode, value1);
}
else if (GET_CODE (value) == CONST_INT)
- value1 = GEN_INT (trunc_int_for_mode (INTVAL (value), maxmode));
+ value1 = gen_int_mode (INTVAL (value), maxmode);
else if (!CONSTANT_P (value))
/* Parse phase is supposed to make VALUE's data type
match that of the component reference, which is a type
if (size > HOST_BITS_PER_WIDE_INT)
abort ();
- op1 = GEN_INT (trunc_int_for_mode (cnst1, mode));
+ op1 = gen_int_mode (cnst1, mode);
wide_op1
= immed_double_const (cnst1,
if (rem_flag && d < 0)
{
d = abs_d;
- op1 = GEN_INT (trunc_int_for_mode (abs_d, compute_mode));
+ op1 = gen_int_mode (abs_d, compute_mode);
}
if (d == 1)
t1 = copy_to_mode_reg (compute_mode, op0);
do_cmp_and_jump (t1, const0_rtx, GE,
compute_mode, label);
- expand_inc (t1, GEN_INT (trunc_int_for_mode
- (abs_d - 1, compute_mode)));
+ expand_inc (t1, gen_int_mode (abs_d - 1,
+ compute_mode));
emit_label (label);
quotient = expand_shift (RSHIFT_EXPR, compute_mode, t1,
build_int_2 (lgup, 0),
t1 = expand_shift (RSHIFT_EXPR, compute_mode, op0,
build_int_2 (pre_shift, 0), NULL_RTX, unsignedp);
quotient = expand_mult (compute_mode, t1,
- GEN_INT (trunc_int_for_mode
- (ml, compute_mode)),
+ gen_int_mode (ml, compute_mode),
NULL_RTX, 0);
insn = get_last_insn ();
&& (val & ((HOST_WIDE_INT) 1 << (width - 1))))
val |= (HOST_WIDE_INT) (-1) << width;
- return GEN_INT (trunc_int_for_mode (val, mode));
+ return gen_int_mode (val, mode);
}
return gen_lowpart (mode, x);
if (unsignedp)
return expand_and (tmode, temp,
- GEN_INT (trunc_int_for_mode (width_mask,
- tmode)),
+ gen_int_mode (width_mask, tmode),
NULL_RTX);
count = build_int_2 (GET_MODE_BITSIZE (tmode) - bitsize, 0);
NULL_RTX, 0, OPTAB_LIB_WIDEN);
expand_fix (to, target, 0);
target = expand_binop (GET_MODE (to), xor_optab, to,
- GEN_INT (trunc_int_for_mode
- ((HOST_WIDE_INT) 1 << (bitsize - 1),
- GET_MODE (to))),
+ gen_int_mode
+ ((HOST_WIDE_INT) 1 << (bitsize - 1),
+ GET_MODE (to)),
to, 1, OPTAB_LIB_WIDEN);
if (target != to)
extern rtvec gen_rtvec PARAMS ((int, ...));
extern rtx copy_insn_1 PARAMS ((rtx));
extern rtx copy_insn PARAMS ((rtx));
+extern rtx gen_int_mode PARAMS ((HOST_WIDE_INT,
+ enum machine_mode));
/* In rtl.c */
extern rtx rtx_alloc PARAMS ((RTX_CODE));
enum machine_mode mode;
rtx i;
{
- return GEN_INT (trunc_int_for_mode (- INTVAL (i), mode));
+ return gen_int_mode (- INTVAL (i), mode);
}
\f
default:
abort ();
}
- args->result = GEN_INT (trunc_int_for_mode (i, args->mode));
+ args->result = gen_int_mode (i, args->mode);
}
else
{