Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2814349ybe; Sun, 8 Sep 2019 01:10:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNSSsrFsewKBuPNMqRynlsIkDeqe8sEK742XertP3XIaQBmA73vojlKr9xhWWjeTRyOpRs X-Received: by 2002:a63:2c8:: with SMTP id 191mr15847496pgc.139.1567930232726; Sun, 08 Sep 2019 01:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567930232; cv=none; d=google.com; s=arc-20160816; b=KYHFCRez7zXIqutwjP2ywlTdJuVotA+Tkad+c2zrfskUPR/ufe3HUp05Sg6ZbGyAMM 2ocPPDGKe+IcBkgZsH8MHKp89/49NB3t57r4tuiVQLpgrhovZk8gVWjvPEHhIisRLlyG HpXUV9q3OJCDTO5g3iedlHp0kwKmtMI5oPeoXcR1QHyDzfx0tfmwN1ItBJFxklEmhVjD D63VJNqefHKTN8OChVwaT0ys4T9pLoOLpL6YbGoKznYrngN6iY2ly5AB9blyn12PKyfw UbVZFRRVcVzObFz/waBPbdIKXps72AWff16Xeq7wpEUiQjNrsXsT8uZpTft8D+3y2hz5 wodw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=oEoIEpJE1CmfRy9elxBkOerhMuJqsODx+oY7bZXOIQk=; b=PvCqFe2her7xzrj11MlHKl0FcnD3ti6rt7I8L7kfNd6nMDzxkJbFDHNGWSrVSyPLZ/ 0XO3by3Y/p6nUYd+JCq0MgZOOA/B8JOdrN+xhkiKW9HLk/u+2tiZQqfTpDqAS9M4wD9r LDNOxYqb5t/z7x09udIRchNx5onMU+Fs+TnDwFNNrOzBzrkTSL2e+Xq3L7BT/8B3IkYG tjP/bzKCMMum0Be/oJ8u2Ag90CVOmUd5gwjNyNfTxQK2QyIQ7orqNYwQdla+Qyyv92dO yNV8ikgB/J0tggt4UBX44qa00rV2qiswhT/v/dEiDBfKEA2IWYEOIZLmXUgIutNjVh8P 0tmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si3626994pjn.54.2019.09.08.01.10.17; Sun, 08 Sep 2019 01:10:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392725AbfIFW40 (ORCPT + 99 others); Fri, 6 Sep 2019 18:56:26 -0400 Received: from gate.crashing.org ([63.228.1.57]:48209 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390953AbfIFW40 (ORCPT ); Fri, 6 Sep 2019 18:56:26 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x86Mu8lf026379; Fri, 6 Sep 2019 17:56:08 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x86Mu6LQ026376; Fri, 6 Sep 2019 17:56:06 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 6 Sep 2019 17:56:06 -0500 From: Segher Boessenkool To: Nick Desaulniers Cc: Jakub Jelinek , Rasmus Villemoes , Miguel Ojeda , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , LKML , "gcc-patches@gcc.gnu.org" , clang-built-linux Subject: Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition Message-ID: <20190906225606.GF9749@gate.crashing.org> References: <20190905134535.GP9749@gate.crashing.org> <20190906122349.GZ9749@gate.crashing.org> <20190906163028.GC9749@gate.crashing.org> <20190906163918.GJ2120@tucnak> <20190906220347.GD9749@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 06, 2019 at 03:35:02PM -0700, Nick Desaulniers wrote: > On Fri, Sep 6, 2019 at 3:03 PM Segher Boessenkool > wrote: > > And if instead you tested whether the actual feature you need works as > > you need it to, it would even work fine if there was a bug we fixed that > > breaks things for the kernel. Without needing a new compiler. > > That assumes a feature is broken out of the gate and is putting the > cart before the horse. If a feature is available, it should work. GCC currently has 91696 bug reports. > > Or as another example, if we added support for some other flags. (x86 > > has only a few flags; many other archs have many more, and in some cases > > newer hardware actually has more flags than older). > > I think compiler flags are orthogonal to GNU C extensions we're discussing here. No, I am talking exactly about what you brought up. The flags output for inline assembler, using the =@ syntax. If I had implemented that for Power when it first came up, I would by now have had to add support for another flag (the CA32 flag). Oh, and I would not have implemented support for OV or SO at all originally, but perhaps they are useful, so let's add that as well. And there is OV32 now as well. > > With the "macro" scheme we would need to add new macros in all these > > cases. And since those are target-specific macros, that quickly expands > > beyond reasonable bounds. > > I don't think so. Can you show me an example codebase that proves me wrong? No, of course not, because we aren't silly enough to implement something like that. > > If you want to know if you can do X in some environment, just try to do X. > > That's a very autoconf centric viewpoint. Why doesn't the kernel take > that approach for __GCC_ASM_FLAG_OUTPUTS__? Ask them, not me. Segher