diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2003-12-26 22:07:07 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2003-12-26 17:07:07 -0500 |
commit | 3364872d40a49c4c42e29cf7874bd44c8d5583c6 (patch) | |
tree | 49e2b764e22f3651b1d91e48bdd105e634dd7409 | |
parent | 88f2e10376c55f480fd0dbd222b8c1725571c6df (diff) | |
download | gcc-3364872d40a49c4c42e29cf7874bd44c8d5583c6.zip gcc-3364872d40a49c4c42e29cf7874bd44c8d5583c6.tar.gz gcc-3364872d40a49c4c42e29cf7874bd44c8d5583c6.tar.bz2 |
rs6000.c (legitimate_offset_address_p): Do not restrict DFmode and TFmode to word alignment.
2003-12-26 Fariborz Jahanian <fjahanian@apple.com>
Geoffrey Keating <geoffk@apple.com>
David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (legitimate_offset_address_p): Do not
restrict DFmode and TFmode to word alignment.
* config/rs6000/rs6000.md (movdf_hardfloat64): Use 'o' constraint
for ld/std and order before mr.
Co-Authored-By: David Edelsohn <edelsohn@gnu.org>
Co-Authored-By: Geoffrey Keating <geoffk@apple.com>
From-SVN: r75040
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 4 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 10 |
3 files changed, 17 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5898c3c..ba7e756 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2003-12-26 Fariborz Jahanian <fjahanian@apple.com> + Geoffrey Keating <geoffk@apple.com> + David Edelsohn <edelsohn@gnu.org> + + * config/rs6000/rs6000.c (legitimate_offset_address_p): Do not + restrict DFmode and TFmode to word alignment. + * config/rs6000/rs6000.md (movdf_hardfloat64): Use 'o' constraint + for ld/std and order before mr. + 2003-12-26 Andrew Pinski <pinskia@physics.uc.edu> * config/darwin.h (LINK_COMMAND_SPEC): Arrange diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 5e3d49a..4dc83c1 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -2448,7 +2448,7 @@ legitimate_offset_address_p (enum machine_mode mode, rtx x, int strict) case DFmode: case DImode: - if (!TARGET_POWERPC64) + if (mode == DFmode || !TARGET_POWERPC64) extra = 4; else if (offset & 3) return false; @@ -2456,7 +2456,7 @@ legitimate_offset_address_p (enum machine_mode mode, rtx x, int strict) case TFmode: case TImode: - if (!TARGET_POWERPC64) + if (mode == TFmode || !TARGET_POWERPC64) extra = 12; else if (offset & 3) return false; diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 402c08c..3ab0465 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -8159,16 +8159,18 @@ [(set_attr "type" "*,load,store,*,*,*") (set_attr "length" "8,8,8,8,12,16")]) +; ld/std require word-aligned displacements, so use offsettable constraint. +; List o->r and r->o before r->r for reload. (define_insn "*movdf_hardfloat64" - [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,m,f,f,m,!cl,!r,!r,!r,!r") - (match_operand:DF 1 "input_operand" "r,m,r,f,m,f,r,h,G,H,F"))] + [(set (match_operand:DF 0 "nonimmediate_operand" "=o,??r,!r,f,f,m,!cl,!r,!r,!r,!r") + (match_operand:DF 1 "input_operand" "r,o,r,f,m,f,r,h,G,H,F"))] "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && (gpc_reg_operand (operands[0], DFmode) || gpc_reg_operand (operands[1], DFmode))" "@ - mr %0,%1 - ld%U1%X1 %0,%1 std%U0%X0 %1,%0 + ld%U1%X1 %0,%1 + mr %0,%1 fmr %0,%1 lfd%U1%X1 %0,%1 stfd%U0%X0 %1,%0 |