OSDN Git Service

PR 10066
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Mar 2003 22:04:56 +0000 (22:04 +0000)
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Mar 2003 22:04:56 +0000 (22:04 +0000)
* arm.md (UNSPEC_PIC_BASE): New constant.
(pic_add_dot_plus_four): Wrap with unspec.
(pic_add_dot_plus_eight): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64626 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 6f248a8..9ad15c8 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 7ad63f2..4e11128 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"
   "*