public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <david.gilbert@linaro.org>
To: gcc-patches@gcc.gnu.org
Cc: ramana.radhakrishnan@linaro.org, rth@redhat.com,
	joseph@codesourcery.com, patches@linaro.org
Subject: [Patch 3/4] ARM 64 bit sync atomic operations [V2]
Date: Tue, 26 Jul 2011 09:23:00 -0000	[thread overview]
Message-ID: <20110726090156.GD6925@davesworkthinkpad> (raw)
In-Reply-To: <20110726090115.GC6925@davesworkthinkpad>

      Micahel K. Edwards points out in PR/48126 that the sync is in the wrong place
      relative to the branch target of the compare, since the load could float
      up beyond the ldrex.
    
        gcc/
    	* config/arm/arm.c (arm_output_sync_loop): Move label before barier,
    						   fixes PR/48126

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 28be078..cee3471 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -23780,8 +23780,11 @@ arm_output_sync_loop (emit_f emit,
 	}
     }
 
-  arm_process_output_memory_barrier (emit, NULL);
+  /* Note: label is before barrier so that in cmp failure case we still get
+     a barrier to stop subsequent loads floating upwards past the ldrex
+     pr/48126 */
   arm_output_asm_insn (emit, 1, operands, "%sLSYB%%=:", LOCAL_LABEL_PREFIX);
+  arm_process_output_memory_barrier (emit, NULL);
 }
 
 static rtx

  reply	other threads:[~2011-07-26  9:02 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01 15:53 [Patch 0/3] ARM 64 bit atomic operations Dr. David Alan Gilbert
2011-07-01 15:55 ` [Patch 1/3] " Dr. David Alan Gilbert
2011-07-12 21:24   ` Ramana Radhakrishnan
2011-07-13  9:18     ` David Gilbert
2011-07-01 15:56 ` [Patch 2/3] " Dr. David Alan Gilbert
2011-07-01 16:03   ` Richard Henderson
2011-07-01 17:08     ` David Gilbert
2011-07-01 19:38   ` Joseph S. Myers
2011-07-04 22:27     ` David Gilbert
2011-07-01 15:57 ` [Patch 3/3] " Dr. David Alan Gilbert
2011-07-12 15:31   ` Ramana Radhakrishnan
2011-07-12 12:55 ` [Patch 0/3] " Ramana Radhakrishnan
2011-07-26  9:14   ` [Patch 0/4] ARM 64 bit sync atomic operations [V2] Dr. David Alan Gilbert
2011-07-26  9:16     ` [Patch 1/4] " Dr. David Alan Gilbert
2011-07-26  9:18       ` [Patch 2/4] " Dr. David Alan Gilbert
2011-07-26  9:23         ` Dr. David Alan Gilbert [this message]
2011-07-26  9:24           ` [Patch 4/4] " Dr. David Alan Gilbert
2011-08-01 15:43             ` Ramana Radhakrishnan
2011-08-17 13:07           ` [Patch 3/4] " Ramana Radhakrishnan
2011-09-30 18:04         ` [Patch 2/4] " Ramana Radhakrishnan
2011-09-30 18:29           ` H.J. Lu
2011-10-03 13:22             ` David Gilbert
2011-09-30 20:51           ` Joseph S. Myers
2011-10-03  8:35             ` Andrew Haley
2011-10-03 14:04               ` David Gilbert
2011-10-03 15:56               ` Joseph S. Myers
2011-10-03 16:07                 ` Jakub Jelinek
2011-09-30 14:25       ` [Patch 1/4] " Ramana Radhakrishnan
2011-10-03 12:53         ` David Gilbert
2011-10-03 15:18           ` David Gilbert
2011-10-06 17:52             ` [Patch 0/5] ARM 64 bit sync atomic operations [V3] Dr. David Alan Gilbert
2011-10-06 17:53               ` [Patch 1/5] " Dr. David Alan Gilbert
2011-10-06 17:54                 ` [Patch 2/5] " Dr. David Alan Gilbert
2011-10-06 17:55                   ` [Patch 3/5] " Dr. David Alan Gilbert
2011-10-06 18:03                     ` [Patch 4/5] " Dr. David Alan Gilbert
2011-10-06 18:03                       ` [Patch 5/5] " Dr. David Alan Gilbert
2011-10-12  4:51                         ` Ramana Radhakrishnan
2011-10-12  5:06                         ` Mike Stump
2011-10-12  0:53                       ` [Patch 4/5] " Ramana Radhakrishnan
2011-10-12  2:35                     ` [Patch 3/5] " Ramana Radhakrishnan
2011-10-12  0:52                   ` [Patch 2/5] " Ramana Radhakrishnan
2011-10-12  1:45                   ` Ramana Radhakrishnan
2011-10-12  0:51                 ` [Patch 1/5] " Ramana Radhakrishnan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110726090156.GD6925@davesworkthinkpad \
    --to=david.gilbert@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=patches@linaro.org \
    --cc=ramana.radhakrishnan@linaro.org \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).