+2006-10-22 Richard Sandiford <richard@codesourcery.com>
+ Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR target/28232
+ * config/sh/sh.c (expand_block_move): Use a BLKmode rather than
+ SImode memory reference for the source of a movua.
+ * config/sh/sh.md (UNSPEC_MOVUA): New macro.
+ (movua): Use an unspec instead of sign_extract. Expect the source
+ to have mode BLKmode.
+ (extv, insv): Use a BLKmode rather than SImode memory reference
+ for the source of a movua.
+
2006-10-22 Jeff Law <law@redhat.com>
Richard Guenther <rguenther@suse.de>
while (copied + 4 <= bytes)
{
rtx to = adjust_address (dest, SImode, copied);
- rtx from = adjust_automodify_address (src, SImode, src_addr, copied);
+ rtx from = adjust_automodify_address (src, BLKmode,
+ src_addr, copied);
+ set_mem_size (from, GEN_INT (4));
emit_insn (gen_movua (temp, from));
emit_move_insn (src_addr, plus_constant (src_addr, 4));
emit_move_insn (to, temp);
(UNSPEC_THUNK 36)
(UNSPEC_SP_SET 40)
(UNSPEC_SP_TEST 41)
+ (UNSPEC_MOVUA 42)
;; These are used with unspec_volatile.
(UNSPECV_BLOCKAGE 0)
(define_insn "movua"
[(set (match_operand:SI 0 "register_operand" "=z")
- (sign_extract:SI (match_operand:SI 1 "unaligned_load_operand" "Sua>")
- (const_int 32) (const_int 0)))]
+ (unspec:SI [(match_operand:BLK 1 "unaligned_load_operand" "Sua>")]
+ UNSPEC_MOVUA))]
"TARGET_SH4A_ARCH"
"movua.l %1,%0"
[(set_attr "type" "movua")])
&& INTVAL (operands[3]) == -24 * (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN)
&& GET_CODE (operands[1]) == MEM && MEM_ALIGN (operands[1]) < 32)
{
- emit_insn (gen_movua (operands[0],
- adjust_address (operands[1], SImode, 0)));
+ rtx src = adjust_address (operands[1], BLKmode, 0);
+ set_mem_size (src, GEN_INT (4));
+ emit_insn (gen_movua (operands[0], src));
DONE;
}
&& INTVAL (operands[3]) == -24 * (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN)
&& GET_CODE (operands[1]) == MEM && MEM_ALIGN (operands[1]) < 32)
{
- emit_insn (gen_movua (operands[0],
- adjust_address (operands[1], SImode, 0)));
+ rtx src = adjust_address (operands[1], BLKmode, 0);
+ set_mem_size (src, GEN_INT (4));
+ emit_insn (gen_movua (operands[0], src));
DONE;
}