Commit 54d65918 by Jeffrey A Law Committed by Jeff Law

pa.c (emit_move_sequence): Do not replace a pseudo with its equivalent memory location unless...

�
        * pa.c (emit_move_sequence): Do not replace a pseudo with its
        equivalent memory location unless we have been provided a scratch
        register.  Similarly do not call find_replacement unless a
        scratch register has been provided.

From-SVN: r22438
parent c09a3c2e
Tue Sep 15 22:59:52 1998 Jeffrey A Law (law@cygnus.com)
* pa.c (emit_move_sequence): Do not replace a pseudo with its
equivalent memory location unless we have been provided a scratch
register. Similarly do not call find_replacement unless a
scratch register has been provided.
Tue Sep 15 19:23:01 1998 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> Tue Sep 15 19:23:01 1998 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* i386.h (PREFERRED_RELOAD_CLASS): For standard 387 constants, * i386.h (PREFERRED_RELOAD_CLASS): For standard 387 constants,
......
...@@ -1086,10 +1086,12 @@ emit_move_sequence (operands, mode, scratch_reg) ...@@ -1086,10 +1086,12 @@ emit_move_sequence (operands, mode, scratch_reg)
register rtx operand1 = operands[1]; register rtx operand1 = operands[1];
register rtx tem; register rtx tem;
if (reload_in_progress && GET_CODE (operand0) == REG if (scratch_reg
&& reload_in_progress && GET_CODE (operand0) == REG
&& REGNO (operand0) >= FIRST_PSEUDO_REGISTER) && REGNO (operand0) >= FIRST_PSEUDO_REGISTER)
operand0 = reg_equiv_mem[REGNO (operand0)]; operand0 = reg_equiv_mem[REGNO (operand0)];
else if (reload_in_progress && GET_CODE (operand0) == SUBREG else if (scratch_reg
&& reload_in_progress && GET_CODE (operand0) == SUBREG
&& GET_CODE (SUBREG_REG (operand0)) == REG && GET_CODE (SUBREG_REG (operand0)) == REG
&& REGNO (SUBREG_REG (operand0)) >= FIRST_PSEUDO_REGISTER) && REGNO (SUBREG_REG (operand0)) >= FIRST_PSEUDO_REGISTER)
{ {
...@@ -1097,10 +1099,12 @@ emit_move_sequence (operands, mode, scratch_reg) ...@@ -1097,10 +1099,12 @@ emit_move_sequence (operands, mode, scratch_reg)
operand0 = alter_subreg (operand0); operand0 = alter_subreg (operand0);
} }
if (reload_in_progress && GET_CODE (operand1) == REG if (scratch_reg
&& reload_in_progress && GET_CODE (operand1) == REG
&& REGNO (operand1) >= FIRST_PSEUDO_REGISTER) && REGNO (operand1) >= FIRST_PSEUDO_REGISTER)
operand1 = reg_equiv_mem[REGNO (operand1)]; operand1 = reg_equiv_mem[REGNO (operand1)];
else if (reload_in_progress && GET_CODE (operand1) == SUBREG else if (scratch_reg
&& reload_in_progress && GET_CODE (operand1) == SUBREG
&& GET_CODE (SUBREG_REG (operand1)) == REG && GET_CODE (SUBREG_REG (operand1)) == REG
&& REGNO (SUBREG_REG (operand1)) >= FIRST_PSEUDO_REGISTER) && REGNO (SUBREG_REG (operand1)) >= FIRST_PSEUDO_REGISTER)
{ {
...@@ -1108,11 +1112,11 @@ emit_move_sequence (operands, mode, scratch_reg) ...@@ -1108,11 +1112,11 @@ emit_move_sequence (operands, mode, scratch_reg)
operand1 = alter_subreg (operand1); operand1 = alter_subreg (operand1);
} }
if (reload_in_progress && GET_CODE (operand0) == MEM if (scratch_reg && reload_in_progress && GET_CODE (operand0) == MEM
&& ((tem = find_replacement (&XEXP (operand0, 0))) && ((tem = find_replacement (&XEXP (operand0, 0)))
!= XEXP (operand0, 0))) != XEXP (operand0, 0)))
operand0 = gen_rtx_MEM (GET_MODE (operand0), tem); operand0 = gen_rtx_MEM (GET_MODE (operand0), tem);
if (reload_in_progress && GET_CODE (operand1) == MEM if (scratch_reg && reload_in_progress && GET_CODE (operand1) == MEM
&& ((tem = find_replacement (&XEXP (operand1, 0))) && ((tem = find_replacement (&XEXP (operand1, 0)))
!= XEXP (operand1, 0))) != XEXP (operand1, 0)))
operand1 = gen_rtx_MEM (GET_MODE (operand1), tem); operand1 = gen_rtx_MEM (GET_MODE (operand1), tem);
......
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