From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78864 invoked by alias); 21 Apr 2015 18:51:28 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 78795 invoked by uid 48); 21 Apr 2015 18:51:24 -0000 From: "rth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65697] __atomic memory barriers not strong enough for __sync builtins Date: Tue, 21 Apr 2015 18:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mwahab at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg01756.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697 --- Comment #42 from Richard Henderson --- (In reply to Andrew Macleod from comment #39) > no, __sync was simply an implementation of psABI back when it was new... I'm > not aware of any additions, enhancements or guarantees that were added when > it was ported to other arch's. > > Terminology was much looser 14 years ago :-) That's one of the reasons we > want to migrate to __atomic... it is supposedly more precisely defined, > whereas __sync had some hand-waving. We're now experiencing some different > interpretations of that. Regardless of the documentation, we didn't think > we'd be supporting something stronger than SEQ_CST since they were suppose > to be equivalent... Exactly right. I don't believe there's anywhere we can look for more definitive semantics than the psABI. And as already explored here, that's not entirely helpful.