From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60230 invoked by alias); 14 Nov 2018 18:01:58 -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 59845 invoked by uid 89); 14 Nov 2018 18:01:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=hardregs, H*F:D*ru X-HELO: smtp.ispras.ru Received: from bran.ispras.ru (HELO smtp.ispras.ru) (83.149.199.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Nov 2018 18:01:53 +0000 Received: from monopod.intra.ispras.ru (monopod.intra.ispras.ru [10.10.3.121]) by smtp.ispras.ru (Postfix) with ESMTP id C9587203C5; Wed, 14 Nov 2018 21:01:50 +0300 (MSK) Date: Wed, 14 Nov 2018 18:01:00 -0000 From: Alexander Monakov To: Segher Boessenkool cc: Jakub Jelinek , Martin Sebor , Gcc Patch List Subject: Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000) In-Reply-To: <20181114174723.GD23873@gate.crashing.org> Message-ID: References: <20181114122250.GZ23873@gate.crashing.org> <20181114122726.GW11625@tucnak> <20181114135305.GB23873@gate.crashing.org> <20181114174723.GD23873@gate.crashing.org> User-Agent: Alpine 2.20.13 (LNX 116 2015-12-14) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2018-11/txt/msg01312.txt.bz2 On Wed, 14 Nov 2018, Segher Boessenkool wrote: > Yeah, using local register vars to access global registers only works > by accident. It does work currently though, and people apparently use > it, so we shouldn't break it :-/ In the proposed approach (copying from/to pseudos just before/after the asm) we can emulate historic behavior by making uninitialized pseudos take values of the corresponding hardregs. If we decide that doing that just for must-uninit pseudos is enough, it's a simple extension to the existing init-regs pass. Does this sound reasonable? Alexander