Commit 03b72c86 by Richard Kenner

(push_reload...

(push_reload, find_reloads): Reload inside a paradoxical SUBREG of MEM
except don't force a reload unless the inner mode is narrower than
BIGGEST_ALIGNMENT.

From-SVN: r6302
parent 3c9d8baf
...@@ -644,16 +644,16 @@ push_reload (in, out, inloc, outloc, class, ...@@ -644,16 +644,16 @@ push_reload (in, out, inloc, outloc, class,
|| (((GET_CODE (SUBREG_REG (in)) == REG || (((GET_CODE (SUBREG_REG (in)) == REG
&& REGNO (SUBREG_REG (in)) >= FIRST_PSEUDO_REGISTER) && REGNO (SUBREG_REG (in)) >= FIRST_PSEUDO_REGISTER)
|| GET_CODE (SUBREG_REG (in)) == MEM) || GET_CODE (SUBREG_REG (in)) == MEM)
&& ((GET_MODE_SIZE (inmode)
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))))
#ifdef LOAD_EXTEND_OP #ifdef LOAD_EXTEND_OP
&& GET_MODE_SIZE (inmode) <= UNITS_PER_WORD || (GET_MODE_SIZE (inmode) <= UNITS_PER_WORD
&& GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))) <= UNITS_PER_WORD && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))
&& (GET_MODE_SIZE (inmode) <= UNITS_PER_WORD)
!= GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))) && (GET_MODE_SIZE (inmode)
#else != GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))))
&& (GET_MODE_SIZE (inmode)
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))))
#endif #endif
) ))
|| (GET_CODE (SUBREG_REG (in)) == REG || (GET_CODE (SUBREG_REG (in)) == REG
&& REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER && REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER
/* The case where out is nonzero /* The case where out is nonzero
...@@ -727,16 +727,16 @@ push_reload (in, out, inloc, outloc, class, ...@@ -727,16 +727,16 @@ push_reload (in, out, inloc, outloc, class,
|| (((GET_CODE (SUBREG_REG (out)) == REG || (((GET_CODE (SUBREG_REG (out)) == REG
&& REGNO (SUBREG_REG (out)) >= FIRST_PSEUDO_REGISTER) && REGNO (SUBREG_REG (out)) >= FIRST_PSEUDO_REGISTER)
|| GET_CODE (SUBREG_REG (out)) == MEM) || GET_CODE (SUBREG_REG (out)) == MEM)
&& ((GET_MODE_SIZE (outmode)
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))))
#ifdef LOAD_EXTEND_OP #ifdef LOAD_EXTEND_OP
&& GET_MODE_SIZE (outmode) <= UNITS_PER_WORD || (GET_MODE_SIZE (outmode) <= UNITS_PER_WORD
&& GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))) <= UNITS_PER_WORD && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (out)))
&& (GET_MODE_SIZE (outmode) <= UNITS_PER_WORD)
!= GET_MODE_SIZE (GET_MODE (SUBREG_REG (out)))) && (GET_MODE_SIZE (outmode)
#else != GET_MODE_SIZE (GET_MODE (SUBREG_REG (out)))))
&& (GET_MODE_SIZE (outmode)
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))))
#endif #endif
) ))
|| (GET_CODE (SUBREG_REG (out)) == REG || (GET_CODE (SUBREG_REG (out)) == REG
&& REGNO (SUBREG_REG (out)) < FIRST_PSEUDO_REGISTER && REGNO (SUBREG_REG (out)) < FIRST_PSEUDO_REGISTER
&& ((GET_MODE_SIZE (outmode) <= UNITS_PER_WORD && ((GET_MODE_SIZE (outmode) <= UNITS_PER_WORD
...@@ -2609,22 +2609,33 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) ...@@ -2609,22 +2609,33 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
be a problem accessing OPERAND in the outer mode. */ be a problem accessing OPERAND in the outer mode. */
if (CONSTANT_P (operand) if (CONSTANT_P (operand)
|| GET_CODE (operand) == PLUS || GET_CODE (operand) == PLUS
#ifdef LOAD_EXTEND_OP /* We must force a reload of paradoxical SUBREGs
/* If we have a SUBREG where both the inner and outer of a MEM because the alignment of the inner value
modes are different size but no wider than a word, may not be enough to do the outer reference.
combine.c has made assumptions about the behavior of
the machine in such register access. If the data is, On machines that extend byte operations and we have a
in fact, in memory we must always load using the size SUBREG where both the inner and outer modes are different
assumed to be in the register and let the insn do the size but no wider than a word, combine.c has made
different-sized accesses. */ assumptions about the behavior of the machine in such
register access. If the data is, in fact, in memory we
must always load using the size assumed to be in the
register and let the insn do the different-sized
accesses. */
|| ((GET_CODE (operand) == MEM || ((GET_CODE (operand) == MEM
|| (GET_CODE (operand)== REG || (GET_CODE (operand)== REG
&& REGNO (operand) >= FIRST_PSEUDO_REGISTER)) && REGNO (operand) >= FIRST_PSEUDO_REGISTER))
&& GET_MODE_SIZE (operand_mode[i]) <= UNITS_PER_WORD && (((GET_MODE_BITSIZE (GET_MODE (operand))
&& GET_MODE_SIZE (GET_MODE (operand)) <= UNITS_PER_WORD < BIGGEST_ALIGNMENT)
&& (GET_MODE_SIZE (operand_mode[i]) && (GET_MODE_SIZE (operand_mode[i])
!= GET_MODE_SIZE (GET_MODE (operand)))) > GET_MODE_SIZE (GET_MODE (operand))))
#ifdef LOAD_EXTEND_OP
|| (GET_MODE_SIZE (operand_mode[i]) <= UNITS_PER_WORD
&& (GET_MODE_SIZE (GET_MODE (operand))
<= UNITS_PER_WORD)
&& (GET_MODE_SIZE (operand_mode[i])
!= GET_MODE_SIZE (GET_MODE (operand))))
#endif #endif
))
/* Subreg of a hard reg which can't handle the subreg's mode /* Subreg of a hard reg which can't handle the subreg's mode
or which would handle that mode in the wrong number of or which would handle that mode in the wrong number of
registers for subregging to work. */ registers for subregging to work. */
......
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