diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2003-12-17 18:20:44 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2003-12-17 18:20:44 +0000 |
commit | 4d450e9ac8afcf340b62980a0a24c44f2c217092 (patch) | |
tree | 3b8f3128870804afa995de3969a976ec511b144c /gcc | |
parent | 77e86c91095a7c617acd6de0f8916983dc072876 (diff) | |
download | gcc-4d450e9ac8afcf340b62980a0a24c44f2c217092.zip gcc-4d450e9ac8afcf340b62980a0a24c44f2c217092.tar.gz gcc-4d450e9ac8afcf340b62980a0a24c44f2c217092.tar.bz2 |
re PR rtl-optimization/10592 ([arm] caller-save incorrectly handles a reloaded SET_DEST operand)
PR optimization/10592
* caller-save.c (mark_referenced_regs): Don't short-circuit a reg
or subreg in SET_DEST if it isn't a hard register.
From-SVN: r74747
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/caller-save.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f95cb94..dfd9226 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-12-17 Richard Earnshaw <rearnsha@arm.com> + + PR optimization/10592 + * caller-save.c (mark_referenced_regs): Don't short-circuit a reg + or subreg in SET_DEST if it isn't a hard register. + 2003-12-17 David Edelsohn <edelsohn@gnu.org> * collect2.c (main): Add -fno-profile-arcs -fno-test-coverage diff --git a/gcc/caller-save.c b/gcc/caller-save.c index 9a0a4e3..6eaa533 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -568,8 +568,10 @@ mark_referenced_regs (rtx x) { x = SET_DEST (x); code = GET_CODE (x); - if (code == REG || code == PC || code == CC0 + if ((code == REG && REGNO (x) < FIRST_PSEUDO_REGISTER) + || code == PC || code == CC0 || (code == SUBREG && GET_CODE (SUBREG_REG (x)) == REG + && REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER /* If we're setting only part of a multi-word register, we shall mark it as referenced, because the words that are not being set should be restored. */ |