public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marcus.shawcroft at arm dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/48126] arm_output_sync_loop: misplaced memory barrier, missing clrex / dummy strex
Date: Thu, 17 Mar 2011 16:17:00 -0000	[thread overview]
Message-ID: <bug-48126-4-d5GBndCf6O@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48126-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48126

Marcus Shawcroft <marcus.shawcroft at arm dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marcus.shawcroft at arm dot
                   |                            |com

--- Comment #1 from Marcus Shawcroft <marcus.shawcroft at arm dot com> 2011-03-17 16:14:36 UTC ---
The code sequence in question looks like this:
    dmb     sy
1:
    ldrex   r0, ...
    cmp     r0, r1
    bne     2f
    strex   r4, r2, ..
    teq     r4, #0 
    bne     1b
    dmb     sy
2:

The ARM Architecture reference manual (section 3.4.5) requires that
there are no explicit memory references between the LDREX and the
STREX, this requirement does not extended to speculative loads in
branch shadows.

An LDREX without a following STREX is explicilty permitted by the
reference manual (section 3.4.5).

The CLREX instruction is provided for use by context switch code in
order to prevent a false positive STREX following a context switch
(section 3.4.4). The inclusion of a CLREX instruction in the above
fragment is not required by the ARM architecture reference manual.


  reply	other threads:[~2011-03-17 16:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14 23:12 [Bug target/48126] New: " m.k.edwards at gmail dot com
2011-03-17 16:17 ` marcus.shawcroft at arm dot com [this message]
2011-03-17 18:38 ` [Bug target/48126] " m.k.edwards at gmail dot com
2011-05-24 14:46 ` marcus.shawcroft at arm dot com
2011-05-24 17:05 ` m.k.edwards at gmail dot com
2011-06-22 16:40 ` david.gilbert at linaro dot org
2011-06-22 19:01 ` m.k.edwards at gmail dot com
2011-06-23  9:33 ` marcus.shawcroft at arm dot com
2011-06-24 11:29 ` m.k.edwards at gmail dot com
2011-06-24 13:57 ` ramana at gcc dot gnu.org
2011-10-14 14:40 ` [Bug target/48126] arm_output_sync_loop: misplaced memory barrier rsandifo at gcc dot gnu.org
2011-10-14 14:46 ` rsandifo at gcc dot gnu.org
2012-06-08  6:59 ` jye2 at gcc dot gnu.org
2012-06-19  3:01 ` jye2 at gcc dot gnu.org

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=bug-48126-4-d5GBndCf6O@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).