[ARC] atomics: Add operand to DMB instruction
authorVineet Gupta <vgupta@synopsys.com>
Wed, 23 Jan 2019 11:04:19 +0000 (11:04 +0000)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Wed, 23 Jan 2019 11:04:19 +0000 (12:04 +0100)
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

gcc/ChangeLog
gcc/config/arc/atomic.md

index 4a83a8aca4c4782c11bc12b3b37754c4562fbdec..f1522bec61424d57ae11e682425472c8c6498f8e 100644 (file)
@@ -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
index 562c79a6578e08d8f3e6c8a5d24a9924303dc81c..fe767dfedd5cea133ab5597d6b301d6436da8c20 100644 (file)
@@ -44,7 +44,7 @@
   {
    if (TARGET_HS)
       {
-       return "dmb";
+       return "dmb\\t3";
       }
     else
       {