]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
constraints.md (Usd): Convert to define_constraint.
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 28 Apr 2016 17:16:05 +0000 (18:16 +0100)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Thu, 28 Apr 2016 17:16:05 +0000 (18:16 +0100)
2016-04-28  Andrew Burgess  <andrew.burgess@embecosm.com>

        * config/arc/constraints.md (Usd): Convert to define_constraint.
        (Us<): Likewise.
        (Us>): Likewise.

From-SVN: r235587

gcc/ChangeLog
gcc/config/arc/constraints.md

index d18013ef8a4bee420fea236ddd0dede7a21638ec..0c0e1ac0177ff06b992b475bc38095838ebf1869 100644 (file)
@@ -1,3 +1,9 @@
+2016-04-28  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * config/arc/constraints.md (Usd): Convert to define_constraint.
+       (Us<): Likewise.
+       (Us>): Likewise.
+
 2016-04-28  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/70821
index 668b60a6b3a6419081912b50d431fc43e3d4cff4..b6954ad9456ab91c8672fa3e50ed73f8ee0c5797 100644 (file)
   (and (match_code "mem")
        (match_test "compact_store_memory_operand (op, VOIDmode)")))
 
-(define_memory_constraint "Usd"
-  "@internal
-   A valid _small-data_ memory operand for ARCompact instructions"
-  (and (match_code "mem")
-       (match_test "compact_sda_memory_operand (op, VOIDmode)")))
+; Don't use define_memory_constraint here as the relocation patching
+; for small data symbols only works within a ld/st instruction and
+; define_memory_constraint may result in the address being calculated
+; into a register first.
+(define_constraint "Usd"
+   "@internal
+    A valid _small-data_ memory operand for ARCompact instructions"
+   (and (match_code "mem")
+        (match_test "compact_sda_memory_operand (op, VOIDmode)")))
 
 (define_memory_constraint "Usc"
   "@internal
 ;; ??? the assembler rejects stores of immediates to small data.
        (match_test "!compact_sda_memory_operand (op, VOIDmode)")))
 
-(define_memory_constraint "Us<"
+(define_constraint "Us<"
   "@internal
    Stack pre-decrement"
   (and (match_code "mem")
        (match_test "REG_P (XEXP (XEXP (op, 0), 0))")
        (match_test "REGNO (XEXP (XEXP (op, 0), 0)) == SP_REG")))
 
-(define_memory_constraint "Us>"
+(define_constraint "Us>"
   "@internal
    Stack post-increment"
   (and (match_code "mem")