public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "samuel dot thibault at ens-lyon dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/36793] x86-64 does not get __sync_synchronize right
Date: Fri, 21 Nov 2008 11:18:00 -0000	[thread overview]
Message-ID: <20081121111644.3832.qmail@sourceware.org> (raw)
In-Reply-To: <bug-36793-6365@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]



------- Comment #1 from samuel dot thibault at ens-lyon dot org  2008-11-21 11:16 -------
Just to confirm the bug: the gcc doc says it follows the Intel itanium binary
interface. The Intel documentation says « Associated with each instrinsic are
certain memory barrier properties that restrict the movement of memory
references to visible data across the intrinsic operation (by either the
compiler or the processor). » Not including the mfence instruction would let
the processor move references across the instruction, so it is mandatory.  And
that is not only for x86_64, but also x86, on which you can use e.g. a locked
nop if you don't know the arch, or a mfence when using -march= (IIRC it
appeared with SSE2) 


-- 

samuel dot thibault at ens-lyon dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |samuel dot thibault at ens-
                   |                            |lyon dot org


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


  reply	other threads:[~2008-11-21 11:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-10 15:10 [Bug target/36793] New: " jfc at mit dot edu
2008-11-21 11:18 ` samuel dot thibault at ens-lyon dot org [this message]
2008-11-21 17:24 ` [Bug target/36793] " ubizjak at gmail dot com
2008-11-21 17:37 ` hjl dot tools at gmail dot com
2008-11-21 17:38 ` hjl dot tools at gmail dot com
2008-11-21 23:22 ` samuel dot thibault at ens-lyon dot org
2008-11-21 23:40 ` hjl dot tools at gmail dot com
2008-11-22 18:30 ` ubizjak at gmail dot com
2008-11-22 19:42 ` samuel dot thibault at ens-lyon dot org
2008-11-24 16:58 ` uros at gcc dot gnu dot org
2008-11-24 17:00 ` ubizjak at gmail dot com
2008-11-25  9:16 ` ubizjak at gmail dot com

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=20081121111644.3832.qmail@sourceware.org \
    --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).