Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2909895ybe; Sun, 8 Sep 2019 03:19:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnGOc70TG0nJTf7ZZEIiQ4hf1fR6vpk0ArW4TebJJ47G+ufp8w8HLk+6AEaDG+tWJ8V0oH X-Received: by 2002:a62:8204:: with SMTP id w4mr21478151pfd.30.1567937990869; Sun, 08 Sep 2019 03:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567937990; cv=none; d=google.com; s=arc-20160816; b=svJmraL+OpPXp7dF9vIR4SEgu1q6IG+MN8rBMDxgaDnTCwCk4UJwLxcmEXzHgXzmDX YlPo2rPNufQ1+wnZnOSamIEipj2KdE4BgfTs/5q9NV6Mna40pquDEW4N8eOQRNw3h7ey xSnIPbyCSm0SdLD7qm24NS5QTkpTdzhAWd9HfNdFAYwWaaI5WqNAfdqzD+yWVQNWuue7 bkuhoO0EIbQf8g+gz/vTexw57mqDhSUhOFW8qMgR1pGLbkIDxb04Jj9Pkb+HzlPRLIaH EHCuGUVmaJAoYYckqC8nUP6zxPqyMJw9rtS6gEqjijkQAsDmvdq9BAfWI554oC4sa2gY 1ZvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xqepLaTSTfQY83HVDfCAAUaqMIJ3Bo3dybU2p4C5Hp4=; b=eib7vsft40rNpQnxAaOrheZquxDZtnHXkQ0sNnVucHMT8AsHCNVMdCX7gqnzl3bgXo X0fm61k+0UwG82C64lHY3wXjH3icw5LR1IU1lhg9FDxMYGVxCI78xWhWfElHp44z+axi p6BqV6oRF04hyFKBgk9AcADaHrbRkyJeC1eqiaUc34B5Sq9h0s4xzVwTm65qT+TVQy19 4eDwxkbB/zbLvQiv/kVz6prrkHm1cVEFpR18A3touPuHQ3irC4nsOUGis96PzAaXHoDN IllXuPUuMZ5fOkyDj8Xhg/KdA3pOBkFBjq11o48HG+Us2YRWPRTZGGC3AiOcgHdvBz2b oA6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oWfEuh3B; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si9552642pgq.527.2019.09.08.03.19.36; Sun, 08 Sep 2019 03:19:50 -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=@google.com header.s=20161025 header.b=oWfEuh3B; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393707AbfIGBFI (ORCPT + 99 others); Fri, 6 Sep 2019 21:05:08 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:37581 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726627AbfIGBFI (ORCPT ); Fri, 6 Sep 2019 21:05:08 -0400 Received: by mail-pf1-f193.google.com with SMTP id y5so2948168pfo.4 for ; Fri, 06 Sep 2019 18:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xqepLaTSTfQY83HVDfCAAUaqMIJ3Bo3dybU2p4C5Hp4=; b=oWfEuh3BjFLuGBzvrm8GMxwk5xuOl02jnw707fpvcMBuA1Ao4YT0q739mNaVz/6wo4 Ahb07EbEdF6SeKJLRI2h6BXlcoGCH/ikg7kAaO+Hnlj7fqtN7++QdkwO9ZIgK+wiz8Cd Dz7z6VAC/rA0S0ZDMC5BraPexgtvJuBXZgaGunBxJ/Kfmv6gXWYLeksWCfcmZB63vF/j VpZw8PqV+TtpM0EQ8lNi9wll2pCU/W/pfGjEB2FljdwSIdaatV3c9+gLH417KxdW1kOj 217fUPm7g1HviMjqxGKwyKgDdxBCJjfkSi2s0LavVh0qtYsaSSaAgKfE8Cw8hg7Oc1d/ rJHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xqepLaTSTfQY83HVDfCAAUaqMIJ3Bo3dybU2p4C5Hp4=; b=gAq4UzaMp+2ROpWUzoQXhIfPOBEww3W2It+uVF8+QDbGfbpO7cazSBxITYpZPiKvIM v1yWkszqEBGL2oIjG70Z6TX/X7urcnCy6oLGQSpnDQzcBtHRcDODcuLEjShgC/Z3pBNd uEhaqAz0WOtSbmhfUaV1c/33SZSyuGgCB9SmC9RKgsFHznn7jhNKPZexUjfebXcjutYj 3MJYTGLCl9PM1iJW3X96ChblQWg905wkQirOVZg3lFZgbAYbGYDtQa1Vf1pg6Im5CXM3 tDnep3a8CEk3FhZMHrUT8rgWoxWrp/cTRCoK2CXMvVfoEADAJ3O0ab0Kngqx79D6qlb+ bhqg== X-Gm-Message-State: APjAAAVRlXr+ZGpJ0KeHoe+/8fAFwtifVJMin1JtGz94OQZhXzqAbA72 FIjHzyqV+3CXAuNC7ou0KW5xSskN1mcLvJWMS7G3iw== X-Received: by 2002:a63:6193:: with SMTP id v141mr10638089pgb.263.1567818306938; Fri, 06 Sep 2019 18:05:06 -0700 (PDT) MIME-Version: 1.0 References: <20190906122349.GZ9749@gate.crashing.org> <20190906163028.GC9749@gate.crashing.org> <20190906163918.GJ2120@tucnak> <20190906220347.GD9749@gate.crashing.org> <20190906225606.GF9749@gate.crashing.org> <20190907001411.GG9749@gate.crashing.org> In-Reply-To: <20190907001411.GG9749@gate.crashing.org> From: Nick Desaulniers Date: Fri, 6 Sep 2019 18:04:54 -0700 Message-ID: Subject: Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition To: Segher Boessenkool Cc: Jakub Jelinek , Rasmus Villemoes , Miguel Ojeda , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , LKML , "gcc-patches@gcc.gnu.org" , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 6, 2019 at 5:14 PM Segher Boessenkool wrote: > > On Fri, Sep 06, 2019 at 04:42:58PM -0700, Nick Desaulniers via gcc-patches wrote: > > Just to prove my point about version checks being brittle, it looks > > like Rasmus' version check isn't even right. GCC supported `asm > > inline` back in the 8.3 release, not 9.1 as in this patch: > > Yes, I backported it so that it is available in 7.5, 8.3, and 9.1, so > that more users will have this available sooner. (7.5 has not been > released yet, but asm inline has been supported in GCC 7 since Jan 2 > this year). Ah, ok that makes sense. How would you even write a version check for that? Which looks better? #if __GNU_MAJOR__ > 9 || __GNU_MAJOR__ == 8 && __GNU_MINOR__ >= 3 || __GNU_MAJOR__ == 7 && __GNU_MINOR__ >= 5 || __CLANG_MAJOR__ == 42 // make use of `asm inline` #endif or #ifdef __CC_HAS_ASM_INLINE__ // make use of `asm inline` #endif > > > Or was it "broken" until 9.1? Lord knows, as `asm inline` wasn't in > > any release notes or bug reports I can find: > > https://gcc.gnu.org/ml/gcc-patches/2019-02/msg01143.html > > It never was accepted, and I dropped the ball. Ah, ok, that's fine, so documentation was at least written. Tracking when and where patches land (or don't) is difficult when patch files are emailed around. I try to keep track of when and where our kernel patches land, but I frequently drop the ball there. > > Segher, next time there's discussion about new C extensions for the > > kernel, can you please include me in the discussions? > > You can lurk on gcc-patches@ and/or gcc@? Please "interrupt" me when you're aware of such discussions, rather than me "polling" a mailing list. (I will buy you a tasty beverage of your preference). I'm already subscribed to more mailing lists than I have time to read. > But I'll try to remember, sure. > Not that I am involved in all such discussions myself, mind. But you _did_ implement `asm inline`. ;) -- Thanks, ~Nick Desaulniers