Commit 6d49a073 by Jim Wilson Committed by Jim Wilson

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
parent c485e6a0
Thu Jan 22 14:47:31 1998 Jim Wilson <wilson@cygnus.com>
* 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.
Thu Jan 22 14:49:14 1998 Jeffrey A Law (law@cygnus.com) Thu Jan 22 14:49:14 1998 Jeffrey A Law (law@cygnus.com)
* regmove.c (find_matches): Initialize matches->earlyclobber too. * regmove.c (find_matches): Initialize matches->earlyclobber too.
......
...@@ -987,9 +987,11 @@ push_reload (in, out, inloc, outloc, class, ...@@ -987,9 +987,11 @@ push_reload (in, out, inloc, outloc, class,
&& ((GET_MODE_SIZE (outmode) && ((GET_MODE_SIZE (outmode)
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (out)))) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))))
#ifdef WORD_REGISTER_OPERATIONS #ifdef WORD_REGISTER_OPERATIONS
|| ((GET_MODE_SIZE (outmode) - 1) / UNITS_PER_WORD == || ((GET_MODE_SIZE (outmode)
((GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))) - 1) < GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))))
/ UNITS_PER_WORD)) && ((GET_MODE_SIZE (outmode) - 1) / UNITS_PER_WORD ==
((GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))) - 1)
/ UNITS_PER_WORD)))
#endif #endif
)) ))
|| (GET_CODE (SUBREG_REG (out)) == REG || (GET_CODE (SUBREG_REG (out)) == REG
......
...@@ -3122,17 +3122,19 @@ eliminate_regs (x, mem_mode, insn) ...@@ -3122,17 +3122,19 @@ eliminate_regs (x, mem_mode, insn)
int new_size = GET_MODE_SIZE (GET_MODE (new)); int new_size = GET_MODE_SIZE (GET_MODE (new));
if (GET_CODE (new) == MEM if (GET_CODE (new) == MEM
&& x_size <= new_size && ((x_size < new_size
#ifdef WORD_REGISTER_OPERATIONS #ifdef WORD_REGISTER_OPERATIONS
/* On these machines, combine can create rtl of the form /* On these machines, combine can create rtl of the form
(set (subreg:m1 (reg:m2 R) 0) ...) (set (subreg:m1 (reg:m2 R) 0) ...)
where m1 < m2, and expects something interesting to where m1 < m2, and expects something interesting to
happen to the entire word. Moreover, it will use the happen to the entire word. Moreover, it will use the
(reg:m2 R) later, expecting all bits to be preserved. (reg:m2 R) later, expecting all bits to be preserved.
So if the number of words is the same, preserve the So if the number of words is the same, preserve the
subreg so that push_reloads can see it. */ subreg so that push_reloads can see it. */
&& ! ((x_size-1)/UNITS_PER_WORD == (new_size-1)/UNITS_PER_WORD) && ! ((x_size-1)/UNITS_PER_WORD == (new_size-1)/UNITS_PER_WORD)
#endif #endif
)
|| (x_size == new_size))
#ifdef LOAD_EXTEND_OP #ifdef LOAD_EXTEND_OP
/* On these machines we will be reloading what is /* On these machines we will be reloading what is
inside the SUBREG if it originally was a pseudo and inside the SUBREG if it originally was a pseudo and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment