From 2a0a6f69ea9d8f74cbfe8b04d545ac9744554148 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Wed, 28 Jul 1999 21:46:39 +0000 Subject: [PATCH] pa.c (legitimize_address): Consistently use Pmode rather than SImode. * 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. From-SVN: r28326 --- gcc/ChangeLog | 5 +++++ gcc/config/pa/pa.c | 6 ++++-- gcc/config/pa/pa.md | 12 ++++++------ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fdcb0894b70..7a125b74a97 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 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. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index ec77fb2af36..03e178f3886 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -639,11 +639,13 @@ legitimize_pic_address (orig, mode, reg) 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))); } diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index ea1c6854994..b441f3df511 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -1610,7 +1610,7 @@ [(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 "" ""))))] @@ -1624,11 +1624,12 @@ ; 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) @@ -1638,7 +1639,6 @@ [(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. -- 2.30.2