From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19871 invoked by alias); 14 Jun 2012 20:13:21 -0000 Received: (qmail 19855 invoked by uid 22791); 14 Jun 2012 20:13:18 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from qmta01.westchester.pa.mail.comcast.net (HELO qmta01.westchester.pa.mail.comcast.net) (76.96.62.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jun 2012 20:13:03 +0000 Received: from omta02.westchester.pa.mail.comcast.net ([76.96.62.19]) by qmta01.westchester.pa.mail.comcast.net with comcast id NL7E1j0020QuhwU51LD2ew; Thu, 14 Jun 2012 20:13:02 +0000 Received: from bag6-1-pt.tunnel.tserv3.fmt2.ipv6.he.net ([IPv6:2001:470:1f04:ae1::2]) by omta02.westchester.pa.mail.comcast.net with comcast id NLD11j0010P3DwE3NLD2Pi; Thu, 14 Jun 2012 20:13:02 +0000 Subject: Re: [PATCH] ARM: exclude fixed_regs for stack-alignment save/restore Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Mike Stump In-Reply-To: Date: Thu, 14 Jun 2012 20:22:00 -0000 Cc: gcc-patches@gcc.gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Roland McGrath X-IsSubscribed: yes 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 X-SW-Source: 2012-06/txt/msg00961.txt.bz2 On Jun 14, 2012, at 10:16 AM, Roland McGrath wrote: > But if e.g. I use -ffixed-r9 then I think it's a reasonable expectation > that no code is generated that touches r9 in any way, shape, or form. Also, I can't help but wonder if global_regs is respected. In theory, peo= ple are allowed to declare global registers, and nothing should be stopping= them, though, this is abi breaking, and one does need to recompile the wor= ld as I recall to use it, so, most people don't use it and can't use it, bu= t the bare metal people can. Your change looks good to me. I'll note in passing that cse.c does: /* Determine whether register number N is considered a fixed register for t= he=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 purpose of approximating register costs.=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 It is desirable to replace other regs with fixed regs, to reduce need fo= r=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 non-fixed hard regs.=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 A reg wins if it is either the frame pointer or designated as fixed. */ #define FIXED_REGNO_P(N) \ ((N) =3D=3D FRAME_POINTER_REGNUM || (N) =3D=3D HARD_FRAME_POINTER_REGNUM \ || fixed_regs[N] || global_regs[N])