aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-07-28 21:46:39 +0000
committerJeff Law <law@gcc.gnu.org>1999-07-28 15:46:39 -0600
commit2a0a6f69ea9d8f74cbfe8b04d545ac9744554148 (patch)
treeacb69eed6e9a4e9ccdc6cde450e7d042ad9880ac /gcc
parentb70a1fb1c212d8da60498679cd4009f39519b390 (diff)
downloadgcc-2a0a6f69ea9d8f74cbfe8b04d545ac9744554148.zip
gcc-2a0a6f69ea9d8f74cbfe8b04d545ac9744554148.tar.gz
gcc-2a0a6f69ea9d8f74cbfe8b04d545ac9744554148.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/pa/pa.c6
-rw-r--r--gcc/config/pa/pa.md12
3 files changed, 15 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fdcb089..7a125b7 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 ec77fb2..03e178f 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 ea1c685..b441f3d 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.