diff options
author | Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> | 2005-05-24 07:45:24 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2005-05-24 07:45:24 +0000 |
commit | 0be4693a48dfdb376dcb42fad36b286c6f10e178 (patch) | |
tree | aa8ed62f6fd0c8570038b5f7bb692f58f03067f2 | |
parent | 37495922d7e87afab5e5dad3a54639064a4b5d68 (diff) | |
download | gcc-0be4693a48dfdb376dcb42fad36b286c6f10e178.zip gcc-0be4693a48dfdb376dcb42fad36b286c6f10e178.tar.gz gcc-0be4693a48dfdb376dcb42fad36b286c6f10e178.tar.bz2 |
m32r.c (m32r_expand_block_move): Return 0 if nothing was done.
* config/m32r/m32r.c (m32r_expand_block_move): Return 0 if nothing was done.
* config/m32r/m32r.md (movmemsi): If m32r_expand_block_move did nothing then FAIL.
* config/m32r/m32r/m32r-protos.h (m32r_expand_block_move): Update prototype.
From-SVN: r100095
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/m32r/m32r-protos.h | 2 | ||||
-rw-r--r-- | gcc/config/m32r/m32r.c | 11 | ||||
-rw-r--r-- | gcc/config/m32r/m32r.md | 8 |
4 files changed, 22 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f553158..7202609 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2005-05-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> + + * config/m32r/m32r.c (m32r_expand_block_move): Return 0 if + nothing was done. + * config/m32r/m32r.md (movmemsi): If m32r_expand_block_move did + nothing then FAIL. + * config/m32r/m32r/m32r-protos.h (m32r_expand_block_move): Update + prototype. + 2005-05-23 Jeff Law <law@redhat.com> * tree-ssa-dom.c (cprop_into_stmt): Do not call diff --git a/gcc/config/m32r/m32r-protos.h b/gcc/config/m32r/m32r-protos.h index 0f72bd7..0030f75 100644 --- a/gcc/config/m32r/m32r-protos.h +++ b/gcc/config/m32r/m32r-protos.h @@ -47,7 +47,7 @@ extern void m32r_initialize_trampoline (rtx, rtx, rtx); extern int zero_and_one (rtx, rtx); extern char * emit_cond_move (rtx *, rtx); extern void m32r_output_block_move (rtx, rtx *); -extern void m32r_expand_block_move (rtx *); +extern int m32r_expand_block_move (rtx *); extern void m32r_print_operand (FILE *, rtx, int); extern void m32r_print_operand_address (FILE *, rtx); extern int m32r_not_same_reg (rtx, rtx); diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index fbe5394..6e08203 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -2201,9 +2201,11 @@ block_move_call (rtx dest_reg, rtx src_reg, rtx bytes_rtx) operands[0] is the pointer to the destination. operands[1] is the pointer to the source. operands[2] is the number of bytes to move. - operands[3] is the alignment. */ + operands[3] is the alignment. -void + Returns 1 upon success, 0 otherwise. */ + +int m32r_expand_block_move (rtx operands[]) { rtx orig_dst = operands[0]; @@ -2218,7 +2220,7 @@ m32r_expand_block_move (rtx operands[]) rtx dst_reg; if (constp && bytes <= 0) - return; + return 1; /* Move the address into scratch registers. */ dst_reg = copy_addr_to_reg (XEXP (orig_dst, 0)); @@ -2233,7 +2235,7 @@ m32r_expand_block_move (rtx operands[]) if (optimize_size || ! constp || align != UNITS_PER_WORD) { block_move_call (dst_reg, src_reg, bytes_rtx); - return; + return 0; } leftover = bytes % MAX_MOVE_BYTES; @@ -2290,6 +2292,7 @@ m32r_expand_block_move (rtx operands[]) emit_insn (gen_movmemsi_internal (dst_reg, src_reg, GEN_INT (leftover), gen_reg_rtx (SImode), gen_reg_rtx (SImode))); + return 1; } diff --git a/gcc/config/m32r/m32r.md b/gcc/config/m32r/m32r.md index 20f37d3..817c3c0 100644 --- a/gcc/config/m32r/m32r.md +++ b/gcc/config/m32r/m32r.md @@ -2542,10 +2542,12 @@ "" " { - if (operands[0]) /* avoid unused code messages */ + if (operands[0]) /* Avoid unused code messages. */ { - m32r_expand_block_move (operands); - DONE; + if (m32r_expand_block_move (operands)) + DONE; + else + FAIL; } }") |