From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833AbbEDU5X (ORCPT ); Mon, 4 May 2015 16:57:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51631 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932AbbEDU5R (ORCPT ); Mon, 4 May 2015 16:57:17 -0400 Message-ID: <5547DD29.2020805@redhat.com> Date: Mon, 04 May 2015 13:57:13 -0700 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Linus Torvalds CC: "H. Peter Anvin" , Peter Zijlstra , Vladimir Makarov , Jakub Jelinek , Ingo Molnar , Thomas Gleixner , Linux Kernel Mailing List , Borislav Petkov , "gcc@gcc.gnu.org" Subject: Re: [RFC] Design for flag bit outputs from asms References: <20150501151630.GH5029@twins.programming.kicks-ass.net> <20150501163329.GU1751@tucnak.redhat.com> <5543CDC0.6010206@redhat.com> <20150502123958.GK5029@twins.programming.kicks-ass.net> <5547C992.9000703@redhat.com> <5547D30B.2020507@zytor.com> <5547D7A3.2010203@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/04/2015 01:45 PM, Linus Torvalds wrote: > On Mon, May 4, 2015 at 1:33 PM, Richard Henderson wrote: >> >> A fair point. Though honestly, I was hoping that this feature would mostly be >> used for conditions that are "weird" -- that is, not normally describable by >> arithmetic at all. Otherwise, why are you using inline asm for it? > > I could easily imagine using some of the combinations for atomic operations. > > For example, doing a "lock decl", and wanting to see if the result is > negative or zero. Sure, it would be possible to set *two* booleans (ZF > and SF), but there's a contiional for "BE".. Sure. I'd be more inclined to support these compound conditionals directly, rather than try to get the compiler to recognize them after the fact. Indeed, I believe we have a near complete set of them in the x86 backend already. It'd just be a matter of selecting the spellings for the constraints. r~