From patchwork Thu Sep 4 18:19:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkataramanan Kumar X-Patchwork-Id: 36751 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f71.google.com (mail-oi0-f71.google.com [209.85.218.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E276320CBB for ; Thu, 4 Sep 2014 18:19:51 +0000 (UTC) Received: by mail-oi0-f71.google.com with SMTP id v63sf49972324oia.10 for ; Thu, 04 Sep 2014 11:19:51 -0700 (PDT) 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=lf+cCYZ16CbcZ9sh11KYKZ+0wUjwG6j+zeRY6nAK1ro=; b=fFwMAHqbJtDQGtyESaqvWiBMRGvc2j27nWjHl3W6/B8Hpp37ndv9s86an7h0Vsa/Tw dhM+MOgrODcT5P/5NXhxov7ApK9bq9C8qs5DIEcpNUYttpOWNKWI4v9D+71UqXhoq4LL e4AtQxdggJSXQ6cXGTwYcgozagVCAFu8SB9mlmNeg4ZjoZQK964hHoAqm9C6Z3bHTXAk QFhSnsG/M2eHh3ttrkEDFLxuB1UtGTR+vdmfGLr0sEvGhjzMhIjHFZuWLuwrSL2tq1es HxMpl2HplxprdJ8hhpCpzNDY2tlQ+MNKegkQDqd/JCQS8O/aZKmaX4i96iwTZN7wAQea KoWw== X-Gm-Message-State: ALoCoQmPtZ63F45/XCVs/W9ZMLwvb4LdPRLGPhz6DOK7rkOQwxnKUxowb2CBHqcGuOnXPzEMj0Pk X-Received: by 10.43.56.209 with SMTP id wd17mr2370588icb.6.1409854791514; Thu, 04 Sep 2014 11:19:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.28.9 with SMTP id 9ls378319qgy.52.gmail; Thu, 04 Sep 2014 11:19:51 -0700 (PDT) X-Received: by 10.52.94.108 with SMTP id db12mr5028937vdb.8.1409854791360; Thu, 04 Sep 2014 11:19:51 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id f8si6371892vcn.66.2014.09.04.11.19.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Sep 2014 11:19:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id ik5so10983158vcb.21 for ; Thu, 04 Sep 2014 11:19:51 -0700 (PDT) X-Received: by 10.52.129.200 with SMTP id ny8mr4976566vdb.27.1409854791247; Thu, 04 Sep 2014 11:19:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp879547vcb; Thu, 4 Sep 2014 11:19:50 -0700 (PDT) X-Received: by 10.236.53.167 with SMTP id g27mr3406194yhc.180.1409854790591; Thu, 04 Sep 2014 11:19:50 -0700 (PDT) Received: from mail-qc0-f177.google.com (mail-qc0-f177.google.com [209.85.216.177]) by mx.google.com with ESMTPS id j75si15745507qge.8.2014.09.04.11.19.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Sep 2014 11:19:50 -0700 (PDT) Received-SPF: pass (google.com: domain of venkataramanan.kumar@linaro.org designates 209.85.216.177 as permitted sender) client-ip=209.85.216.177; Received: by mail-qc0-f177.google.com with SMTP id i8so11035530qcq.36 for ; Thu, 04 Sep 2014 11:19:50 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.140.93.44 with SMTP id c41mr9486199qge.106.1409854790269; Thu, 04 Sep 2014 11:19:50 -0700 (PDT) Received: by 10.140.25.165 with HTTP; Thu, 4 Sep 2014 11:19:50 -0700 (PDT) In-Reply-To: <20140904081855.GA18028@arm.com> References: <20140904081855.GA18028@arm.com> Date: Thu, 4 Sep 2014 23:49:50 +0530 Message-ID: Subject: Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern. From: Venkataramanan Kumar To: James Greenhalgh Cc: Marcus Shawcroft , "gcc-patches@gcc.gnu.org" , Patch Tracking , Richard Earnshaw X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: venkataramanan.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) 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 James, Yes we can just mark operand 3 as "&r". PFB, the updated patch. Ok for trunk? regards, Venkat. gcc/ChangeLog 2014-09-04 Venkataramanan Kumar * config/aarch64/aarch64.md (stack_protect_test_) Add register constraint for operand 0 and remove write only constraint from operand 3. regards, Venkat, On 4 September 2014 13:48, James Greenhalgh wrote: > On Thu, Sep 04, 2014 at 08:42:31AM +0100, Venkataramanan Kumar wrote: >> Hi maintainers, >> >> I just added "=r" and retested it. > > I had a very similar patch to this sitting in my local tree. However, > I am surprised you have left operand 3 as an output operand. In my tree > I had marked operand 3 as "&r". > > What do you think? > > Thanks, > James > >> gcc/ChangeLog >> >> 2014-09-04 Venkataramanan Kumar >> >> * config/aarch64/aarch64.md (stack_protect_test_) Add register >> constraint for operand 0. >> >> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md >> index b5be79c..ed6e602 100644 >> --- a/gcc/config/aarch64/aarch64.md >> +++ b/gcc/config/aarch64/aarch64.md >> @@ -4026,7 +4026,7 @@ >> }) >> >> (define_insn "stack_protect_test_" >> - [(set (match_operand:PTR 0 "register_operand") >> + [(set (match_operand:PTR 0 "register_operand" "=r") >> (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m") >> (match_operand:PTR 2 "memory_operand" "m")] >> UNSPEC_SP_TEST)) >> >> regards, >> venkat. >> >> On 4 September 2014 12:42, Venkataramanan Kumar >> wrote: >> > Hi Maintainers, >> > >> > Below patch adds register constraint "r" for destination operand in >> > "stack_protect_test" pattern. >> > >> > We need a general register here and adding "r" will avoid vector >> > register getting allocated. >> > >> > regression tested on aarch64-unknown-linux-gnu. >> > >> > Ok for trunk? >> > >> > regards, >> > Venkat. >> > >> > >> > gcc/ChangeLog >> > >> > 2014-09-04 Venkataramanan Kumar >> > >> > * config/aarch64/aarch64.md (stack_protect_test_) Add register >> > constraint for operand 0. >> > >> > >> > diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md >> > index b5be79c..77588b9 100644 >> > --- a/gcc/config/aarch64/aarch64.md >> > +++ b/gcc/config/aarch64/aarch64.md >> > @@ -4026,7 +4026,7 @@ >> > }) >> > >> > (define_insn "stack_protect_test_" >> > - [(set (match_operand:PTR 0 "register_operand") >> > + [(set (match_operand:PTR 0 "register_operand" "r") >> > (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m") >> > (match_operand:PTR 2 "memory_operand" "m")] >> > UNSPEC_SP_TEST)) >> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index b5be79c..cf6fdb0 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -4026,11 +4026,11 @@ }) (define_insn "stack_protect_test_" - [(set (match_operand:PTR 0 "register_operand") + [(set (match_operand:PTR 0 "register_operand" "=r") (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m") (match_operand:PTR 2 "memory_operand" "m")] UNSPEC_SP_TEST)) - (clobber (match_scratch:PTR 3 "=&r"))] + (clobber (match_scratch:PTR 3 "&r"))] "" "ldr\t%3, %x1\;ldr\t%0, %x2\;eor\t%0, %3, %0" [(set_attr "length" "12")