pa.c (emit_move_sequence): Always convert scratch_reg to the proper mode before using it.
* pa.c (emit_move_sequence): Always convert scratch_reg to the proper mode before using it. From-SVN: r28331
This commit is contained in:
parent
be44d23e64
commit
1b8ad134da
|
@ -5,6 +5,9 @@ Wed Jul 28 12:50:48 1999 Geoff Keating <geoffk@cygnus.com>
|
||||||
|
|
||||||
Wed Jul 28 13:18:35 1999 Jeffrey A Law (law@cygnus.com)
|
Wed Jul 28 13:18:35 1999 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* pa.c (emit_move_sequence): Always convert scratch_reg to the
|
||||||
|
proper mode before using it.
|
||||||
|
|
||||||
* pa.md (adddi3, subdi3): Turn into a define_expand/define_insn
|
* pa.md (adddi3, subdi3): Turn into a define_expand/define_insn
|
||||||
pair.
|
pair.
|
||||||
|
|
||||||
|
|
|
@ -1100,7 +1100,11 @@ hppa_address_cost (X)
|
||||||
|
|
||||||
Return 1 if we have written out everything that needs to be done to
|
Return 1 if we have written out everything that needs to be done to
|
||||||
do the move. Otherwise, return 0 and the caller will emit the move
|
do the move. Otherwise, return 0 and the caller will emit the move
|
||||||
normally. */
|
normally.
|
||||||
|
|
||||||
|
Note SCRATCH_REG may not be in the proper mode depending on how it
|
||||||
|
will be used. This routine is resposible for creating a new copy
|
||||||
|
of SCRATCH_REG in the proper mode. */
|
||||||
|
|
||||||
int
|
int
|
||||||
emit_move_sequence (operands, mode, scratch_reg)
|
emit_move_sequence (operands, mode, scratch_reg)
|
||||||
|
@ -1161,6 +1165,9 @@ emit_move_sequence (operands, mode, scratch_reg)
|
||||||
if (GET_CODE (operand1) == SUBREG)
|
if (GET_CODE (operand1) == SUBREG)
|
||||||
operand1 = XEXP (operand1, 0);
|
operand1 = XEXP (operand1, 0);
|
||||||
|
|
||||||
|
/* SCRATCH_REG will hold an address and maybe the actual data. We want
|
||||||
|
it in WORD_MODE regardless of what mode it was originally given
|
||||||
|
to us. */
|
||||||
scratch_reg = gen_rtx_REG (word_mode, REGNO (scratch_reg));
|
scratch_reg = gen_rtx_REG (word_mode, REGNO (scratch_reg));
|
||||||
|
|
||||||
/* D might not fit in 14 bits either; for such cases load D into
|
/* D might not fit in 14 bits either; for such cases load D into
|
||||||
|
@ -1190,7 +1197,11 @@ emit_move_sequence (operands, mode, scratch_reg)
|
||||||
if (GET_CODE (operand0) == SUBREG)
|
if (GET_CODE (operand0) == SUBREG)
|
||||||
operand0 = XEXP (operand0, 0);
|
operand0 = XEXP (operand0, 0);
|
||||||
|
|
||||||
|
/* SCRATCH_REG will hold an address and maybe the actual data. We want
|
||||||
|
it in WORD_MODE regardless of what mode it was originally given
|
||||||
|
to us. */
|
||||||
scratch_reg = gen_rtx_REG (word_mode, REGNO (scratch_reg));
|
scratch_reg = gen_rtx_REG (word_mode, REGNO (scratch_reg));
|
||||||
|
|
||||||
/* D might not fit in 14 bits either; for such cases load D into
|
/* D might not fit in 14 bits either; for such cases load D into
|
||||||
scratch reg. */
|
scratch reg. */
|
||||||
if (!memory_address_p (Pmode, XEXP (operand0, 0)))
|
if (!memory_address_p (Pmode, XEXP (operand0, 0)))
|
||||||
|
@ -1224,6 +1235,11 @@ emit_move_sequence (operands, mode, scratch_reg)
|
||||||
{
|
{
|
||||||
rtx xoperands[2];
|
rtx xoperands[2];
|
||||||
|
|
||||||
|
/* SCRATCH_REG will hold an address and maybe the actual data. We want
|
||||||
|
it in WORD_MODE regardless of what mode it was originally given
|
||||||
|
to us. */
|
||||||
|
scratch_reg = gen_rtx_REG (word_mode, REGNO (scratch_reg));
|
||||||
|
|
||||||
/* Force the constant into memory and put the address of the
|
/* Force the constant into memory and put the address of the
|
||||||
memory location into scratch_reg. */
|
memory location into scratch_reg. */
|
||||||
xoperands[0] = scratch_reg;
|
xoperands[0] = scratch_reg;
|
||||||
|
@ -1244,6 +1260,11 @@ emit_move_sequence (operands, mode, scratch_reg)
|
||||||
&& FP_REG_CLASS_P (REGNO_REG_CLASS (REGNO (operand1)))))
|
&& FP_REG_CLASS_P (REGNO_REG_CLASS (REGNO (operand1)))))
|
||||||
&& scratch_reg)
|
&& scratch_reg)
|
||||||
{
|
{
|
||||||
|
/* SCRATCH_REG will hold an address and maybe the actual data. We want
|
||||||
|
it in WORD_MODE regardless of what mode it was originally given
|
||||||
|
to us. */
|
||||||
|
scratch_reg = gen_rtx_REG (word_mode, REGNO (scratch_reg));
|
||||||
|
|
||||||
/* D might not fit in 14 bits either; for such cases load D into
|
/* D might not fit in 14 bits either; for such cases load D into
|
||||||
scratch reg. */
|
scratch reg. */
|
||||||
if (GET_CODE (operand1) == MEM
|
if (GET_CODE (operand1) == MEM
|
||||||
|
@ -1336,7 +1357,13 @@ emit_move_sequence (operands, mode, scratch_reg)
|
||||||
|
|
||||||
/* Figure out what (if any) scratch register to use. */
|
/* Figure out what (if any) scratch register to use. */
|
||||||
if (reload_in_progress || reload_completed)
|
if (reload_in_progress || reload_completed)
|
||||||
scratch_reg = scratch_reg ? scratch_reg : operand0;
|
{
|
||||||
|
scratch_reg = scratch_reg ? scratch_reg : operand0;
|
||||||
|
/* SCRATCH_REG will hold an address and maybe the actual
|
||||||
|
data. We want it in WORD_MODE regardless of what mode it
|
||||||
|
was originally given to us. */
|
||||||
|
scratch_reg = gen_rtx_REG (word_mode, REGNO (scratch_reg));
|
||||||
|
}
|
||||||
else if (flag_pic)
|
else if (flag_pic)
|
||||||
scratch_reg = gen_reg_rtx (Pmode);
|
scratch_reg = gen_reg_rtx (Pmode);
|
||||||
|
|
||||||
|
@ -1388,7 +1415,13 @@ emit_move_sequence (operands, mode, scratch_reg)
|
||||||
rtx temp;
|
rtx temp;
|
||||||
|
|
||||||
if (reload_in_progress || reload_completed)
|
if (reload_in_progress || reload_completed)
|
||||||
temp = scratch_reg ? scratch_reg : operand0;
|
{
|
||||||
|
temp = scratch_reg ? scratch_reg : operand0;
|
||||||
|
/* TEMP will hold an address and maybe the actual
|
||||||
|
data. We want it in WORD_MODE regardless of what mode it
|
||||||
|
was originally given to us. */
|
||||||
|
temp = gen_rtx_REG (word_mode, REGNO (temp));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
temp = gen_reg_rtx (Pmode);
|
temp = gen_reg_rtx (Pmode);
|
||||||
|
|
||||||
|
@ -1421,7 +1454,13 @@ emit_move_sequence (operands, mode, scratch_reg)
|
||||||
rtx temp, set;
|
rtx temp, set;
|
||||||
|
|
||||||
if (reload_in_progress || reload_completed)
|
if (reload_in_progress || reload_completed)
|
||||||
temp = scratch_reg ? scratch_reg : operand0;
|
{
|
||||||
|
temp = scratch_reg ? scratch_reg : operand0;
|
||||||
|
/* TEMP will hold an address and maybe the actual
|
||||||
|
data. We want it in WORD_MODE regardless of what mode it
|
||||||
|
was originally given to us. */
|
||||||
|
temp = gen_rtx_REG (word_mode, REGNO (temp));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
temp = gen_reg_rtx (mode);
|
temp = gen_reg_rtx (mode);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue