]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: iterators.md (lconst_atomic): New mode attribute to support constraints...
authorChristophe Lyon <christophe.lyon@linaro.org>
Tue, 16 Jun 2015 10:28:40 +0000 (10:28 +0000)
committerChristophe Lyon <clyon@gcc.gnu.org>
Tue, 16 Jun 2015 10:28:40 +0000 (12:28 +0200)
2015-06-16  Christophe Lyon  <christophe.lyon@linaro.org>

Backported from mainline r217076.
2014-11-04  Michael Collison <michael.collison@linaro.org>

* config/aarch64/iterators.md (lconst_atomic): New mode attribute
to support constraints for CONST_INT in atomic operations.
* config/aarch64/atomics.md
(atomic_<atomic_optab><mode>): Use lconst_atomic constraint.
(atomic_nand<mode>): Likewise.
(atomic_fetch_<atomic_optab><mode>): Likewise.
(atomic_fetch_nand<mode>): Likewise.
(atomic_<atomic_optab>_fetch<mode>): Likewise.
(atomic_nand_fetch<mode>): Likewise.

From-SVN: r224510

gcc/ChangeLog
gcc/config/aarch64/atomics.md
gcc/config/aarch64/iterators.md

index ead8fbb94172f0be50bd4e5e5a0e4bdcb9767eb7..033e80c1ef433052bce953c1674b2d16c16941c4 100644 (file)
@@ -1,3 +1,18 @@
+2015-06-16  Christophe Lyon  <christophe.lyon@linaro.org>
+
+       Backported from mainline r217076.
+       2014-11-04  Michael Collison <michael.collison@linaro.org>
+
+       * config/aarch64/iterators.md (lconst_atomic): New mode attribute
+       to support constraints for CONST_INT in atomic operations.
+       * config/aarch64/atomics.md
+       (atomic_<atomic_optab><mode>): Use lconst_atomic constraint.
+       (atomic_nand<mode>): Likewise.
+       (atomic_fetch_<atomic_optab><mode>): Likewise.
+       (atomic_fetch_nand<mode>): Likewise.
+       (atomic_<atomic_optab>_fetch<mode>): Likewise.
+       (atomic_nand_fetch<mode>): Likewise.
+
 2015-06-12  Michael Matz  <matz@suse.de>
 
        Backported from mainline
index e576166c900d5361471a041102c2f59ab647863d..fe09dea1d01b3d516b870dffab6553f14e80a6a4 100644 (file)
   [(set (match_operand:ALLI 0 "aarch64_sync_memory_operand" "+Q")
     (unspec_volatile:ALLI
       [(atomic_op:ALLI (match_dup 0)
-       (match_operand:ALLI 1 "<atomic_op_operand>" "rn"))
+       (match_operand:ALLI 1 "<atomic_op_operand>" "r<lconst_atomic>"))
        (match_operand:SI 2 "const_int_operand")]               ;; model
       UNSPECV_ATOMIC_OP))
        (clobber (reg:CC CC_REGNUM))
     (unspec_volatile:ALLI
       [(not:ALLI
        (and:ALLI (match_dup 0)
-         (match_operand:ALLI 1 "aarch64_logical_operand" "rn")))
+         (match_operand:ALLI 1 "aarch64_logical_operand" "r<lconst_atomic>")))
        (match_operand:SI 2 "const_int_operand")]               ;; model
       UNSPECV_ATOMIC_OP))
    (clobber (reg:CC CC_REGNUM))
    (set (match_dup 1)
     (unspec_volatile:ALLI
       [(atomic_op:ALLI (match_dup 1)
-       (match_operand:ALLI 2 "<atomic_op_operand>" "rn"))
+       (match_operand:ALLI 2 "<atomic_op_operand>" "r<lconst_atomic>"))
        (match_operand:SI 3 "const_int_operand")]               ;; model
       UNSPECV_ATOMIC_OP))
    (clobber (reg:CC CC_REGNUM))
     (unspec_volatile:ALLI
       [(not:ALLI
         (and:ALLI (match_dup 1)
-          (match_operand:ALLI 2 "aarch64_logical_operand" "rn")))
+          (match_operand:ALLI 2 "aarch64_logical_operand" "r<lconst_atomic>")))
        (match_operand:SI 3 "const_int_operand")]               ;; model
       UNSPECV_ATOMIC_OP))
    (clobber (reg:CC CC_REGNUM))
   [(set (match_operand:ALLI 0 "register_operand" "=&r")
     (atomic_op:ALLI
       (match_operand:ALLI 1 "aarch64_sync_memory_operand" "+Q")
-      (match_operand:ALLI 2 "<atomic_op_operand>" "rn")))
+      (match_operand:ALLI 2 "<atomic_op_operand>" "r<lconst_atomic>")))
    (set (match_dup 1)
     (unspec_volatile:ALLI
       [(match_dup 1) (match_dup 2)
     (not:ALLI
       (and:ALLI
        (match_operand:ALLI 1 "aarch64_sync_memory_operand" "+Q")
-       (match_operand:ALLI 2 "aarch64_logical_operand" "rn"))))
+       (match_operand:ALLI 2 "aarch64_logical_operand" "r<lconst_atomic>"))))
    (set (match_dup 1)
     (unspec_volatile:ALLI
       [(match_dup 1) (match_dup 2)
index d19b26a6484dbd43c209466f471ccf1f57eb3354..f283850fab2788ef5785e68eda6f473b1b438ad5 100644 (file)
 ;; Attribute to describe constants acceptable in logical operations
 (define_mode_attr lconst [(SI "K") (DI "L")])
 
+;; Attribute to describe constants acceptable in atomic logical operations
+(define_mode_attr lconst_atomic [(QI "K") (HI "K") (SI "K") (DI "L")])
+
 ;; Map a mode to a specific constraint character.
 (define_mode_attr cmode [(QI "q") (HI "h") (SI "s") (DI "d")])