+2004-07-05 Roger Sayle <roger@eyesopen.com>
+
+ * calls.c (load_register_parameters): Call expand_shift instead
+ of expand_binop with ashl_optab (or other shift optab) directly.
+ * expr.c (emit_group_load, emit_group_store): Likewise.
+ * function.c (assign_parm_setup_block): Likewise.
+ * stmt.c (shift_return_value): Likewise.
+
2004-07-05 Jakub Jelinek <jakub@redhat.com>
* expr.c (expand_assignment): Disable the bitfield += optimizations.
call only uses SIZE bytes at the msb end, but it doesn't
seem worth generating rtl to say that. */
reg = gen_rtx_REG (word_mode, REGNO (reg));
- x = expand_binop (word_mode, ashl_optab, reg,
- GEN_INT (shift), reg, 1, OPTAB_WIDEN);
+ x = expand_shift (LSHIFT_EXPR, word_mode, reg,
+ build_int_2 (shift, 0), reg, 1);
if (x != reg)
emit_move_insn (reg, x);
}
rtx ri = gen_rtx_REG (word_mode, REGNO (reg));
rtx x = gen_reg_rtx (word_mode);
int shift = (UNITS_PER_WORD - size) * BITS_PER_UNIT;
- optab dir = BYTES_BIG_ENDIAN ? lshr_optab : ashl_optab;
+ enum tree_code dir = BYTES_BIG_ENDIAN ? RSHIFT_EXPR
+ : LSHIFT_EXPR;
emit_move_insn (x, tem);
- x = expand_binop (word_mode, dir, x, GEN_INT (shift),
- ri, 1, OPTAB_WIDEN);
+ x = expand_shift (dir, word_mode, x,
+ build_int_2 (shift, 0), ri, 1);
if (x != ri)
emit_move_insn (ri, x);
}
mode, mode, ssize);
if (shift)
- expand_binop (mode, ashl_optab, tmps[i], GEN_INT (shift),
- tmps[i], 0, OPTAB_WIDEN);
+ tmps[i] = expand_shift (LSHIFT_EXPR, mode, tmps[i],
+ build_int_2 (shift, 0), tmps[i], 0);
}
emit_queue ();
)
{
int shift = (bytelen - (ssize - bytepos)) * BITS_PER_UNIT;
- expand_binop (mode, ashr_optab, tmps[i], GEN_INT (shift),
- tmps[i], 0, OPTAB_WIDEN);
+ tmps[i] = expand_shift (RSHIFT_EXPR, mode, tmps[i],
+ build_int_2 (shift, 0), tmps[i], 0);
}
bytelen = ssize - bytepos;
}
int by = (UNITS_PER_WORD - size) * BITS_PER_UNIT;
rtx reg = gen_rtx_REG (word_mode, REGNO (data->entry_parm));
- x = expand_binop (word_mode, ashl_optab, reg,
- GEN_INT (by), 0, 1, OPTAB_WIDEN);
+ x = expand_shift (LSHIFT_EXPR, word_mode, reg,
+ build_int_2 (by, 0), NULL_RTX, 1);
tem = change_address (mem, word_mode, 0);
emit_move_insn (tem, x);
}
shift = (GET_MODE_BITSIZE (GET_MODE (target))
- BITS_PER_UNIT * int_size_in_bytes (type));
if (shift > 0)
- val = expand_binop (GET_MODE (target), ashl_optab,
+ val = expand_shift (LSHIFT_EXPR, GET_MODE (target),
gen_lowpart (GET_MODE (target), val),
- GEN_INT (shift), target, 1, OPTAB_WIDEN);
+ build_int_2 (shift, 0), target, 1);
}
return val;
}