rs6000.c (rs6000_split_multireg_move): Just abort if trying to *store* to a non-offsettable address.

* config/rs6000/rs6000.c (rs6000_split_multireg_move): Just abort
	if trying to *store* to a non-offsettable address.
	* config/rs6000/rs6000.md (movtf_internal): Don't move GPRs to
	a nonoffsettable address.
	(movdi_internal32): Don't move GPRs to a nonoffsettable address.
	Clean up.
	(movti_string): Don't move GPRs to a nonoffsettable address.
	(movti_ppc64): Don't move GPRs to a nonoffsettable address.  Clean up.

From-SVN: r85419
This commit is contained in:
Geoffrey Keating 2004-08-02 01:46:40 +00:00 committed by Geoffrey Keating
parent a4e41fdeec
commit 112ccb83bb
3 changed files with 33 additions and 46 deletions

View File

@ -1,3 +1,14 @@
2004-08-01 Geoffrey Keating <geoffk@apple.com>
* config/rs6000/rs6000.c (rs6000_split_multireg_move): Just abort
if trying to *store* to a non-offsettable address.
* config/rs6000/rs6000.md (movtf_internal): Don't move GPRs to
a nonoffsettable address.
(movdi_internal32): Don't move GPRs to a nonoffsettable address.
Clean up.
(movti_string): Don't move GPRs to a nonoffsettable address.
(movti_ppc64): Don't move GPRs to a nonoffsettable address. Clean up.
2004-08-02 Ben Elliston <bje@au.ibm.com>
PR target/16155

View File

@ -11134,14 +11134,7 @@ rs6000_split_multireg_move (rtx dst, rtx src)
dst = gen_rtx_MEM (mode, breg);
}
else if (! offsettable_memref_p (dst))
{
rtx newdst, basereg;
basereg = gen_rtx_REG (Pmode, reg);
emit_insn (gen_rtx_SET (VOIDmode, basereg, XEXP (dst, 0)));
newdst = gen_rtx_MEM (GET_MODE (dst), basereg);
MEM_COPY_ATTRIBUTES (newdst, dst);
dst = newdst;
}
abort ();
}
for (i = 0; i < nregs; i++)

View File

@ -8301,10 +8301,10 @@
; It's important to list the o->f and f->o moves before f->f because
; otherwise reload, given m->f, will try to pick f->f and reload it,
; which doesn't make progress.
; which doesn't make progress. Likewise r->o<> must be before r->r.
(define_insn_and_split "*movtf_internal"
[(set (match_operand:TF 0 "nonimmediate_operand" "=o,f,f,rm,r")
(match_operand:TF 1 "input_operand" "f,o,f,r,mGHF"))]
[(set (match_operand:TF 0 "nonimmediate_operand" "=o,f,f,r,o<>,r")
(match_operand:TF 1 "input_operand" "f,o,f,mGHF,r,r"))]
"(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN)
&& TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128
&& (gpc_reg_operand (operands[0], TFmode)
@ -8313,7 +8313,7 @@
"&& reload_completed"
[(pc)]
{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; }
[(set_attr "length" "8,8,8,20,20")])
[(set_attr "length" "8,8,8,20,20,16")])
(define_expand "extenddftf2"
[(parallel [(set (match_operand:TF 0 "nonimmediate_operand" "")
@ -8506,37 +8506,23 @@
""
"{ rs6000_emit_move (operands[0], operands[1], DImode); DONE; }")
; List r->r after r->"o<>", otherwise reload will try to reload a
; non-offsettable address by using r->r which won't make progress.
(define_insn "*movdi_internal32"
[(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,f,f,m,r,r,r,r,r")
(match_operand:DI 1 "input_operand" "r,m,r,f,m,f,IJK,n,G,H,F"))]
[(set (match_operand:DI 0 "nonimmediate_operand" "=o<>,r,r,f,f,m,r")
(match_operand:DI 1 "input_operand" "r,r,m,f,m,f,IJKnGHF"))]
"! TARGET_POWERPC64
&& (gpc_reg_operand (operands[0], DImode)
|| gpc_reg_operand (operands[1], DImode))"
"*
{
switch (which_alternative)
{
default:
abort ();
case 0:
case 1:
case 2:
return \"#\";
case 3:
return \"fmr %0,%1\";
case 4:
return \"lfd%U1%X1 %0,%1\";
case 5:
return \"stfd%U0%X0 %1,%0\";
case 6:
case 7:
case 8:
case 9:
case 10:
return \"#\";
}
}"
[(set_attr "type" "*,load,store,fp,fpload,fpstore,*,*,*,*,*")])
"@
#
#
#
fmr %0,%1
lfd%U1%X1 %0,%1
stfd%U0%X0 %1,%0
#"
[(set_attr "type" "load,*,store,fp,fpload,fpstore,*")])
(define_split
[(set (match_operand:DI 0 "gpc_reg_operand" "")
@ -8751,7 +8737,7 @@
[(set_attr "type" "store,store,*,load,load")])
(define_insn "*movti_string"
[(set (match_operand:TI 0 "reg_or_mem_operand" "=Q,m,????r,????r,????r")
[(set (match_operand:TI 0 "reg_or_mem_operand" "=Q,o<>,????r,????r,????r")
(match_operand:TI 1 "reg_or_mem_operand" "r,r,r,Q,m"))]
"! TARGET_POWER && ! TARGET_POWERPC64
&& (gpc_reg_operand (operands[0], TImode) || gpc_reg_operand (operands[1], TImode))"
@ -8781,14 +8767,11 @@
[(set_attr "type" "store,store,*,load,load")])
(define_insn "*movti_ppc64"
[(set (match_operand:TI 0 "nonimmediate_operand" "=r,m,r")
(match_operand:TI 1 "input_operand" "r,r,o"))]
[(set (match_operand:TI 0 "nonimmediate_operand" "=r,o<>,r")
(match_operand:TI 1 "input_operand" "r,r,m"))]
"TARGET_POWERPC64 && (gpc_reg_operand (operands[0], TImode)
|| gpc_reg_operand (operands[1], TImode))"
"@
#
#
#"
"#"
[(set_attr "type" "*,load,store")])
(define_split