aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2019-01-23 11:04:19 +0000
committerClaudiu Zissulescu <claziss@gcc.gnu.org>2019-01-23 12:04:19 +0100
commitb3e5901b625df90e3618b2e5a06cccc36cd84b6a (patch)
tree76b5ee0771dae452216e9af6b4a27080b182af63 /gcc
parent3f5d2012fb0ba2306b8f0799b50ccee6dc3762fc (diff)
downloadgcc-b3e5901b625df90e3618b2e5a06cccc36cd84b6a.zip
gcc-b3e5901b625df90e3618b2e5a06cccc36cd84b6a.tar.gz
gcc-b3e5901b625df90e3618b2e5a06cccc36cd84b6a.tar.bz2
[ARC] atomics: Add operand to DMB instruction
Atomics use DMB instruction to enforce ordering of loads/stores. Currently gcc generates DMB w/o any arg which is a no-op. Fix that by generating DMB 3 which enforces R+W ordering. It is stricter than what acq/rel expect, but there's no other way. gcc/ 2019-xx-xx Vineet Gupta <vgupta@synopsys.com> * config/arc/atomic.md: Add operand to DMB instruction From-SVN: r268181
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/arc/atomic.md2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4a83a8a..f1522be 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2019-01-23 Vineet Gupta <vgupta@synopsys.com>
+
+ * config/arc/atomic.md: Add operand to DMB instruction.
+
2019-01-23 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/88964
diff --git a/gcc/config/arc/atomic.md b/gcc/config/arc/atomic.md
index 562c79a..fe767df 100644
--- a/gcc/config/arc/atomic.md
+++ b/gcc/config/arc/atomic.md
@@ -44,7 +44,7 @@
{
if (TARGET_HS)
{
- return "dmb";
+ return "dmb\\t3";
}
else
{