diff options
author | DJ Delorie <dj@redhat.com> | 2003-05-01 20:53:45 -0400 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2003-05-01 20:53:45 -0400 |
commit | 57458e8a15785a1989e379403cfdf6b3624701dc (patch) | |
tree | f02237b045073ac68384cd8f7ab318ce172d5b13 | |
parent | c4dec8d5a87f4d0f468e8a94495e26ff502006dc (diff) | |
download | gcc-57458e8a15785a1989e379403cfdf6b3624701dc.zip gcc-57458e8a15785a1989e379403cfdf6b3624701dc.tar.gz gcc-57458e8a15785a1989e379403cfdf6b3624701dc.tar.bz2 |
reload.c (find_reloads): Also check that all of a multi-reg value is in the class.
* reload.c (find_reloads): Also check that all of a multi-reg
value is in the class.
From-SVN: r66366
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/reload.c | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9d3429f..deea69f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-05-01 DJ Delorie <dj@redhat.com> + + * reload.c (find_reloads): Also check that all of a multi-reg + value is in the class. + 2003-05-01 Nathan Sidwell <nathan@codesourcery.com> * scan.h (lineno): Revert the rename here. diff --git a/gcc/reload.c b/gcc/reload.c index bc3c177..5a82d99 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -4346,7 +4346,17 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) if (regno < FIRST_PSEUDO_REGISTER && TEST_HARD_REG_BIT (reg_class_contents[rld[i].class], regno) && HARD_REGNO_MODE_OK (regno, rld[i].mode)) - rld[i].reg_rtx = dest; + { + int nr = HARD_REGNO_NREGS (regno, rld[i].mode); + int ok = 1, nri; + + for (nri = 1; nri < nr; nri ++) + if (! TEST_HARD_REG_BIT (reg_class_contents[rld[i].class], regno + nri)) + ok = 0; + + if (ok) + rld[i].reg_rtx = dest; + } } return retval; |