summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-22 06:31:00 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-22 06:31:00 +0000
commit1cdf4fe0553d5ba735f6b3a4f80a8f1f18887217 (patch)
tree352631ff0caab212ae7dea72755c53696785ae04
parent1fc21d30b8414d83f1cf629b845542ffeaadf3ea (diff)
downloadgcc-1cdf4fe0553d5ba735f6b3a4f80a8f1f18887217.tar.gz
* rs6000.md (*movsi_got_internal_mem): New pattern.
(*movsi_got_internal_mem splitter): New define_split. Fixes some egcs bugs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16146 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.md28
2 files changed, 33 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8b80c2e95af..baf82575663 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Wed Oct 22 00:34:12 1997 Jeffrey A Law (law@cygnus.com)
+
+ * rs6000.md (*movsi_got_internal_mem): New pattern.
+ (*movsi_got_internal_mem splitter): New define_split.
+
Tue Oct 21 18:14:03 1997 Jim Wilson <wilson@cygnus.com>
* obstack.h (obstack_empty_p): Fix spurious space after backslash.
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index ce2435edc66..39877c0d458 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -5156,6 +5156,34 @@
"{l|lwz} %0,%a1@got(%2)"
[(set_attr "type" "load")])
+;; Sometimes, though, the GOT `register' will be on the stack. Deal with
+;; this case specially.
+;; Force final to split this insn (if it hasn't been split already) to
+;; avoid having to create a suitable output template.
+(define_insn "*movsi_got_internal_mem"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (unspec [(match_operand:SI 1 "got_no_const_operand" "")
+ (match_operand:SI 2 "memory_operand" "m")] 8))]
+ "(DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)
+ && flag_pic == 1
+ && (reload_in_progress || reload_completed)"
+ "#"
+ [(set_attr "type" "load")
+ (set_attr "length" "8")])
+
+;; Used by sched, shorten_branches and final when the GOT pseudo reg
+;; didn't get allocated to a hard register.
+(define_split
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (unspec [(match_operand:SI 1 "got_no_const_operand" "")
+ (match_operand:SI 2 "memory_operand" "m")] 8))]
+ "(DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)
+ && flag_pic == 1
+ && (reload_in_progress || reload_completed)"
+ [(set (match_dup 0) (match_dup 2))
+ (set (match_dup 0) (unspec [(match_dup 1)(match_dup 0)] 8))]
+ "")
+
;; For SI, we special-case integers that can't be loaded in one insn. We
;; do the load 16-bits at a time. We could do this by loading from memory,
;; and this is even supposed to be faster, but it is simpler not to get