diff options
| author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-19 19:46:29 +0000 |
|---|---|---|
| committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-19 19:46:29 +0000 |
| commit | d3e97cac9185e88456ee9dadad5138ffbe78ce5b (patch) | |
| tree | 1ce032c40e90048f6e69e6865f359ae1856bde3b /gcc | |
| parent | 1af37dfe7ed5e2e2c018e49e9c0153d93382e3a7 (diff) | |
| download | ppe42-gcc-d3e97cac9185e88456ee9dadad5138ffbe78ce5b.tar.gz ppe42-gcc-d3e97cac9185e88456ee9dadad5138ffbe78ce5b.zip | |
* reload1.c (eliminate_regs_in_insn): When updating a set
to the frame pointer to the hardware frame pointer, perform
the update always not just when REPLACE is set.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44161 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/reload1.c | 37 |
2 files changed, 26 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f8f9e2fb57b..0a967bccd20 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2001-07-19 Geoffrey Keating <geoffk@redhat.com> + * reload1.c (eliminate_regs_in_insn): When updating a set + to the frame pointer to the hardware frame pointer, perform + the update always not just when REPLACE is set. + * reload1.c (choose_reload_regs): Don't inherit a reload that crosses multiple registers if registers past the first don't fit in the desired class. diff --git a/gcc/reload1.c b/gcc/reload1.c index 94eccfe1974..ced823b0c1b 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -2962,22 +2962,29 @@ eliminate_regs_in_insn (insn, replace) if (ok) { - if (replace) + rtx src + = plus_constant (ep->to_rtx, offset - ep->offset); + + new_body = old_body; + if (! replace) + { + new_body = copy_insn (old_body); + if (REG_NOTES (insn)) + REG_NOTES (insn) = copy_insn_1 (REG_NOTES (insn)); + } + PATTERN (insn) = new_body; + old_set = single_set (insn); + + /* First see if this insn remains valid when we + make the change. If not, keep the INSN_CODE + the same and let reload fit it up. */ + validate_change (insn, &SET_SRC (old_set), src, 1); + validate_change (insn, &SET_DEST (old_set), + ep->to_rtx, 1); + if (! apply_change_group ()) { - rtx src - = plus_constant (ep->to_rtx, offset - ep->offset); - - /* First see if this insn remains valid when we - make the change. If not, keep the INSN_CODE - the same and let reload fit it up. */ - validate_change (insn, &SET_SRC (old_set), src, 1); - validate_change (insn, &SET_DEST (old_set), - ep->to_rtx, 1); - if (! apply_change_group ()) - { - SET_SRC (old_set) = src; - SET_DEST (old_set) = ep->to_rtx; - } + SET_SRC (old_set) = src; + SET_DEST (old_set) = ep->to_rtx; } val = 1; |

