sparc.md (pic_{lo_sum,sethi}_di): New patterns necessary for PIC support on sparc64.

* sparc/sparc.md (pic_{lo_sum,sethi}_di): New patterns
	necessary for PIC support on sparc64.

From-SVN: r15982
This commit is contained in:
David S. Miller 1997-10-17 23:01:29 +00:00 committed by Doug Evans
parent bd6c666f80
commit 7e37212eeb
2 changed files with 18 additions and 0 deletions

View File

@ -6,6 +6,8 @@ Fri Oct 17 17:13:42 1997 David S. Miller <davem@tanya.rutgers.edu>
* sparc/sparc.c (dwarf2out_cfi_label): Extern no longer needed. * sparc/sparc.c (dwarf2out_cfi_label): Extern no longer needed.
(output_double_int): Output DI mode values correctly when (output_double_int): Output DI mode values correctly when
HOST_BITS_PER_WIDE_INT is 64. HOST_BITS_PER_WIDE_INT is 64.
* sparc/sparc.md (pic_{lo_sum,sethi}_di): New patterns
necessary for PIC support on sparc64.
Fri Oct 17 13:39:56 1997 Doug Evans <dje@canuck.cygnus.com> Fri Oct 17 13:39:56 1997 Doug Evans <dje@canuck.cygnus.com>

View File

@ -1533,6 +1533,22 @@
[(set_attr "type" "move") [(set_attr "type" "move")
(set_attr "length" "1")]) (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")])
(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")])
(define_insn "get_pc_via_call" (define_insn "get_pc_via_call"
[(set (pc) (label_ref (match_operand 0 "" ""))) [(set (pc) (label_ref (match_operand 0 "" "")))
(set (reg:SI 15) (label_ref (match_operand 1 "" "")))] (set (reg:SI 15) (label_ref (match_operand 1 "" "")))]