diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dfad611f4b4..ece2b752bfe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -6,6 +6,8 @@ Fri Oct 17 17:13:42 1997 David S. Miller * sparc/sparc.c (dwarf2out_cfi_label): Extern no longer needed. (output_double_int): Output DI mode values correctly when 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 diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index a3b75d01cb1..2aac850a2bd 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -1533,6 +1533,22 @@ [(set_attr "type" "move") (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" [(set (pc) (label_ref (match_operand 0 "" ""))) (set (reg:SI 15) (label_ref (match_operand 1 "" "")))]