From 112ccb83bb807c18e7540748b0b3af51d6cbe6cb Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Mon, 2 Aug 2004 01:46:40 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 11 +++++++ gcc/config/rs6000/rs6000.c | 9 +----- gcc/config/rs6000/rs6000.md | 59 +++++++++++++------------------------ 3 files changed, 33 insertions(+), 46 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 52e58e4789f..f604e8dc4bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2004-08-01 Geoffrey Keating + + * 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 PR target/16155 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index a624764e454..773ca9ef487 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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++) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index be15c9212c0..dc8ce50b137 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -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 -- 2.30.2