re PR target/10066 ([arm-linux] libjava build error on arm-linux)
authorRichard Earnshaw <rearnsha@arm.com>
Thu, 20 Mar 2003 22:04:56 +0000 (22:04 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Thu, 20 Mar 2003 22:04:56 +0000 (22:04 +0000)
PR 10066
* arm.md (UNSPEC_PIC_BASE): New constant.
(pic_add_dot_plus_four): Wrap with unspec.
(pic_add_dot_plus_eight): Likewise.

From-SVN: r64626

gcc/ChangeLog
gcc/config/arm/arm.md

index 6f248a8bdf5f4caff9f30f6fbb2414115764be32..9ad15c8f8a90eb2c5b5280635cfcaa64a0eb77f8 100644 (file)
@@ -1,3 +1,10 @@
+2003-03-20  Richard Earnshaw  <rearnsha@arm.com>
+
+       PR 10066
+       * arm.md (UNSPEC_PIC_BASE): New constant.
+       (pic_add_dot_plus_four): Wrap with unspec.
+       (pic_add_dot_plus_eight): Likewise.
+
 2003-03-20  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.md (*insv_si_1_n): New.
index 7ad63f2d989cb4787132ba4b116ee44d7a5b9407..4e111289a38b3573e266b30bcb28310c0f369fe7 100644 (file)
    (UNSPEC_PIC_SYM   3) ; A symbol that has been treated properly for pic
                        ;   usage, that is, we will add the pic_register
                        ;   value to it before trying to dereference it.
-   (UNSPEC_PRLG_STK  4) ; A special barrier that prevents frame accesses 
+   (UNSPEC_PIC_BASE  4)        ; Adding the PC value to the offset to the
+                       ;   GLOBAL_OFFSET_TABLE.  The operation is fully
+                       ;   described by the RTL but must be wrapped to
+                       ;   prevent combine from trying to rip it apart.
+   (UNSPEC_PRLG_STK  5) ; A special barrier that prevents frame accesses 
                        ;   being scheduled before the stack adjustment insn.
    (UNSPEC_PROLOGUE_USE 6) ; As USE insns are not meaningful after reload,
                        ; this unspec is used to prevent the deletion of
 
 (define_insn "pic_add_dot_plus_four"
   [(set (match_operand:SI 0 "register_operand" "+r")
-       (plus:SI (match_dup 0) (const (plus:SI (pc) (const_int 4)))))
+       (unspec:SI [(plus:SI (match_dup 0)
+                            (const (plus:SI (pc) (const_int 4))))]
+                  UNSPEC_PIC_BASE))
    (use (label_ref (match_operand 1 "" "")))]
   "TARGET_THUMB && flag_pic"
   "*
 
 (define_insn "pic_add_dot_plus_eight"
   [(set (match_operand:SI 0 "register_operand" "+r")
-       (plus:SI (match_dup 0) (const (plus:SI (pc) (const_int 8)))))
+       (unspec:SI [(plus:SI (match_dup 0)
+                            (const (plus:SI (pc) (const_int 8))))]
+                  UNSPEC_PIC_BASE))
    (use (label_ref (match_operand 1 "" "")))]
   "TARGET_ARM && flag_pic"
   "*