Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1036312ybe; Thu, 5 Sep 2019 09:21:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUmSOIrZiVWfnW6opi2lQb7x9rCzkypGKm83n5hQS8HKqkXzpzhkX6+pYxLs4NgblqHONP X-Received: by 2002:a63:7a01:: with SMTP id v1mr4061046pgc.310.1567700481690; Thu, 05 Sep 2019 09:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567700481; cv=none; d=google.com; s=arc-20160816; b=azo9DVdY+fhMRbPun5RJJMALBxuA4x185gm6C7ER+K9BZnMYehVjmQqmyH8FtLpdzE /LxxYci9Ekw5hU7Se2ZLKUHSEz5IYNCEvL95BVU431BBxB09S9C2V9V8DM48oboR40iR uj1418ehH1f+sn3OwouYB5z96e857m8fpXhJtwzV4kAbEYaqgkYlUwKU2cMiOoc2DtBE Eq0qkihF+F+PE0Jd78MJwUayhQ69xGL5GbJMnxiNXZdHwhy9SNM/yPvmoH4d8jQoJ9h0 yeC63Ei8xvEUL4rjpmJZNakyBdUgIA21DrYEuUbtyC1WgogND1VYcujkmdHPLAIIfsTX h4+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=LPztoN3Fg0/PfSpfw7cEnAqEPRh799k2jxpgxiRRCHA=; b=zZTiKky110s3KA4904UE2BlZ/hXlhykZbsU6FrYDnvf7Uxch+j8+qM9SwzCW1KEumQ PMg0oT4qpSqEQF0OWOyjGW/j4iZ36vuVL6H3nA+kX86hQZETJNJTuFrnA3Ts1WZdnEhp XkSVpaklUN/+KKOKXxed/u2lmeuEtCvK2ZD8xVvgKZj7LixuYnprEFZkgexeTiognasa LpUx1Xm7P8PG2CkVADEUfXjZFBlA6QuFYwh7IXfpYbMJuovdWey4v98k4+YF1cJZYrNq R9VbSbY1i59YdXuZTOc3VAjncM5QLV71x7Df6M9NC2aLHQ3BKLW6BoehgsymSnDRkaHr g+Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b="G/YNik1G"; 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 s10si2372654plr.43.2019.09.05.09.21.05; Thu, 05 Sep 2019 09:21:21 -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; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b="G/YNik1G"; 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 S2388463AbfIEOXQ (ORCPT + 99 others); Thu, 5 Sep 2019 10:23:16 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:42175 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725290AbfIEOXP (ORCPT ); Thu, 5 Sep 2019 10:23:15 -0400 Received: by mail-lj1-f193.google.com with SMTP id y23so2683293lje.9 for ; Thu, 05 Sep 2019 07:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LPztoN3Fg0/PfSpfw7cEnAqEPRh799k2jxpgxiRRCHA=; b=G/YNik1GclJrN7gztCf7hQqyrJqZWIjZGJzI03IDYHeBt1xOf4ipze7k1Cshr1Wrbn i2jTsLWNR+WfE14XyajTmah+0LaTGevGCdBRh1VVcnQY8X8Om7LI4DNAeU8gEc1W5pfy X+5+w1m6czJiMAsp+UuN9nmL2XtOz2M0wMqro= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LPztoN3Fg0/PfSpfw7cEnAqEPRh799k2jxpgxiRRCHA=; b=NCqsUtErCWVIqzKXvHy3Myu1ja+sIfyk9WYTovoq3X2WqF/s0hlVG3rzCHYOplVzLG wwlfcwbK2nuXO9TZYjbu+g33NJjOHwtPyoSHudTkhjQRDLay7vk6+z7SvLe2qavgi16Y LjFR3PGCusz7Aw5OpPocOMSM3EdWI/Nbf/En2E9huw/VGFbNg8fvmczp639ksRGLZEqN OZTxk+13b066VGiy5lmjTrzExIZwrUxPp8QXCb6a/Qan4cPHCOahbn+r5UP1E3f3E1rn W0BwgxgkKzIeBKedo11gjLMNgDDYBCxidBQ1MiU/YYEDUMRUKbNWcor3fViR7toe6LBl hqoQ== X-Gm-Message-State: APjAAAW4KKwsb+zOhfEBoe3fSf6Yit+67ytXjs9LdIe9V6WpeiG1ox6y azJ/oypu8PWIcj0uBD6nTnLNNcrHOpzIvA+0FJU= X-Received: by 2002:a2e:93d7:: with SMTP id p23mr2363500ljh.100.1567693393910; Thu, 05 Sep 2019 07:23:13 -0700 (PDT) Received: from [172.16.11.28] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id u26sm462173lfd.19.2019.09.05.07.23.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Sep 2019 07:23:12 -0700 (PDT) Subject: Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition To: Segher Boessenkool Cc: Nick Desaulniers , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , LKML , Miguel Ojeda , "gcc-patches@gcc.gnu.org" References: <20190829083233.24162-1-linux@rasmusvillemoes.dk> <20190830231527.22304-1-linux@rasmusvillemoes.dk> <20190830231527.22304-5-linux@rasmusvillemoes.dk> <20190905134535.GP9749@gate.crashing.org> From: Rasmus Villemoes Message-ID: Date: Thu, 5 Sep 2019 16:23:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190905134535.GP9749@gate.crashing.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/09/2019 15.45, Segher Boessenkool wrote: > Hi Rasmus, > > On Thu, Sep 05, 2019 at 01:07:11PM +0200, Rasmus Villemoes wrote: >> On 05/09/2019 02.18, Nick Desaulniers wrote: >>> Is it too late to ask for a feature test macro? Maybe one already >>> exists? >> >> No, not as far as I know. > > [ That's not what a feature test macro is; a feature test macro allows the > user to select some optional behaviour. Things like _GNU_SOURCE. ] > >> Perhaps something like below, though that >> won't affect the already released gcc 9.1 and 9.2, of course. > > That is one reason to not want such a predefined macro. Another reason > is that you usually need to compile some test programs *anyway*, to see if > some bug is present for example, or to see if the exact implementation of > the feature is beneficial (or harmful) to your program in some way. OK, I think I'll just use a version check for now, and then switch to a Kconfig test if and when clang grows support. >> gcc maintainers, WDYT? Can we add a feature test macro for asm inline()? > > > Why would GCC want to have macros for all features it has? Well, gcc has implemented __has_attribute() which is similar - one could detect support by compiling a trivial test program. Or the same could be said for many of the predefined macros that are conditionally defined, e.g. __HAVE_SPECULATION_SAFE_VALUE. But I was just throwing the question into the air, I won't pursue this further. Thanks, Rasmus