From patchwork Thu Nov 7 14:56:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yvan Roux X-Patchwork-Id: 21399 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3016A244F2 for ; Thu, 7 Nov 2013 14:56:55 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf1228247pab.0 for ; Thu, 07 Nov 2013 06:56:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:date:message-id :subject:from:to:cc:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=y93Iz1di8MRzfdOS7jsaSPxuYECOfqPq+fv2hQwrELc=; b=eiC9wgMi06oYgTtFau07CVxUUtPMDQ+KbO9bv9d1QaB86H8YfE6eKGTsO0DfbT9EH+ gm06PFYf61MwvKIt2e43+Cz8aKIp8ueaO0nLeMCm7rTLh8rEOxf0+4RWnjfC/nfmGqFr TLo2CO1GZoAklP4buos4t0FFJLQoOzlSibB93dJAlhgeqTla9rvvKoZ3CHkr7R43l6Cb /wLHh+ztuwrPaUFkajiXkmgBEoJs3nwo3dPDUwcA5z9V0NNSkgW7g4GQHNc1AfuzzpB5 8+gIpwswxuYwBz5KPuzCv5TvpxSlgFiwcD5CHKp020DdCclYec/QaUG6Fvv8r58KkLyC gfwg== X-Gm-Message-State: ALoCoQlx7IjFvvM2RXSctEXV9CUdBrgYRxiXBefJs0hjiNIp+HRTlBniwhw33e7mQbe51l+4Bh5k X-Received: by 10.66.218.99 with SMTP id pf3mr3238856pac.8.1383836215124; Thu, 07 Nov 2013 06:56:55 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.25.40 with SMTP id z8ls1161083qef.81.gmail; Thu, 07 Nov 2013 06:56:54 -0800 (PST) X-Received: by 10.58.67.9 with SMTP id j9mr7011983vet.3.1383836214871; Thu, 07 Nov 2013 06:56:54 -0800 (PST) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id t2si1773441vem.104.2013.11.07.06.56.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 Nov 2013 06:56:54 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hv10so452075vcb.29 for ; Thu, 07 Nov 2013 06:56:54 -0800 (PST) X-Received: by 10.221.51.206 with SMTP id vj14mr7098136vcb.17.1383836214790; Thu, 07 Nov 2013 06:56:54 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp25981vcz; Thu, 7 Nov 2013 06:56:54 -0800 (PST) X-Received: by 10.194.119.132 with SMTP id ku4mr6960978wjb.51.1383836213605; Thu, 07 Nov 2013 06:56:53 -0800 (PST) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by mx.google.com with ESMTPS id d1si7523642wie.5.2013.11.07.06.56.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 Nov 2013 06:56:53 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.42 is neither permitted nor denied by best guess record for domain of yvan.roux@linaro.org) client-ip=74.125.82.42; Received: by mail-wg0-f42.google.com with SMTP id n12so544785wgh.1 for ; Thu, 07 Nov 2013 06:56:52 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.73.231 with SMTP id o7mr3057772wiv.21.1383836212848; Thu, 07 Nov 2013 06:56:52 -0800 (PST) Received: by 10.217.92.194 with HTTP; Thu, 7 Nov 2013 06:56:52 -0800 (PST) Date: Thu, 7 Nov 2013 15:56:52 +0100 Message-ID: Subject: [PATCH, ARM, LRA] Fixed bootstrap failure in Thumb mode From: Yvan Roux To: "gcc-patches@gcc.gnu.org" , Vladimir Makarov , Ramana Radhakrishnan , Richard Earnshaw Cc: Patch Tracking X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: yvan.roux@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Hi, this patch fixed an LRA cycling due to secondary reload (Thumb mode). Notice that this patch is a prerequisite to turn on LRA by default on ARM. Bootstrapped on a9 and a15 without any regression in the testsuite as LRA is off by default and with the regression reported in the thread bellow when LRA is on. http://gcc.gnu.org/ml/gcc-patches/2013-11/msg00725.html Thanks, Yvan 2013-11-07 Yvan Roux * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Return NO_REGS for LRA. diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 1781b75..d054906 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -1266,11 +1266,12 @@ enum reg_class /* Must leave BASE_REGS reloads alone */ #define THUMB_SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \ - ((CLASS) != LO_REGS && (CLASS) != BASE_REGS \ - ? ((true_regnum (X) == -1 ? LO_REGS \ - : (true_regnum (X) + HARD_REGNO_NREGS (0, MODE) > 8) ? LO_REGS \ - : NO_REGS)) \ - : NO_REGS) + (lra_in_progress ? NO_REGS \ + : ((CLASS) != LO_REGS && (CLASS) != BASE_REGS \ + ? ((true_regnum (X) == -1 ? LO_REGS \ + : (true_regnum (X) + HARD_REGNO_NREGS (0, MODE) > 8) ? LO_REGS \ + : NO_REGS)) \ + : NO_REGS)) #define THUMB_SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \ ((CLASS) != LO_REGS && (CLASS) != BASE_REGS \