Wed Jul 28 13:18:35 1999 Jeffrey A Law (law@cygnus.com)
+ * pa.c (legitimize_address): Consistently use Pmode rather than
+ SImode. Do not call gen_pic2_highpart directly anymore.
+ * pa.md (pic2_highpart): No longer a named pattern.
+ (pic2_lo_sum): Similarly. Reformat to make more readable.
+
* pa.md (call, call_value): Use "word_mode" instead of "SImode" as
needed.
if (flag_pic == 2)
{
- emit_insn (gen_pic2_highpart (reg, pic_offset_table_rtx, orig));
+ emit_move_insn (reg,
+ gen_rtx_PLUS (word_mode, pic_offset_table_rtx,
+ gen_rtx_HIGH (word_mode, orig)));
pic_ref
= gen_rtx_MEM (Pmode,
gen_rtx_LO_SUM (Pmode, reg,
- gen_rtx_UNSPEC (SImode,
+ gen_rtx_UNSPEC (Pmode,
gen_rtvec (1, orig),
0)));
}
[(set_attr "type" "multi")
(set_attr "length" "16")]) ; 12 or 16
-(define_insn "pic2_highpart"
+(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=a")
(plus:SI (match_operand:SI 1 "register_operand" "r")
(high:SI (match_operand 2 "" ""))))]
; We need this to make sure CSE doesn't simplify a memory load with a
; symbolic address, whose content it think it knows. For PIC, what CSE
; think is the real value will be the address of that value.
-(define_insn "pic2_lo_sum"
+(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r")
- (mem:SI (lo_sum:SI (match_operand:SI 1 "register_operand" "r")
- (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")] 0))))]
- ""
+ (mem:SI
+ (lo_sum:SI (match_operand:SI 1 "register_operand" "r")
+ (unspec:SI
+ [(match_operand:SI 2 "symbolic_operand" "")] 0))))]
"*
{
if (flag_pic != 2)
[(set_attr "type" "load")
(set_attr "length" "4")])
-
;; Always use addil rather than ldil;add sequences. This allows the
;; HP linker to eliminate the dp relocation if the symbolic operand
;; lives in the TEXT space.