Commit 1ab3e58a by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

function.c (fixup_var_refs_1): For paradoxical (subreg VAR), replace VAR, don't try the subreg.

	* function.c (fixup_var_refs_1) <SET, handling VAR in SET_SRC>:
	For paradoxical (subreg VAR), replace VAR, don't try the subreg.

From-SVN: r52217
parent 4b72e8ed
2002-04-12 Hans-Peter Nilsson <hp@bitrange.com>
* function.c (fixup_var_refs_1) <SET, handling VAR in SET_SRC>:
For paradoxical (subreg VAR), replace VAR, don't try the subreg.
Fri Apr 12 10:51:38 2002 J"orn Rennecke <joern.rennecke@superh.com> Fri Apr 12 10:51:38 2002 J"orn Rennecke <joern.rennecke@superh.com>
* sh.c (broken_move): Constant 0. / 1. load is OK if there is * sh.c (broken_move): Constant 0. / 1. load is OK if there is
......
...@@ -2370,15 +2370,29 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements, no_share) ...@@ -2370,15 +2370,29 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements, no_share)
{ {
rtx pat, last; rtx pat, last;
replacement = find_fixup_replacement (replacements, SET_SRC (x)); if (GET_CODE (SET_SRC (x)) == SUBREG
if (replacement->new) && (GET_MODE_SIZE (GET_MODE (SET_SRC (x)))
SET_SRC (x) = replacement->new; > GET_MODE_SIZE (GET_MODE (var))))
else if (GET_CODE (SET_SRC (x)) == SUBREG) {
SET_SRC (x) = replacement->new /* This (subreg VAR) is now a paradoxical subreg. We need
= fixup_memory_subreg (SET_SRC (x), insn, 0); to replace VAR instead of the subreg. */
replacement = find_fixup_replacement (replacements, var);
if (replacement->new == NULL_RTX)
replacement->new = gen_reg_rtx (GET_MODE (var));
SUBREG_REG (SET_SRC (x)) = replacement->new;
}
else else
SET_SRC (x) = replacement->new {
= fixup_stack_1 (SET_SRC (x), insn); replacement = find_fixup_replacement (replacements, SET_SRC (x));
if (replacement->new)
SET_SRC (x) = replacement->new;
else if (GET_CODE (SET_SRC (x)) == SUBREG)
SET_SRC (x) = replacement->new
= fixup_memory_subreg (SET_SRC (x), insn, 0);
else
SET_SRC (x) = replacement->new
= fixup_stack_1 (SET_SRC (x), insn);
}
if (recog_memoized (insn) >= 0) if (recog_memoized (insn) >= 0)
return; return;
......
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