* arm.md (pic_load_addr): Add constraints to operand 1.
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Oct 1999 21:11:18 +0000 (21:11 +0000)
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Oct 1999 21:11:18 +0000 (21:11 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30170 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 94a72a6..fcabdd8 100644 (file)
@@ -1,6 +1,11 @@
+Mon Oct 25 22:08:35 1999  Richard Earnshaw (rearnsha@arm.com)
+
+       * arm.md (pic_load_addr): Add constraints to operand 1.
+
 1999-10-25  Bruce Korb  <autogen@linuxbox.com>
 
-       * fixinc/genfixes:  Provide a means for specifying -D options to AutoGen
+       * fixinc/genfixes:  Provide a means for specifying -D options to
+       AutoGen
 
 Mon Oct 25 00:42:35 1999  Jeffrey A Law  (law@cygnus.com)
 
index 30673bb..88d4206 100644 (file)
           && GET_CODE (XEXP (XEXP (operands[1], 0), 1)) == CONST_INT))"
   "adr%?\\t%0, %a1")
 
-/* When generating pic, we need to load the symbol offset into a register.
-   So that the optimizer does not confuse this with a normal symbol load
-   we use an unspec.  The offset will be loaded from a constant pool entry,
-   since that is the only type of relocation we can use.  */
+;; When generating pic, we need to load the symbol offset into a register.
+;; So that the optimizer does not confuse this with a normal symbol load
+;; we use an unspec.  The offset will be loaded from a constant pool entry,
+;; since that is the only type of relocation we can use.
+
+;; The rather odd constraints on the following are to force reload to leave
+;; the insn alone, and to force the minipool generation pass to then move
+;; the GOT symbol to memory.
 
 (define_insn "pic_load_addr"
   [(set (match_operand:SI 0 "s_register_operand" "=r")
-       (unspec:SI [(match_operand 1 "" "")] 3))]
+       (unspec:SI [(match_operand:SI 1 "" "mX")] 3))]
   "flag_pic"
-  "ldr%?\\t%0, %a1"
+  "ldr%?\\t%0, %1"
  [(set_attr "type" "load")
   (set_attr "pool_range" "4096")])