summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-04 18:53:29 +0000
committeryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-04 18:53:29 +0000
commit2eb1dfe9c8dad5847273300a75b7f6234cc4b96a (patch)
tree45554e4f0b30c9086be8e2ff641708dd7dd6ed08
parentbef9a07c9d4218ce842d68e71dc1a431609d5d4c (diff)
downloadlinaro-gcc-2eb1dfe9c8dad5847273300a75b7f6234cc4b96a.tar.gz
linaro-gcc-2eb1dfe9c8dad5847273300a75b7f6234cc4b96a.tar.bz2
linaro-gcc-2eb1dfe9c8dad5847273300a75b7f6234cc4b96a.zip
2014-12-04 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@218394 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.linaro15
-rw-r--r--gcc/config/aarch64/atomics.md12
-rw-r--r--gcc/config/aarch64/iterators.md3
3 files changed, 24 insertions, 6 deletions
diff --git a/gcc/ChangeLog.linaro b/gcc/ChangeLog.linaro
index b23a89060f5..cdbe81dea13 100644
--- a/gcc/ChangeLog.linaro
+++ b/gcc/ChangeLog.linaro
@@ -1,5 +1,20 @@
2014-12-04 Yvan Roux <yvan.roux@linaro.org>
+ Backport from trunk 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.
+
+2014-12-04 Yvan Roux <yvan.roux@linaro.org>
+
Backport from trunk r217026.
2014-11-03 Zhenqiang Chen <zhenqiang.chen@arm.com>
diff --git a/gcc/config/aarch64/atomics.md b/gcc/config/aarch64/atomics.md
index bffa465defc..eb7daa1aec9 100644
--- a/gcc/config/aarch64/atomics.md
+++ b/gcc/config/aarch64/atomics.md
@@ -119,7 +119,7 @@
[(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))
@@ -141,7 +141,7 @@
(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))
@@ -164,7 +164,7 @@
(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))
@@ -188,7 +188,7 @@
(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))
@@ -209,7 +209,7 @@
[(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)
@@ -233,7 +233,7 @@
(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)
diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md
index 6edc8d17454..fc705075cab 100644
--- a/gcc/config/aarch64/iterators.md
+++ b/gcc/config/aarch64/iterators.md
@@ -358,6 +358,9 @@
;; 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")])