pa.c (legitimize_address): Consistently use Pmode rather than SImode.
authorJeffrey A Law <law@cygnus.com>
Wed, 28 Jul 1999 21:46:39 +0000 (21:46 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 28 Jul 1999 21:46:39 +0000 (15:46 -0600)
        * 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
gcc/config/pa/pa.c
gcc/config/pa/pa.md

index fdcb0894b70d014fa46f2c14bba6c1c072d83817..7a125b74a974543a61010b32fdacf9a01ebc4e2a 100644 (file)
@@ -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.
 
index ec77fb2af36cb1f6af21b57ae60a0b8425c516e0..03e178f3886c47c32a022af4d17cccbd69e66810 100644 (file)
@@ -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)));
        }
index ea1c685499439ae03449d674d69f6d8dd09f37ae..b441f3df51195b876926a223c8fad3fc65f5c73c 100644 (file)
   [(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.