summaryrefslogtreecommitdiff
path: root/gcc/config/arc/predicates.md
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@synopsys.com>2015-12-10 14:32:21 +0100
committerClaudiu Zissulescu <claziss@gcc.gnu.org>2015-12-10 14:32:21 +0100
commitb8a64b7f5d699776983eab2c07125523e96bc6ea (patch)
treea9808e70899f6acf23ab79a385b0f2232a3e4e98 /gcc/config/arc/predicates.md
parent41eefe133f91ffeead07774a8f68040135e5fe1c (diff)
downloadgcc-b8a64b7f5d699776983eab2c07125523e96bc6ea.tar.gz
[ARC] Add support for atomic memory built-in.
gcc/ 2015-12-10 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc-protos.h (arc_expand_atomic_op): Prototype. (arc_split_compare_and_swap): Likewise. (arc_expand_compare_and_swap): Likewise. * config/arc/arc.c (arc_init): Check usage atomic option. (arc_pre_atomic_barrier): New function. (arc_post_atomic_barrier): Likewise. (emit_unlikely_jump): Likewise. (arc_expand_compare_and_swap_qh): Likewise. (arc_expand_compare_and_swap): Likewise. (arc_split_compare_and_swap): Likewise. (arc_expand_atomic_op): Likewise. * config/arc/arc.h (TARGET_CPU_CPP_BUILTINS): New C macro. (ASM_SPEC): Enable mlock option when matomic is used. * config/arc/arc.md (UNSPEC_ARC_MEMBAR): Define. (VUNSPEC_ARC_CAS): Likewise. (VUNSPEC_ARC_LL): Likewise. (VUNSPEC_ARC_SC): Likewise. (VUNSPEC_ARC_EX): Likewise. * config/arc/arc.opt (matomic): New option. * config/arc/constraints.md (ATO): New constraint. * config/arc/predicates.md (mem_noofs_operand): New predicate. * doc/invoke.texi: Document -matomic. * config/arc/atomic.md: New file. gcc/testsuite 2015-12-10 Claudiu Zissulescu <claziss@synopsys.com> * lib/target-supports.exp (check_effective_target_arc_atomic): New function. (check_effective_target_sync_int_long): Add checks for ARC atomic feature. (check_effective_target_sync_char_short): Likewise. From-SVN: r231509
Diffstat (limited to 'gcc/config/arc/predicates.md')
-rw-r--r--gcc/config/arc/predicates.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/arc/predicates.md b/gcc/config/arc/predicates.md
index 43f9474c691..de0735a4071 100644
--- a/gcc/config/arc/predicates.md
+++ b/gcc/config/arc/predicates.md
@@ -813,3 +813,7 @@
(define_predicate "short_const_int_operand"
(and (match_operand 0 "const_int_operand")
(match_test "satisfies_constraint_C16 (op)")))
+
+(define_predicate "mem_noofs_operand"
+ (and (match_code "mem")
+ (match_code "reg" "0")))