diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-12 22:54:09 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-12 22:54:09 +0000 |
commit | d23435e76dd0d999834860377587dbd6a995074f (patch) | |
tree | 2dafe3376a9eed9d89265d0ab6b050156a96b362 | |
parent | 433aab00c7da36179e4fe977de2b291640ee7e33 (diff) | |
download | gcc-d23435e76dd0d999834860377587dbd6a995074f.tar.gz |
2008-12-12 Andrew Pinski <andrew_pinskia@playstation.sony.com>
Peter Bergner <bergner@vnet.ibm.com>
PR target/24779
* config/rs6000/rs6000.md (call_indirect_aix32): Move the load of the
TOC into the call pattern.
(call_indirect_aix64): Likewise.
(call_value_indirect_aix32): Likewise.
(call_value_indirect_aix64): Likewise.
(call_indirect_nonlocal_aix32_internal): New insn and split patterns
to split off the load of the TOC.
(call_indirect_nonlocal_aix32): Enable only after reload.
(call_indirect_nonlocal_aix64_internal): New insn and split patterns
to split off the load of the TOC.
(call_indirect_nonlocal_aix64): Enable only after reload.
(call_value_indirect_nonlocal_aix32_internal): New insn and split
patterns to split off the load of the TOC.
(call_value_indirect_nonlocal_aix32): Enable only after reload.
(call_value_indirect_nonlocal_aix64_internal): New insn and split
patterns to split off the load of the TOC.
(call_value_indirect_nonlocal_aix64): Enable only after reload.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142727 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 22 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 137 |
2 files changed, 131 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 585f102b621..f25094f8a12 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,25 @@ +2008-12-12 Andrew Pinski <andrew_pinskia@playstation.sony.com> + Peter Bergner <bergner@vnet.ibm.com> + + PR target/24779 + * config/rs6000/rs6000.md (call_indirect_aix32): Move the load of the + TOC into the call pattern. + (call_indirect_aix64): Likewise. + (call_value_indirect_aix32): Likewise. + (call_value_indirect_aix64): Likewise. + (call_indirect_nonlocal_aix32_internal): New insn and split patterns + to split off the load of the TOC. + (call_indirect_nonlocal_aix32): Enable only after reload. + (call_indirect_nonlocal_aix64_internal): New insn and split patterns + to split off the load of the TOC. + (call_indirect_nonlocal_aix64): Enable only after reload. + (call_value_indirect_nonlocal_aix32_internal): New insn and split + patterns to split off the load of the TOC. + (call_value_indirect_nonlocal_aix32): Enable only after reload. + (call_value_indirect_nonlocal_aix64_internal): New insn and split + patterns to split off the load of the TOC. + (call_value_indirect_nonlocal_aix64): Enable only after reload. + 2008-12-12 Andreas Schwab <schwab@suse.de> Revert: diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index b1df32aa17c..7a6c0369065 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -10798,18 +10798,14 @@ (mem:SI (match_operand:SI 0 "gpc_reg_operand" ""))) (set (mem:SI (plus:SI (reg:SI 1) (const_int 20))) (reg:SI 2)) - (set (reg:SI 2) - (mem:SI (plus:SI (match_dup 0) - (const_int 4)))) (set (reg:SI 11) (mem:SI (plus:SI (match_dup 0) (const_int 8)))) (parallel [(call (mem:SI (match_dup 2)) (match_operand 1 "" "")) - (use (reg:SI 2)) + (use (mem:SI (plus:SI (match_dup 0) (const_int 4)))) (use (reg:SI 11)) - (set (reg:SI 2) - (mem:SI (plus:SI (reg:SI 1) (const_int 20)))) + (use (mem:SI (plus:SI (reg:SI 1) (const_int 20)))) (clobber (reg:SI LR_REGNO))])] "TARGET_32BIT" " @@ -10820,18 +10816,14 @@ (mem:DI (match_operand:DI 0 "gpc_reg_operand" ""))) (set (mem:DI (plus:DI (reg:DI 1) (const_int 40))) (reg:DI 2)) - (set (reg:DI 2) - (mem:DI (plus:DI (match_dup 0) - (const_int 8)))) (set (reg:DI 11) (mem:DI (plus:DI (match_dup 0) (const_int 16)))) (parallel [(call (mem:SI (match_dup 2)) (match_operand 1 "" "")) - (use (reg:DI 2)) + (use (mem:DI (plus:DI (match_dup 0) (const_int 8)))) (use (reg:DI 11)) - (set (reg:DI 2) - (mem:DI (plus:DI (reg:DI 1) (const_int 40)))) + (use (mem:DI (plus:DI (reg:DI 1) (const_int 40)))) (clobber (reg:SI LR_REGNO))])] "TARGET_64BIT" " @@ -10842,19 +10834,15 @@ (mem:SI (match_operand:SI 1 "gpc_reg_operand" ""))) (set (mem:SI (plus:SI (reg:SI 1) (const_int 20))) (reg:SI 2)) - (set (reg:SI 2) - (mem:SI (plus:SI (match_dup 1) - (const_int 4)))) (set (reg:SI 11) (mem:SI (plus:SI (match_dup 1) (const_int 8)))) (parallel [(set (match_operand 0 "" "") (call (mem:SI (match_dup 3)) (match_operand 2 "" ""))) - (use (reg:SI 2)) + (use (mem:SI (plus:SI (match_dup 1) (const_int 4)))) (use (reg:SI 11)) - (set (reg:SI 2) - (mem:SI (plus:SI (reg:SI 1) (const_int 20)))) + (use (mem:SI (plus:SI (reg:SI 1) (const_int 20)))) (clobber (reg:SI LR_REGNO))])] "TARGET_32BIT" " @@ -10865,19 +10853,15 @@ (mem:DI (match_operand:DI 1 "gpc_reg_operand" ""))) (set (mem:DI (plus:DI (reg:DI 1) (const_int 40))) (reg:DI 2)) - (set (reg:DI 2) - (mem:DI (plus:DI (match_dup 1) - (const_int 8)))) (set (reg:DI 11) (mem:DI (plus:DI (match_dup 1) (const_int 16)))) (parallel [(set (match_operand 0 "" "") (call (mem:SI (match_dup 3)) (match_operand 2 "" ""))) - (use (reg:DI 2)) + (use (mem:DI (plus:DI (match_dup 1) (const_int 8)))) (use (reg:DI 11)) - (set (reg:DI 2) - (mem:DI (plus:DI (reg:DI 1) (const_int 40)))) + (use (mem:DI (plus:DI (reg:DI 1) (const_int 40)))) (clobber (reg:SI LR_REGNO))])] "TARGET_64BIT" " @@ -11079,6 +11063,29 @@ ;; variable argument function. It is > 0 if FP registers were passed ;; and < 0 if they were not. +(define_insn_and_split "*call_indirect_nonlocal_aix32_internal" + [(call (mem:SI (match_operand:SI 0 "register_operand" "c,*l")) + (match_operand 1 "" "g,g")) + (use (mem:SI (plus:SI (match_operand:SI 2 "register_operand" "b,b") (const_int 4)))) + (use (reg:SI 11)) + (use (mem:SI (plus:SI (reg:SI 1) (const_int 20)))) + (clobber (reg:SI LR_REGNO))] + "TARGET_32BIT && DEFAULT_ABI == ABI_AIX" + "#" + "&& reload_completed" + [(set (reg:SI 2) + (mem:SI (plus:SI (match_dup 2) (const_int 4)))) + (parallel [(call (mem:SI (match_dup 0)) + (match_dup 1)) + (use (reg:SI 2)) + (use (reg:SI 11)) + (set (reg:SI 2) + (mem:SI (plus:SI (reg:SI 1) (const_int 20)))) + (clobber (reg:SI LR_REGNO))])] + "" + [(set_attr "type" "jmpreg") + (set_attr "length" "12")]) + (define_insn "*call_indirect_nonlocal_aix32" [(call (mem:SI (match_operand:SI 0 "register_operand" "c,*l")) (match_operand 1 "" "g,g")) @@ -11087,7 +11094,7 @@ (set (reg:SI 2) (mem:SI (plus:SI (reg:SI 1) (const_int 20)))) (clobber (reg:SI LR_REGNO))] - "TARGET_32BIT && DEFAULT_ABI == ABI_AIX" + "TARGET_32BIT && DEFAULT_ABI == ABI_AIX && reload_completed" "b%T0l\;{l|lwz} 2,20(1)" [(set_attr "type" "jmpreg") (set_attr "length" "8")]) @@ -11103,6 +11110,30 @@ "bl %z0\;%." [(set_attr "type" "branch") (set_attr "length" "8")]) + +(define_insn_and_split "*call_indirect_nonlocal_aix64_internal" + [(call (mem:SI (match_operand:DI 0 "register_operand" "c,*l")) + (match_operand 1 "" "g,g")) + (use (mem:DI (plus:DI (match_operand:DI 2 "register_operand" "b,b") + (const_int 8)))) + (use (reg:DI 11)) + (use (mem:DI (plus:DI (reg:DI 1) (const_int 40)))) + (clobber (reg:SI LR_REGNO))] + "TARGET_64BIT && DEFAULT_ABI == ABI_AIX" + "#" + "&& reload_completed" + [(set (reg:DI 2) + (mem:DI (plus:DI (match_dup 2) (const_int 8)))) + (parallel [(call (mem:SI (match_dup 0)) + (match_dup 1)) + (use (reg:DI 2)) + (use (reg:DI 11)) + (set (reg:DI 2) + (mem:DI (plus:DI (reg:DI 1) (const_int 40)))) + (clobber (reg:SI LR_REGNO))])] + "" + [(set_attr "type" "jmpreg") + (set_attr "length" "12")]) (define_insn "*call_indirect_nonlocal_aix64" [(call (mem:SI (match_operand:DI 0 "register_operand" "c,*l")) @@ -11112,7 +11143,7 @@ (set (reg:DI 2) (mem:DI (plus:DI (reg:DI 1) (const_int 40)))) (clobber (reg:SI LR_REGNO))] - "TARGET_64BIT && DEFAULT_ABI == ABI_AIX" + "TARGET_64BIT && DEFAULT_ABI == ABI_AIX && reload_completed" "b%T0l\;ld 2,40(1)" [(set_attr "type" "jmpreg") (set_attr "length" "8")]) @@ -11129,6 +11160,31 @@ [(set_attr "type" "branch") (set_attr "length" "8")]) +(define_insn_and_split "*call_value_indirect_nonlocal_aix32_internal" + [(set (match_operand 0 "" "") + (call (mem:SI (match_operand:SI 1 "register_operand" "c,*l")) + (match_operand 2 "" "g,g"))) + (use (mem:SI (plus:SI (match_operand:SI 3 "register_operand" "b,b") + (const_int 4)))) + (use (reg:SI 11)) + (use (mem:SI (plus:SI (reg:SI 1) (const_int 20)))) + (clobber (reg:SI LR_REGNO))] + "TARGET_32BIT && DEFAULT_ABI == ABI_AIX" + "#" + "&& reload_completed" + [(set (reg:SI 2) + (mem:SI (plus:SI (match_dup 3) (const_int 4)))) + (parallel [(set (match_dup 0) (call (mem:SI (match_dup 1)) + (match_dup 2))) + (use (reg:SI 2)) + (use (reg:SI 11)) + (set (reg:SI 2) + (mem:SI (plus:SI (reg:SI 1) (const_int 20)))) + (clobber (reg:SI LR_REGNO))])] + "" + [(set_attr "type" "jmpreg") + (set_attr "length" "12")]) + (define_insn "*call_value_indirect_nonlocal_aix32" [(set (match_operand 0 "" "") (call (mem:SI (match_operand:SI 1 "register_operand" "c,*l")) @@ -11138,7 +11194,7 @@ (set (reg:SI 2) (mem:SI (plus:SI (reg:SI 1) (const_int 20)))) (clobber (reg:SI LR_REGNO))] - "TARGET_32BIT && DEFAULT_ABI == ABI_AIX" + "TARGET_32BIT && DEFAULT_ABI == ABI_AIX && reload_completed" "b%T1l\;{l|lwz} 2,20(1)" [(set_attr "type" "jmpreg") (set_attr "length" "8")]) @@ -11156,6 +11212,31 @@ [(set_attr "type" "branch") (set_attr "length" "8")]) +(define_insn_and_split "*call_value_indirect_nonlocal_aix64_internal" + [(set (match_operand 0 "" "") + (call (mem:SI (match_operand:DI 1 "register_operand" "c,*l")) + (match_operand 2 "" "g,g"))) + (use (mem:DI (plus:DI (match_operand:DI 3 "register_operand" "b,b") + (const_int 8)))) + (use (reg:DI 11)) + (use (mem:DI (plus:DI (reg:DI 1) (const_int 40)))) + (clobber (reg:SI LR_REGNO))] + "TARGET_64BIT && DEFAULT_ABI == ABI_AIX" + "#" + "&& reload_completed" + [(set (reg:DI 2) + (mem:DI (plus:DI (match_dup 3) (const_int 8)))) + (parallel [(set (match_dup 0) (call (mem:SI (match_dup 1)) + (match_dup 2))) + (use (reg:DI 2)) + (use (reg:DI 11)) + (set (reg:DI 2) + (mem:DI (plus:DI (reg:DI 1) (const_int 40)))) + (clobber (reg:SI LR_REGNO))])] + "" + [(set_attr "type" "jmpreg") + (set_attr "length" "12")]) + (define_insn "*call_value_indirect_nonlocal_aix64" [(set (match_operand 0 "" "") (call (mem:SI (match_operand:DI 1 "register_operand" "c,*l")) @@ -11165,7 +11246,7 @@ (set (reg:DI 2) (mem:DI (plus:DI (reg:DI 1) (const_int 40)))) (clobber (reg:SI LR_REGNO))] - "TARGET_64BIT && DEFAULT_ABI == ABI_AIX" + "TARGET_64BIT && DEFAULT_ABI == ABI_AIX && reload_completed" "b%T1l\;ld 2,40(1)" [(set_attr "type" "jmpreg") (set_attr "length" "8")]) |