Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3032599ybe; Sun, 8 Sep 2019 05:50:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjAw9ljOpkFBxoTRI5DeMPFd/cHUC+r/I40XwcfaqliVIuLdQTFYtY38/rEHt+vFApjcRT X-Received: by 2002:a05:6402:1e2:: with SMTP id i2mr19706550edy.56.1567947037399; Sun, 08 Sep 2019 05:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567947037; cv=none; d=google.com; s=arc-20160816; b=mamKhsV8p9PiSFGHJ1eq8srHKL53e0KSOEW1QKrq+3abj93HRsPO7rdpdvUkFtpKI1 5Jt4MiQyXkpnconDybyGI4opoHuLG+MTkJm63PYdYDeWeZpkm0iw2LUAhj0qgwwJq+Ji Lk9BHTEI5ZL+WYXsm/MsYFwuW3sgIEEjkgvghgSELDzmSqoZ5m1+C7GkVvBm+lSvq/7q +saan2JYmpoAK7+Wyb03JEWeUBxwTFoTtYXkvoMvO4jr7Aqq333UjJA4uyietcp5PTZn 4ZycWW+WyKiX5fayNDI2n50bSKu27qzCaVAs/r+A38u16ujq45gP6EdiM4x2lOOTDam2 2dxw== 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=VDVItFcZYmSAFSNcPzCVhOcFaSVm0GeVRzE/xezhOGg=; b=uRlVPi6biZeJiq7zjYEZ8rSdkBCJ1LgYmuQUQloRESYPnuf/BYRPf54/RI0C14WKSR lN/9PLFA3ZDBV+YFqhV62+AhJcQs23kVVmsPLdxPbYZHXLxuGefR1oyI+n2UwSsYukcL 6U6R+P0RxQ7iKEmEB4yHV/vmalzcL2mvwipPEgAFj8Yi9NBDCK8gRgrGDq4Gmy+/YwUS 2bkdAkZ6rTBBGSD5DVZ7lwMnIBpQmGmtneS2uqlysfVXIpHLlTcvJJYB8bZtW2Rst81k nnXjnEBn9Usvy1TsF1dDqAY1+iUDts1b4teJgccu6idgVnJ2/MMrS1kGyUAd7XN3cYwY J2BQ== 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 c17si5829975ejm.334.2019.09.08.05.50.13; Sun, 08 Sep 2019 05:50:37 -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 S2406719AbfIGNLr (ORCPT + 99 others); Sat, 7 Sep 2019 09:11:47 -0400 Received: from gate.crashing.org ([63.228.1.57]:53617 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406704AbfIGNLr (ORCPT ); Sat, 7 Sep 2019 09:11:47 -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 x87DBShZ025586; Sat, 7 Sep 2019 08:11:29 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x87DBR20025585; Sat, 7 Sep 2019 08:11:27 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Sat, 7 Sep 2019 08:11:27 -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: <20190907131127.GH9749@gate.crashing.org> References: <20190906163028.GC9749@gate.crashing.org> <20190906163918.GJ2120@tucnak> <20190906220347.GD9749@gate.crashing.org> <20190906225606.GF9749@gate.crashing.org> <20190907001411.GG9749@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 06:04:54PM -0700, Nick Desaulniers wrote: > 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? I wouldn't. Please stop using that straw man. I'm not saying version checks are good, or useful for most things. I am saying they are not. Predefined compiler symbols to do version checking (of a feature) is just a lesser instance of the same problem though. (And it causes its own more or less obvious problems as well). > > > 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. I keep track of most things just fine... But the release notes are part of our web content, which is in a separate CVS repository (still nicer than SVN :-) ), and since I don't use it very often it falls outside of all my normal procedures. > 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`. ;) That started as just + /* If this asm is asm inline, count anything as minimum size. */ + if (gimple_asm_inline_p (as_a (stmt))) + count = MIN (1, count); (in estimate_num_insns) but then things ballooned. Like such things do. Segher