From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752331AbcFVRtw (ORCPT ); Wed, 22 Jun 2016 13:49:52 -0400 Received: from terminus.zytor.com ([198.137.202.10]:36872 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415AbcFVRtu (ORCPT ); Wed, 22 Jun 2016 13:49:50 -0400 Subject: Re: cmpxchg and x86 flags output To: Linus Torvalds 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> <8455f920-3fea-a20b-1ac1-857870c80338@zytor.com> Cc: David Howells , Peter Zijlstra , Linux Kernel Mailing List , linux-arch , Ingo Molnar , Thomas Gleixner From: "H. Peter Anvin" Message-ID: Date: Wed, 22 Jun 2016 10:49:06 -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: 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 10:11, Linus Torvalds wrote: > > I thought Richard Henderson already had a patch for the condition code > asm outputs, but maybe I misremember. > It is already in the released version of gcc 6.1; there is a patchset in -tip already for using it for everything other than cmpxchg using the CC_SET/CC_OUT macros I proposed a while ago. cmpxchg is special because it requires API changes to take advantage of, which as far as I understand happens to be exactly the API changes that David has already implemented. Apparently some other architectures really can benefit from intrinsics, so that is okay; we can use inline asm with flags output on x86. -hpa