From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751842AbcFVQho (ORCPT ); Wed, 22 Jun 2016 12:37:44 -0400 Received: from terminus.zytor.com ([198.137.202.10]:35312 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750880AbcFVQhm (ORCPT ); Wed, 22 Jun 2016 12:37:42 -0400 Subject: Re: cmpxchg and x86 flags output To: David Howells References: <5e5b99d7-c739-9743-b3e0-fbe0636d6dee@zytor.com> <40fd5f74-190e-b805-fbaa-f84899190fbc@zytor.com> <20160615085002.GC30935@twins.programming.kicks-ass.net> <4467.1466499980@warthog.procyon.org.uk> <16238.1466611894@warthog.procyon.org.uk> Cc: Peter Zijlstra , Linux Kernel Mailing List , linux-arch , Linus Torvalds , Ingo Molnar , Thomas Gleixner From: "H. Peter Anvin" Message-ID: <8455f920-3fea-a20b-1ac1-857870c80338@zytor.com> Date: Wed, 22 Jun 2016 09:36:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <16238.1466611894@warthog.procyon.org.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/22/16 09:11, David Howells wrote: > H. Peter Anvin wrote: > >> The question for me is for things like lock patching that we do on x86... > > This might be pertinent to what you're asking: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70973 > I am kind of hesitant to put knowledge of this into gcc, because it freezes something that currently is not gcc-dependent (although we could separate out the gcc-generated and non-gcc-generated bits if we really care.) With the gcc flags output we can do this with assembly code as well today (on x86), so it is unclear if we have any compelling reason to need intrinsics that we won't be able to rely on existing for a long time (the difference between gcc versions that have flags support and don't have it has already been abstracted out in the x86/asm branch of the tip tree, so we don't need two versions.) -hpa