From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18629 invoked by alias); 14 Jan 2013 22:05:57 -0000 Received: (qmail 18552 invoked by uid 48); 14 Jan 2013 22:05:40 -0000 From: "andi-gcc at firstfloor dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/55966] __atomic_fetch_* generate wrong code for HLE Date: Mon, 14 Jan 2013 22:05: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: andi-gcc at firstfloor dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2013-01/txt/msg01250.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55966 --- Comment #6 from Andi Kleen 2013-01-14 22:05:38 UTC --- Hmm that's true. x86 doesn't have xand, x_or, x_xor, only xadd Maybe cmpxchg is the only way? For some special cases it can be done (like and single bit-> btr, or single bit -> btr), but it's probably complicated to implement. In this case I would prefer to forbid those for HLE. I guess more arguments for the target hook. Other ideas?