mask = ((HOST_WIDE_INT)1 << (pos + len)) - 1;
mask &= ~(((HOST_WIDE_INT)1 << pos) - 1);
- operands[3] = gen_rtx_AND (mode, operands[0], GEN_INT (mask));
+ operands[3] = gen_rtx_AND (mode, operands[0],
+ GEN_INT (trunc_int_for_mode (mask, mode)));
}")
;; %%% This used to optimize known byte-wide and operations to memory,
"TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))"
[(parallel [(set (match_dup 0) (xor:SI (match_dup 0) (match_dup 1)))
(clobber (reg:CC 17))])]
- "operands[1] = GEN_INT (0x80000000);
+ "operands[1] = GEN_INT (trunc_int_for_mode (0x80000000, SImode));
operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]));")
(define_split
size = 10;
operands[0] = gen_rtx_MEM (QImode, XEXP (operands[0], 0));
operands[0] = adj_offsettable_operand (operands[0], size - 1);
- operands[1] = GEN_INT (0x80);
+ operands[1] = GEN_INT (trunc_int_for_mode (0x80, QImode));
}")
(define_expand "negdf2"
"TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))"
[(parallel [(set (match_dup 3) (xor:SI (match_dup 3) (match_dup 4)))
(clobber (reg:CC 17))])]
- "operands[4] = GEN_INT (0x80000000);
+ "operands[4] = GEN_INT (trunc_int_for_mode (0x80000000, SImode));
split_di (operands+0, 1, operands+2, operands+3);")
(define_expand "negxf2"
"TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))"
[(parallel [(set (match_dup 0) (and:SI (match_dup 0) (match_dup 1)))
(clobber (reg:CC 17))])]
- "operands[1] = GEN_INT (~0x80000000);
+ "operands[1] = GEN_INT (trunc_int_for_mode (~0x80000000, SImode));
operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]));")
(define_split
size = 10;
operands[0] = gen_rtx_MEM (QImode, XEXP (operands[0], 0));
operands[0] = adj_offsettable_operand (operands[0], size - 1);
- operands[1] = GEN_INT (~0x80);
+ operands[1] = GEN_INT (trunc_int_for_mode (~0x80, QImode));
}")
(define_expand "absdf2"
"TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))"
[(parallel [(set (match_dup 3) (and:SI (match_dup 3) (match_dup 4)))
(clobber (reg:CC 17))])]
- "operands[4] = GEN_INT (~0x80000000);
+ "operands[4] = GEN_INT (trunc_int_for_mode (~0x80000000, SImode));
split_di (operands+0, 1, operands+2, operands+3);")
(define_expand "absxf2"
"TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))"
[(parallel [(set (match_dup 0) (and:SI (match_dup 0) (match_dup 1)))
(clobber (reg:CC 17))])]
- "operands[1] = GEN_INT (~0x8000);
+ "operands[1] = GEN_INT (trunc_int_for_mode (~0x8000, SImode));
operands[0] = gen_rtx_REG (SImode, true_regnum (operands[0]) + 2);")
(define_insn "*abstf2_if"
"TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))"
[(parallel [(set (match_dup 0) (and:SI (match_dup 0) (match_dup 1)))
(clobber (reg:CC 17))])]
- "operands[1] = GEN_INT (~0x8000);
+ "operands[1] = GEN_INT (trunc_int_for_mode (~0x8000, SImode));
operands[0] = gen_rtx_REG (SImode, true_regnum (operands[0]) + 2);")
(define_insn "*abssf2_1"
[(set (match_dup 0)
(mult:DI (match_dup 1)
(match_dup 2)))]
- "operands[2] = GEN_INT (1 << INTVAL (operands[2]));")
+ "operands[2] = GEN_INT (trunc_int_for_mode (1 << INTVAL (operands[2]),
+ DImode));")
;; This pattern can't accept a variable shift count, since shifts by
;; zero don't affect the flags. We assume that shifts by constant
rtx pat;
operands[0] = gen_lowpart (SImode, operands[0]);
operands[1] = gen_lowpart (Pmode, operands[1]);
- operands[2] = GEN_INT (1 << INTVAL (operands[2]));
+ operands[2] = GEN_INT (trunc_int_for_mode (1 << INTVAL (operands[2]),
+ Pmode));
pat = gen_rtx_MULT (Pmode, operands[1], operands[2]);
if (Pmode != SImode)
pat = gen_rtx_SUBREG (SImode, pat, 0);
"
{
operands[1] = gen_lowpart (Pmode, operands[1]);
- operands[2] = GEN_INT (1 << INTVAL (operands[2]));
+ operands[2] = GEN_INT (trunc_int_for_mode (1 << INTVAL (operands[2]),
+ Pmode));
}")
;; This pattern can't accept a variable shift count, since shifts by
(set (match_dup 0)
(and:SI (match_dup 1) (match_dup 2)))])]
"operands[2]
- = GEN_INT (INTVAL (operands[2]) & GET_MODE_MASK (GET_MODE (operands[0])));
+ = GEN_INT (trunc_int_for_mode (INTVAL (operands[2])
+ & GET_MODE_MASK (GET_MODE (operands[0])),
+ SImode));
operands[0] = gen_lowpart (SImode, operands[0]);
operands[1] = gen_lowpart (SImode, operands[1]);")
(compare:CCNO (and:SI (match_dup 0) (match_dup 1))
(const_int 0)))]
"operands[1]
- = GEN_INT (INTVAL (operands[1]) & GET_MODE_MASK (GET_MODE (operands[0])));
+ = GEN_INT (trunc_int_for_mode (INTVAL (operands[1])
+ & GET_MODE_MASK (GET_MODE (operands[0])),
+ SImode));
operands[0] = gen_lowpart (SImode, operands[0]);")
(define_split