From 6d49a073b49d3f2f467ebf6cc36ec12f8a3ec012 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Thu, 22 Jan 1998 14:48:58 +0000 Subject: 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. From-SVN: r17444 --- gcc/reload.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gcc/reload.c') diff --git a/gcc/reload.c b/gcc/reload.c index 983060a..2fcdd5a 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 -- cgit v1.1