diff options
author | Geoffrey Keating <geoffk@redhat.com> | 2001-07-19 19:45:24 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2001-07-19 19:45:24 +0000 |
commit | eb4d554e37b3ba7f6c1c67f25f199ccbac0da977 (patch) | |
tree | d7d7c872b1eee3a4247a3f4aa15367fdfcf1debe /gcc | |
parent | 8d3216f82da82f921fd4f684661b5597fde436c6 (diff) | |
download | gcc-eb4d554e37b3ba7f6c1c67f25f199ccbac0da977.zip gcc-eb4d554e37b3ba7f6c1c67f25f199ccbac0da977.tar.gz gcc-eb4d554e37b3ba7f6c1c67f25f199ccbac0da977.tar.bz2 |
reload1.c (choose_reload_regs): Don't inherit a reload that crosses multiple registers if...
* 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.
From-SVN: r44160
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/reload1.c | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e643a76..f8f9e2f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2001-07-19 Geoffrey Keating <geoffk@redhat.com> + * 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. + * ifcvt.c (noce_try_store_flag_constants): Use trunc_int_for_mode when negating constants. diff --git a/gcc/reload1.c b/gcc/reload1.c index c494990..94eccfe 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -5508,10 +5508,16 @@ choose_reload_regs (chain) if (k == nr) { int i1; + int bad_for_class; last_reg = (GET_MODE (last_reg) == mode ? last_reg : gen_rtx_REG (mode, i)); + bad_for_class = 0; + for (k = 0; k < nr; k++) + bad_for_class |= ! TEST_HARD_REG_BIT (reg_class_contents[(int) rld[r].class], + i+k); + /* We found a register that contains the value we need. If this register is the same as an `earlyclobber' operand of the @@ -5541,8 +5547,7 @@ choose_reload_regs (chain) if we need it wider than we've got it. */ || (GET_MODE_SIZE (rld[r].mode) > GET_MODE_SIZE (mode)) - || ! TEST_HARD_REG_BIT (reg_class_contents[(int) rld[r].class], - i) + || bad_for_class /* If find_reloads chose reload_out as reload register, stay with it - that leaves the |