aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-05-20 07:52:46 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-05-20 07:52:46 -0400
commitd030f4b2d7c66c17ebf516b22d01cce27427670e (patch)
treeeefdc0b2d4f298967bbbda6270f4fc10774b8660 /gcc/reload.c
parentc102bba010c9dcd4b58d4a3ea1effe24c98d859e (diff)
downloadgcc-d030f4b2d7c66c17ebf516b22d01cce27427670e.zip
gcc-d030f4b2d7c66c17ebf516b22d01cce27427670e.tar.gz
gcc-d030f4b2d7c66c17ebf516b22d01cce27427670e.tar.bz2
(push_reload): Don't reload inside a SUBREG when SUBREG_WORD is
nonzero. From-SVN: r9757
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index c9a1ffa..f354048 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -798,9 +798,11 @@ push_reload (in, out, inloc, outloc, class,
Finally, reload the inner expression if it is a register that is in
the class whose registers cannot be referenced in a different size
- and M1 is not the same size as M2. */
+ and M1 is not the same size as M2. If SUBREG_WORD is nonzero, we
+ cannot reload just the inside since we might end up with the wrong
+ register class. */
- if (in != 0 && GET_CODE (in) == SUBREG
+ if (in != 0 && GET_CODE (in) == SUBREG && SUBREG_WORD (in) == 0
#ifdef CLASS_CANNOT_CHANGE_SIZE
&& class != CLASS_CANNOT_CHANGE_SIZE
#endif
@@ -898,7 +900,7 @@ push_reload (in, out, inloc, outloc, class,
storing in a subreg is entitled to clobber it all
(except in the case of STRICT_LOW_PART,
and in that case the constraint should label it input-output.) */
- if (out != 0 && GET_CODE (out) == SUBREG
+ if (out != 0 && GET_CODE (out) == SUBREG && SUBREG_WORD (out) == 0
#ifdef CLASS_CANNOT_CHANGE_SIZE
&& class != CLASS_CANNOT_CHANGE_SIZE
#endif