From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100599 invoked by alias); 19 Nov 2018 17:18:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 100589 invoked by uid 89); 19 Nov 2018 17:18:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Matz, matz X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Nov 2018 17:18:10 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id wAJHI3I8006699; Mon, 19 Nov 2018 11:18:04 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id wAJHHqjS006694; Mon, 19 Nov 2018 11:17:52 -0600 Date: Mon, 19 Nov 2018 17:18:00 -0000 From: Segher Boessenkool To: Michael Matz Cc: Alexander Monakov , Jakub Jelinek , Martin Sebor , Gcc Patch List Subject: Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000) Message-ID: <20181119171751.GV23873@gate.crashing.org> References: <20181114122250.GZ23873@gate.crashing.org> <20181114122726.GW11625@tucnak> <20181114135305.GB23873@gate.crashing.org> <20181114174723.GD23873@gate.crashing.org> <20181116221152.GK23873@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 X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg01647.txt.bz2 On Mon, Nov 19, 2018 at 12:59:29PM +0000, Michael Matz wrote: > Hi, > > On Fri, 16 Nov 2018, Segher Boessenkool wrote: > > > > I.e. like volatile they can arbitrarily change their value. I don't > > > know if other peoples mind model is similar, but it certainly is the > > > model that is implemented in the GIMPLE pipeline (and if memory serves > > > well of the RTL pipeline as well). > > > > > > Copying outof/into pseudos around asms serves no purpose with that > > > model, it rather makes regvars somewhat "safer" to use, without > > > actually making them safer (there _is_ nothing safe about them). > > > > The only supported case is for inputs and outputs to extended asm. > > Maybe we should just come up with a syntax so you can specify hard regs > > for that directly (without needing a separate regclass for every reg). > > I would like that, yes. (Of course backward compat would have us support > the historic usage for some time, but still ...) Right, or for ten years at least (there are header files that use register asm!) I was thinking something like asm("smth %0,%1" : "=*r0"(x) : "*r1"(y)); where then "*" means the rest of the constraint is just a register name. I don't know how easy this really is to make work, but do you think this is a sensible syntax? Segher