summaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-01-22 14:48:58 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-01-22 14:48:58 +0000
commitebbb4987154cd7c10361f983862c5c1b89848bb6 (patch)
treefb7689cb1457dafc5fe17efd0f4ff136c93ea12a /gcc/reload.c
parent4e80caa9d23f02e23c4a8cefdab11589e325ea1c (diff)
downloadgcc-ebbb4987154cd7c10361f983862c5c1b89848bb6.tar.gz
Fix powerpc/rs6000 (subreg:SF (mem:SI ...)) reload problem.
* reload.c (push_reload): In WORD_REGISTER_OPERATIONS code, add test to require the SUBREG mode to be smaller than the SUBREG_REG mode. * reload1.c (eliminate_regs): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17444 138bc75d-0d04-0410-961f-82ee72b054a4
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 983060a865a..2fcdd5a6aea 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -987,9 +987,11 @@ push_reload (in, out, inloc, outloc, class,
&& ((GET_MODE_SIZE (outmode)
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))))
#ifdef WORD_REGISTER_OPERATIONS
- || ((GET_MODE_SIZE (outmode) - 1) / UNITS_PER_WORD ==
- ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))) - 1)
- / UNITS_PER_WORD))
+ || ((GET_MODE_SIZE (outmode)
+ < GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))))
+ && ((GET_MODE_SIZE (outmode) - 1) / UNITS_PER_WORD ==
+ ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))) - 1)
+ / UNITS_PER_WORD)))
#endif
))
|| (GET_CODE (SUBREG_REG (out)) == REG