public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "torvald at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/67281] HTM builtins aren't treated as compiler barriers on powerpc
Date: Sun, 23 Aug 2015 12:27:00 -0000	[thread overview]
Message-ID: <bug-67281-4-2xDOLeQyEE@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-67281-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67281

torvald at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |torvald at gcc dot gnu.org

--- Comment #6 from torvald at gcc dot gnu.org ---
I think tbegin needs to have same semantics as a lock acquisition and the
compiler must not assume to know anything about tbegin's return value; tend
must have same semantics as a lock release.

See the libc-alpha discussion for why I think this is the case:
https://sourceware.org/ml/libc-alpha/2015-08/msg00963.html

Thus, I don't think a full compiler barrier is necessary, but if we don't have
something finer-grained to capture the semantics of a lock acquisition, then we
need the compiler barrier (GCC currently assumes atomics to be compiler
barriers AFAIK).  We should in any case agree on a semantics and document it in
the GCC sources.  Documenting that we need a full compiler barrier is not
correct in that it's not a necessary condition (even though it should be a
sufficient condition).


  parent reply	other threads:[~2015-08-23 12:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 17:22 [Bug target/67281] New: " tuliom at linux dot vnet.ibm.com
2015-08-19 17:52 ` [Bug target/67281] " pinskia at gcc dot gnu.org
2015-08-19 18:43 ` tuliom at linux dot vnet.ibm.com
2015-08-19 18:51 ` pinskia at gcc dot gnu.org
2015-08-19 19:07 ` tuliom at linux dot vnet.ibm.com
2015-08-23 12:27 ` torvald at gcc dot gnu.org [this message]
2015-10-15 16:39 ` bergner at gcc dot gnu.org
2015-10-15 16:40 ` bergner at gcc dot gnu.org
2015-10-15 16:44 ` bergner 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-67281-4-2xDOLeQyEE@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).