Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3388365imm; Mon, 8 Oct 2018 03:13:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Kww9DsmGSNBmiYd4LuOoafBwREalPG5jc15mDpXM2QxDvzraE2Hv+JkRJz+wAADkuiCHy X-Received: by 2002:a62:302:: with SMTP id 2-v6mr23844009pfd.145.1538993636482; Mon, 08 Oct 2018 03:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538993636; cv=none; d=google.com; s=arc-20160816; b=tmDo0tg/RxPl3ZqLsWAfEnd83HpEkSjBC/SlYS9+rDbd7dvyBiUqb5Cegwzsqc5lWj 7PM8xBjZJeEMICNdV8xkO12pXpcyHgRUg8xblvEA/PdHwSa49dnKqUztezT23QW/Glal 49oGIYrr3jT6gjPPHaUKRoABvjyer+Jk3pF4/5RWsLtuaVsAHqyZoWcKsDED8RW/Kcf+ l1tH9eGL57CfFwdiBAiaXeyZ0GBSdddWRIfWhCimAbwfMoGr8OpWwahF1QHhCkx2ZvuZ eAL+gPmiDLBpLUm8MBvS2s6aUPbUOX9NeLgXAIdCrUMGxXS7zjfAfeYckFRIdkxH59ki lX5w== 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=gbLuiu7LHr6HL3hM4yf63seb3UDpa6Ey439kl+nhz54=; b=axG9zxfHfyAc6MjfGIWrhlJa2NfdPhFJ1AIg82eMfuU8biXfrE+d2y55j3zYQyQp3q y5bjCBrMPa7cDOpxddWcRg8+zYL1YMb2IfbYQZLbUpB0lDy61iUhvRxRbmwqJ6KOm6ts iR76F7282omPFfGi5AkEOU9y8d820PFwaNFr8UWywu3WlmxSW2nr9Kxk5qVxgtaP8wtA 7KG7bs8hGg2fbvuy+qlBrktKem8NaRSHXSyJScfGFpbVAM+HhHS17mtEh/ZTFW1RS6c/ 9vYPF2jxsH00kdQrcGTB/dRZkAPqTJOqKn6W3p62oR62v3oVybxOidORHTGmmIPLniwx 5c4w== 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 g12-v6si9341655pfi.184.2018.10.08.03.13.41; Mon, 08 Oct 2018 03:13:56 -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 S1727082AbeJHRY1 (ORCPT + 99 others); Mon, 8 Oct 2018 13:24:27 -0400 Received: from gate.crashing.org ([63.228.1.57]:38326 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbeJHRY1 (ORCPT ); Mon, 8 Oct 2018 13:24:27 -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 w987r6FO003565; Mon, 8 Oct 2018 02:53:06 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id w987r101003504; Mon, 8 Oct 2018 02:53:01 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 8 Oct 2018 02:53:00 -0500 From: Segher Boessenkool To: Ingo Molnar Cc: Borislav Petkov , gcc@gcc.gnu.org, Richard Biener , Michael Matz , Nadav Amit , Ingo Molnar , linux-kernel@vger.kernel.org, x86@kernel.org, Masahiro Yamada , Sam Ravnborg , Alok Kataria , Christopher Li , Greg Kroah-Hartman , "H. Peter Anvin" , Jan Beulich , Josh Poimboeuf , Juergen Gross , Kate Stewart , Kees Cook , linux-sparse@vger.kernel.org, Peter Zijlstra , Philippe Ombredanne , Thomas Gleixner , virtualization@lists.linux-foundation.org, Linus Torvalds , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org Subject: Re: PROPOSAL: Extend inline asm syntax with size spec Message-ID: <20181008075300.GN29268@gate.crashing.org> References: <20181003213100.189959-1-namit@vmware.com> <20181007091805.GA30687@zn.tnic> <20181007132228.GJ29268@gate.crashing.org> <20181007141349.GD30687@zn.tnic> <20181007151427.GK29268@gate.crashing.org> <20181008055838.GA66819@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181008055838.GA66819@gmail.com> 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 Mon, Oct 08, 2018 at 07:58:38AM +0200, Ingo Molnar wrote: > * Segher Boessenkool wrote: > > > > More precise *size* estimates, yes. And if the user lies he should not > > > > be surprised to get assembler errors, etc. > > > > > > Yes. > > > > > > Another option would be if gcc parses the inline asm directly and > > > does a more precise size estimation. Which is a lot more involved and > > > complicated solution so I guess we wanna look at the simpler ones first. > > > > > > :-) > > > > Which is *impossible* to do. Inline assembler is free-form text. > > "Impossible" is false: only under GCC's model and semantics of inline > asm that is, and only under the (false) assumption that the semantics > of the asm statement (which is a GCC extension to begin with) cannot > be changed like it has been changed multiple times in the past. > > "Difficult", "not worth our while", perhaps. If we throw out our current definition of inline assembler, and of the internal backend interfaces, then sure you can do it. This of course invalidates all code that uses GCC inline assembler, and all GCC backends (both in-tree and out-of-tree, both current and historical). If other compilers think everyone should rewrite all of their code because those compiler do inline asm wro^H^H^Hdifferently, that is their problem; GCC should not deny all history and screw over all its users. Segher