From: Richard Kenner Date: Mon, 28 Oct 1996 22:22:21 +0000 (-0500) Subject: (emit_move_sequence): If reload in progress, replace reference to X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8a642d97fd65ebd948367a803313ec7ac2c09a03;p=gcc.git (emit_move_sequence): If reload in progress, replace reference to pseudo with reference to corresponding MEM. From-SVN: r13056 --- diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 0cffa6007b6..74d7b8802a5 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ #include "insn-attr.h" #include "flags.h" #include "tree.h" +#include "reload.h" #include "c-tree.h" #include "expr.h" #include "obstack.h" @@ -1059,6 +1060,22 @@ emit_move_sequence (operands, mode, scratch_reg) register rtx operand0 = operands[0]; register rtx operand1 = operands[1]; + if (reload_in_progress && GET_CODE (operand0) == REG + && REGNO (operand0) >= FIRST_PSEUDO_REGISTER) + operand0 = reg_equiv_mem[REGNO (operand0)]; + else if (reload_in_progress && GET_CODE (operand0) == SUBREG + && GET_CODE (SUBREG_REG (operand0)) == REG + && REGNO (SUBREG_REG (operand0)) >= FIRST_PSEUDO_REGISTER) + SUBREG_REG (operand0) = reg_equiv_mem[REGNO (SUBREG_REG (operand0))]; + + if (reload_in_progress && GET_CODE (operand1) == REG + && REGNO (operand1) >= FIRST_PSEUDO_REGISTER) + operand1 = reg_equiv_mem[REGNO (operand1)]; + else if (reload_in_progress && GET_CODE (operand1) == SUBREG + && GET_CODE (SUBREG_REG (operand1)) == REG + && REGNO (SUBREG_REG (operand1)) >= FIRST_PSEUDO_REGISTER) + SUBREG_REG (operand1) = reg_equiv_mem[REGNO (SUBREG_REG (operand1))]; + /* Handle secondary reloads for loads/stores of FP registers from REG+D addresses where D does not fit in 5 bits, including (subreg (mem (addr))) cases. */