public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] [ARC] atomics: Add operand to DMB instruction
@ 2019-01-18 17:22 Vineet Gupta
  2019-01-20 16:20 ` Claudiu Zissulescu
  0 siblings, 1 reply; 3+ messages in thread
From: Vineet Gupta @ 2019-01-18 17:22 UTC (permalink / raw)
  To: gcc-patches; +Cc: Claudiu Zissulescu, andrew.burgess, Vineet Gupta

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-01-18  Vineet Gupta <vgupta@synopsys.com>

       * config/arc/atomic.md: Add operand to DMB instruction

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 gcc/ChangeLog            | 4 ++++
 gcc/config/arc/atomic.md | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 13890776cc08..09051b816cae 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2019-01-18  Vineet Gupta <vgupta@synopsys.com>
+
+	* config/arc/atomic.md: Add operand to DMB instruction
+
 2019-01-18  Richard Biener  <rguenther@suse.de>
 
 	PR tree-optimization/88903
diff --git a/gcc/config/arc/atomic.md b/gcc/config/arc/atomic.md
index 562c79a6578e..fe767dfedd5c 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
       {
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] [ARC] atomics: Add operand to DMB instruction
  2019-01-18 17:22 [PATCH] [ARC] atomics: Add operand to DMB instruction Vineet Gupta
@ 2019-01-20 16:20 ` Claudiu Zissulescu
  2019-01-28 23:58   ` Vineet Gupta
  0 siblings, 1 reply; 3+ messages in thread
From: Claudiu Zissulescu @ 2019-01-20 16:20 UTC (permalink / raw)
  To: Vineet Gupta, gcc-patches; +Cc: andrew.burgess

Hi,
> 
> 2019-01-18  Vineet Gupta <vgupta@synopsys.com>
> 
>        * config/arc/atomic.md: Add operand to DMB instruction
> 

This is ok. I'll push it asap,
Claudiu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [ARC] atomics: Add operand to DMB instruction
  2019-01-20 16:20 ` Claudiu Zissulescu
@ 2019-01-28 23:58   ` Vineet Gupta
  0 siblings, 0 replies; 3+ messages in thread
From: Vineet Gupta @ 2019-01-28 23:58 UTC (permalink / raw)
  To: Claudiu Zissulescu, gcc-patches; +Cc: andrew.burgess

On 1/20/19 8:19 AM, Claudiu Zissulescu wrote:
> Hi,
>> 2019-01-18  Vineet Gupta <vgupta@synopsys.com>
>>
>>        * config/arc/atomic.md: Add operand to DMB instruction
>>
> This is ok. I'll push it asap,
> Claudiu

Thx, I see it merged into mainline. Can you please backport this to gcc-8-branch
as well ?

Thx,
-Vineet

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-28 23:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18 17:22 [PATCH] [ARC] atomics: Add operand to DMB instruction Vineet Gupta
2019-01-20 16:20 ` Claudiu Zissulescu
2019-01-28 23:58   ` Vineet Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).