diff options
| author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-24 23:15:19 +0000 |
|---|---|---|
| committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-24 23:15:19 +0000 |
| commit | e4e498cfb231e53253d8d0e50ae9356af5e74bb0 (patch) | |
| tree | 488e0bd31e47424105f777ed841d306134aabbfd /gcc/expr.c | |
| parent | 6896278d2d89bee2261a684019b3d310b77c1aa0 (diff) | |
| download | ppe42-gcc-e4e498cfb231e53253d8d0e50ae9356af5e74bb0.tar.gz ppe42-gcc-e4e498cfb231e53253d8d0e50ae9356af5e74bb0.zip | |
* cse.c (fold_rtx): Make autoincrement addressing mode tests be
runtime selectable.
* expr.c (move_by_pieces): Similarly.
(move_by_pieces_1, clear_by_pieces, clear_by_pieces_1): Similarly.
* flow.c (find_auto_inc): Similarly.
(try_pre_increment): Similarly.
* loop.c (strength_reduce): Similarly.
* regclass.c (auto_inc_dec_reg_p): Similarly.
* regmove.c (try_auto_increment): Similarly.
(fixup_match_1): Similarly.
* rtl.h (HAVE_PRE_INCREMENT): Define if not already defined.
(HAVE_PRE_DECREMENT): Similarly.
(HAVE_POST_INCREMENT, HAVE_POST_DECREMENT): Similarly.
sponding changes to all target header files.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23837 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
| -rw-r--r-- | gcc/expr.c | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index ca0aba10234..534fac638a7 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1442,40 +1442,32 @@ move_by_pieces (to, from, len, align) if (!(data.autinc_from && data.autinc_to) && move_by_pieces_ninsns (len, align) > 2) { -#ifdef HAVE_PRE_DECREMENT - if (data.reverse && ! data.autinc_from) + if (HAVE_PRE_DECREMENT && data.reverse && ! data.autinc_from) { data.from_addr = copy_addr_to_reg (plus_constant (from_addr, len)); data.autinc_from = 1; data.explicit_inc_from = -1; } -#endif -#ifdef HAVE_POST_INCREMENT - if (! data.autinc_from) + if (HAVE_POST_INCREMENT && ! data.autinc_from) { data.from_addr = copy_addr_to_reg (from_addr); data.autinc_from = 1; data.explicit_inc_from = 1; } -#endif if (!data.autinc_from && CONSTANT_P (from_addr)) data.from_addr = copy_addr_to_reg (from_addr); -#ifdef HAVE_PRE_DECREMENT - if (data.reverse && ! data.autinc_to) + if (HAVE_PRE_DECREMENT && data.reverse && ! data.autinc_to) { data.to_addr = copy_addr_to_reg (plus_constant (to_addr, len)); data.autinc_to = 1; data.explicit_inc_to = -1; } -#endif -#ifdef HAVE_POST_INCREMENT - if (! data.reverse && ! data.autinc_to) + if (HAVE_POST_INCREMENT && ! data.reverse && ! data.autinc_to) { data.to_addr = copy_addr_to_reg (to_addr); data.autinc_to = 1; data.explicit_inc_to = 1; } -#endif if (!data.autinc_to && CONSTANT_P (to_addr)) data.to_addr = copy_addr_to_reg (to_addr); } @@ -1586,20 +1578,16 @@ move_by_pieces_1 (genfun, mode, data) data->offset)))); MEM_IN_STRUCT_P (from1) = data->from_struct; -#ifdef HAVE_PRE_DECREMENT - if (data->explicit_inc_to < 0) + if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0) emit_insn (gen_add2_insn (data->to_addr, GEN_INT (-size))); - if (data->explicit_inc_from < 0) + if (HAVE_PRE_DECREMENT && data->explicit_inc_from < 0) emit_insn (gen_add2_insn (data->from_addr, GEN_INT (-size))); -#endif emit_insn ((*genfun) (to1, from1)); -#ifdef HAVE_POST_INCREMENT - if (data->explicit_inc_to > 0) + if (HAVE_POST_INCREMENT && data->explicit_inc_to > 0) emit_insn (gen_add2_insn (data->to_addr, GEN_INT (size))); - if (data->explicit_inc_from > 0) + if (HAVE_POST_INCREMENT && data->explicit_inc_from > 0) emit_insn (gen_add2_insn (data->from_addr, GEN_INT (size))); -#endif if (! data->reverse) data->offset += size; @@ -2267,22 +2255,18 @@ clear_by_pieces (to, len, align) if (!data.autinc_to && move_by_pieces_ninsns (len, align) > 2) { -#ifdef HAVE_PRE_DECREMENT - if (data.reverse && ! data.autinc_to) + if (HAVE_PRE_DECREMENT && data.reverse && ! data.autinc_to) { data.to_addr = copy_addr_to_reg (plus_constant (to_addr, len)); data.autinc_to = 1; data.explicit_inc_to = -1; } -#endif -#ifdef HAVE_POST_INCREMENT - if (! data.reverse && ! data.autinc_to) + if (HAVE_POST_INCREMENT && ! data.reverse && ! data.autinc_to) { data.to_addr = copy_addr_to_reg (to_addr); data.autinc_to = 1; data.explicit_inc_to = 1; } -#endif if (!data.autinc_to && CONSTANT_P (to_addr)) data.to_addr = copy_addr_to_reg (to_addr); } @@ -2345,16 +2329,12 @@ clear_by_pieces_1 (genfun, mode, data) data->offset)))); MEM_IN_STRUCT_P (to1) = data->to_struct; -#ifdef HAVE_PRE_DECREMENT - if (data->explicit_inc_to < 0) + if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0) emit_insn (gen_add2_insn (data->to_addr, GEN_INT (-size))); -#endif emit_insn ((*genfun) (to1, const0_rtx)); -#ifdef HAVE_POST_INCREMENT - if (data->explicit_inc_to > 0) + if (HAVE_POST_INCREMENT && data->explicit_inc_to > 0) emit_insn (gen_add2_insn (data->to_addr, GEN_INT (size))); -#endif if (! data->reverse) data->offset += size; |

