* Final tidbits for sparc64 PIC support
@ 1997-10-02 9:19 David S. Miller
0 siblings, 0 replies; only message in thread
From: David S. Miller @ 1997-10-02 9:19 UTC (permalink / raw)
To: egcs; +Cc: dje
I had omitted these from my original merge by mistake.
Thu Oct 2 12:14:54 1997 David S. Miller <davem@tanya.rutgers.edu>
* config/sparc/sparc.md (pic_{lo_sum,sethi}_di): New patterns
necessary for PIC support on sparc64.
--- config/sparc/sparc.md.~1~ Wed Sep 24 21:03:13 1997
+++ config/sparc/sparc.md Thu Oct 2 12:14:31 1997
@@ -1505,6 +1505,14 @@
;; is not an "arith_operand".
[(set_attr "length" "1")])
+(define_insn "pic_lo_sum_di"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (lo_sum:SI (match_operand:DI 1 "register_operand" "r")
+ (unspec:SI [(match_operand:DI 2 "immediate_operand" "in")] 0)))]
+ "TARGET_ARCH64 && flag_pic"
+ "add %1,%%lo(%a2),%0"
+ [(set_attr "length" "1")])
+
;; The PIC version of sethi must appear before the non-pic case so that
;; the unspec will not be matched as part of the operand.
;; For PIC, symbol_refs are put inside unspec so that the optimizer will not
@@ -1513,6 +1521,14 @@
[(set (match_operand:SI 0 "register_operand" "=r")
(high:SI (unspec:SI [(match_operand 1 "" "")] 0)))]
"flag_pic && check_pic (1)"
+ "sethi %%hi(%a1),%0"
+ [(set_attr "type" "move")
+ (set_attr "length" "1")])
+
+(define_insn "pic_sethi_di"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (high:SI (unspec:SI [(match_operand 1 "" "")] 0)))]
+ "TARGET_ARCH64 && flag_pic && check_pic (1)"
"sethi %%hi(%a1),%0"
[(set_attr "type" "move")
(set_attr "length" "1")])
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-10-02 9:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-02 9:19 Final tidbits for sparc64 PIC support David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).