* arm.c (arm_reload_in_hi): Ensure that the scratch register does

not overlap our final result register.

Fixes problem that causes Metafont in teTeX to crash.* arm.c (arm_reload_in_hi): Ensure that the scratch register does
not overlap our final result register.

Fixes problem that causes Metafont in teTeX to crash.
This commit is contained in:
rearnsha 2003-02-15 10:07:16 +00:00
parent d79f15801a
commit 66b1593cdb

View File

@ -3849,7 +3849,14 @@ arm_reload_in_hi (operands)
}
}
scratch = gen_rtx_REG (SImode, REGNO (operands[2]));
/* Operands[2] may overlap operands[0] (though it won't overlap
operands[1]), that's why we asked for a DImode reg -- so we can
use the bit that does not overlap. */
if (REGNO (operands[2]) == REGNO (operands[0]))
scratch = gen_rtx_REG (SImode, REGNO (operands[2]) + 1);
else
scratch = gen_rtx_REG (SImode, REGNO (operands[2]));
emit_insn (gen_zero_extendqisi2 (scratch,
gen_rtx_MEM (QImode,
plus_constant (base,