From patchwork Fri Mar 25 18:27:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 799 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:45:54 -0000 Delivered-To: patches@linaro.org Received: by 10.42.161.68 with SMTP id s4cs197945icx; Fri, 25 Mar 2011 11:27:54 -0700 (PDT) Received: by 10.14.121.133 with SMTP id r5mr527318eeh.32.1301077673894; Fri, 25 Mar 2011 11:27:53 -0700 (PDT) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id p50si3616895eei.98.2011.03.25.11.27.53 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Mar 2011 11:27:53 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of richard.sandiford@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of richard.sandiford@linaro.org) smtp.mail=richard.sandiford@linaro.org Received: by wyb33 with SMTP id 33so871312wyb.37 for ; Fri, 25 Mar 2011 11:27:53 -0700 (PDT) Received: by 10.227.200.75 with SMTP id ev11mr1045872wbb.56.1301077673113; Fri, 25 Mar 2011 11:27:53 -0700 (PDT) Received: from richards-thinkpad (gbibp9ph1--blueice2n1.emea.ibm.com [195.212.29.75]) by mx.google.com with ESMTPS id u9sm577484wbg.17.2011.03.25.11.27.51 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Mar 2011 11:27:52 -0700 (PDT) From: Richard Sandiford To: Richard Earnshaw Mail-Followup-To: Richard Earnshaw , gcc-patches@gcc.gnu.org, patches@linaro.org, richard.sandiford@linaro.org Cc: gcc-patches@gcc.gnu.org, patches@linaro.org Subject: Re: Tighten ARM's CANNOT_CHANGE_MODE_CLASS References: <1300985270.12868.95.camel@e102346-lin.cambridge.arm.com> <1301051683.28571.10.camel@e102346-lin.cambridge.arm.com> Date: Fri, 25 Mar 2011 18:27:49 +0000 In-Reply-To: <1301051683.28571.10.camel@e102346-lin.cambridge.arm.com> (Richard Earnshaw's message of "Fri, 25 Mar 2011 11:14:43 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Richard Earnshaw writes: >> gcc/ >> * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Restrict FPA_REGS >> case to VFPv1. >> > > I think adding a comment that VFPv1 would require a restriction but that > that isn't supported would be useful. Then if the worst happens it will > be one less bug to go track down. > > OK with that change. Thanks. Here's what I installed. Richard gcc/ * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Restrict FPA_REGS case to VFPv1. Index: gcc/config/arm/arm.h =================================================================== --- gcc/config/arm/arm.h 2011-03-25 18:19:45.000000000 +0000 +++ gcc/config/arm/arm.h 2011-03-25 18:26:13.000000000 +0000 @@ -1167,12 +1167,12 @@ #define IRA_COVER_CLASSES \ } /* FPA registers can't do subreg as all values are reformatted to internal - precision. VFP registers may only be accessed in the mode they - were set. */ -#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ - (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \ - ? reg_classes_intersect_p (FPA_REGS, (CLASS)) \ - || reg_classes_intersect_p (VFP_REGS, (CLASS)) \ + precision. In VFPv1, VFP registers could only be accessed in the mode + they were set, so subregs would be invalid there too. However, we don't + support VFPv1 at the moment, and the restriction was lifted in VFPv2. */ +#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ + (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \ + ? reg_classes_intersect_p (FPA_REGS, (CLASS)) \ : 0) /* The class value for index registers, and the one for base regs. */