From patchwork Wed Nov 20 09:22:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yvan Roux X-Patchwork-Id: 21648 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CB52F202E6 for ; Wed, 20 Nov 2013 09:22:22 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id cz12sf17934337veb.10 for ; Wed, 20 Nov 2013 01:22:22 -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:in-reply-to:references :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=ySn04sBNFwpIuRgluIJan2rWP/JOMbH0Rm49jGUe8qo=; b=UtC1XMzKjYNcpodkV+kjfW981+SwfBvRFkSdtFlQzfoVcuOmzrWup3kvFOVIZhC85J asZyPh6JNo4ubcx925ABiwBoJHiqQs6H5vt+E7+8yxKZjatIyjoD81XPq6hHRNmmpkOC P61Av6hVXYrlJKU4L3RzJ56NqoOgGXiRVnVUvmVQqv4uRVCVFXVvF8kNIblRvKOAtF3p DqvYzfo4/hi2cn4lougU9h5t/0h++kXU27vX6BdAhczu18MCnGr3TJO2Yp3vSn92TSEK lLYdBdZvaYPbAXvQ+i6Z0z7ylE6eazWZsxIUNrHH18BCaDGyfvqfjduZyRIVKpMn8FSR ZEyA== X-Gm-Message-State: ALoCoQlVe4PC8WA5X35wrBgj3EOrFT1cluOnx6OZX78MeVhjVlXpsw8adLzI/h5LLgcZUMtpz4jh X-Received: by 10.236.118.17 with SMTP id k17mr420978yhh.47.1384939342220; Wed, 20 Nov 2013 01:22:22 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.119.9 with SMTP id kq9ls3494840qeb.48.gmail; Wed, 20 Nov 2013 01:22:22 -0800 (PST) X-Received: by 10.58.54.69 with SMTP id h5mr5635463vep.25.1384939342149; Wed, 20 Nov 2013 01:22:22 -0800 (PST) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id cx4si9250005vcb.5.2013.11.20.01.22.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Nov 2013 01:22:22 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id jy13so98554veb.27 for ; Wed, 20 Nov 2013 01:22:22 -0800 (PST) X-Received: by 10.58.67.9 with SMTP id j9mr25507780vet.3.1384939342072; Wed, 20 Nov 2013 01:22:22 -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 u4csp340162vcz; Wed, 20 Nov 2013 01:22:21 -0800 (PST) X-Received: by 10.194.201.225 with SMTP id kd1mr10217252wjc.35.1384939340955; Wed, 20 Nov 2013 01:22:20 -0800 (PST) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by mx.google.com with ESMTPS id s6si9063927wjf.116.2013.11.20.01.22.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Nov 2013 01:22:20 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.48 is neither permitted nor denied by best guess record for domain of yvan.roux@linaro.org) client-ip=74.125.82.48; Received: by mail-wg0-f48.google.com with SMTP id n12so8818115wgh.15 for ; Wed, 20 Nov 2013 01:22:20 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.184.112 with SMTP id et16mr474547wic.4.1384939340460; Wed, 20 Nov 2013 01:22:20 -0800 (PST) Received: by 10.217.92.194 with HTTP; Wed, 20 Nov 2013 01:22:20 -0800 (PST) In-Reply-To: <7C7B53E4-4C82-4310-AEA2-8676023C96AF@buzzard.freeserve.co.uk> References: <52712245.1090509@redhat.com> <7C7B53E4-4C82-4310-AEA2-8676023C96AF@buzzard.freeserve.co.uk> Date: Wed, 20 Nov 2013 10:22:20 +0100 Message-ID: Subject: Re: RFA: patch to fix PR58785 (an ARM LRA crash) From: Yvan Roux To: Richard Earnshaw Cc: Vladimir Makarov , GCC Patches , 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.128.182 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, as Richard said, only a subset of rclass is allowed to be returned by preferred_reload_class. I've tested the attached patched in Thumb mode, on ARMv5, A9 and A9hf and on cross A15 without regression. Yvan 2013-11-20 Yvan Roux PR target/58785 * config/arm/arm.c (arm_preferred_reload_class): Only return LO_REGS when rclass is GENERAL_REGS. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 5c53440..63f10bd 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -6882,10 +6882,7 @@ arm_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, reg_class_t rclass) return rclass; else { - if (rclass == GENERAL_REGS - || rclass == HI_REGS - || rclass == NO_REGS - || rclass == STACK_REG) + if (rclass == GENERAL_REGS) return LO_REGS; else return rclass;