summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-05-08 15:17:16 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-05-08 15:17:16 +0000
commit3a13dafeff16e2af059d65844fa8367bb061d5e8 (patch)
treeb0c3ce3ae5f7a0d0c7a2a0b941e75d4233cc100b /gnu
parent5fad63fb0dcbcd60232dee11708b4f9fcc504250 (diff)
In block_move_sequence(), use emit_move_insn() instead of rolling our own
incomplete equivalent. The ugly BLK<->{QI,HI,SI,DI} load and store insns in m88k.md can thus get removed, and there was much rejoicing (as well as fewer warnings when building).
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/gcc/gcc/config/m88k/m88k.c16
-rw-r--r--gnu/usr.bin/gcc/gcc/config/m88k/m88k.md45
2 files changed, 4 insertions, 57 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c
index 9ef505e71de..24c41b7300f 100644
--- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c
+++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c
@@ -738,7 +738,6 @@ block_move_sequence (dest, dest_mem, src, src_mem, size, align, offset)
do
{
- rtx srcp, dstp;
next = phase;
phase = !phase;
@@ -752,11 +751,8 @@ block_move_sequence (dest, dest_mem, src, src_mem, size, align, offset)
temp[next] = gen_reg_rtx (mode[next]);
}
size -= amount[next];
- srcp = gen_rtx_MEM (MEM_IN_STRUCT_P (src_mem) ? mode[next] : BLKmode,
- plus_constant (src, offset_ld));
-
- MEM_COPY_ATTRIBUTES (srcp, src_mem);
- emit_insn (gen_rtx_SET (VOIDmode, temp[next], srcp));
+ emit_move_insn (temp[next],
+ adjust_address (src_mem, mode[next], offset_ld));
offset_ld += amount[next];
active[next] = TRUE;
}
@@ -764,12 +760,8 @@ block_move_sequence (dest, dest_mem, src, src_mem, size, align, offset)
if (active[phase])
{
active[phase] = FALSE;
- dstp
- = gen_rtx_MEM (MEM_IN_STRUCT_P (dest_mem) ? mode[phase] : BLKmode,
- plus_constant (dest, offset_st));
-
- MEM_COPY_ATTRIBUTES (dstp, dest_mem);
- emit_insn (gen_rtx_SET (VOIDmode, dstp, temp[phase]));
+ emit_move_insn (adjust_address (dest_mem, mode[phase], offset_st),
+ temp[phase]);
offset_st += amount[phase];
}
}
diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.md b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.md
index 40bd2ef192c..f0dd70b9b4b 100644
--- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.md
+++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.md
@@ -2180,51 +2180,6 @@
DONE;
}")
-;; ??? We shouldn't be allowing such mode mismatches
-(define_insn ""
- [(set (match_operand 0 "register_operand" "=r")
- (match_operand:BLK 1 "memory_operand" "m"))]
- ""
- "*
-{
- switch (GET_MODE (operands[0]))
- {
- case QImode:
- return \"%V1ld.bu\\t %0,%1\";
- case HImode:
- return \"%V1ld.hu\\t %0,%1\";
- case SImode:
- return \"%V1ld\\t %0,%1\";
- case DImode:
- return \"%V1ld.d\\t %0,%1\";
- default:
- abort ();
- }
-}"
- [(set_attr "type" "load")])
-
-(define_insn ""
- [(set (match_operand:BLK 0 "memory_operand" "=m")
- (match_operand 1 "register_operand" "r"))]
- ""
- "*
-{
- switch (GET_MODE (operands[1]))
- {
- case QImode:
- return \"%v0st.b\\t %1,%0\";
- case HImode:
- return \"%v0st.h\\t %1,%0\";
- case SImode:
- return \"%v0st\\t %1,%0\";
- case DImode:
- return \"%v0st.d\\t %1,%0\";
- default:
- abort ();
- }
-}"
- [(set_attr "type" "store")])
-
;; Call a non-looping block move library function (e.g. __movstrSI96x64).
;; operand 0 is the function name
;; operand 1 is the destination pointer