From patchwork Wed Jun 11 10:19:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Baylis X-Patchwork-Id: 31756 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A89032054B for ; Wed, 11 Jun 2014 10:21:29 +0000 (UTC) Received: by mail-ig0-f198.google.com with SMTP id uq10sf2005448igb.1 for ; Wed, 11 Jun 2014 03:21:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:sender:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results; bh=xE2bYtPMW7BU4CTpqSA9Jky6KxO/xE1x8IaqkD2UfAk=; b=Bdcwo84SOu0NYnaB6swuBjvklBxokfNGtV5fqY/lkhtE2ZRhyufFNukx2mlTJSfype kF79aof4T4M+DP1Qm4DFCcdC74viL6a2V7rj36w5WDsjaHgFwqiwi++1O04Qrs+RjJ2l KgyI87+KTzdSFTxtgGV5ZZ0RiVVOFZRaOOTdUtGOWa/MdoflNpgSEIkqWSe4Lw/oVZw2 ELYLhc2PH1LeWJEmRO+3VCkxIJfEZf0yGE96dcOfIkVL/VnNJiJlT90ZZEHWvKxjavgW ALIZro9KZ6GZhASW3YW8kFOpPQrZR6wORSjFJGAB6VH1k8siZa9M3be5ANWphqmuNcOr C5ow== X-Gm-Message-State: ALoCoQn/BZdsv30dQwhzWuFurUuhR02zPLya37tXLrNmh7WrGKfasydxcGmPrUxKKV1au/PdWzcc X-Received: by 10.182.121.232 with SMTP id ln8mr8300782obb.11.1402482089186; Wed, 11 Jun 2014 03:21:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.99 with SMTP id y90ls2568896qgd.82.gmail; Wed, 11 Jun 2014 03:21:29 -0700 (PDT) X-Received: by 10.52.249.76 with SMTP id ys12mr177206vdc.63.1402482089062; Wed, 11 Jun 2014 03:21:29 -0700 (PDT) Received: from mail-ve0-x233.google.com (mail-ve0-x233.google.com [2607:f8b0:400c:c01::233]) by mx.google.com with ESMTPS id b5si11303782vec.50.2014.06.11.03.21.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Jun 2014 03:21:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c01::233 as permitted sender) client-ip=2607:f8b0:400c:c01::233; Received: by mail-ve0-f179.google.com with SMTP id oy12so10332412veb.24 for ; Wed, 11 Jun 2014 03:21:28 -0700 (PDT) X-Received: by 10.52.52.168 with SMTP id u8mr2569585vdo.25.1402482088953; Wed, 11 Jun 2014 03:21:28 -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.54.6 with SMTP id vs6csp290953vcb; Wed, 11 Jun 2014 03:21:28 -0700 (PDT) X-Received: by 10.68.202.167 with SMTP id kj7mr3976029pbc.160.1402482088017; Wed, 11 Jun 2014 03:21:28 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ey3si37451868pbc.244.2014.06.11.03.21.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jun 2014 03:21:28 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-369987-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 29036 invoked by alias); 11 Jun 2014 10:20:37 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 28856 invoked by uid 89); 11 Jun 2014 10:20:35 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f176.google.com Received: from mail-we0-f176.google.com (HELO mail-we0-f176.google.com) (74.125.82.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 11 Jun 2014 10:20:34 +0000 Received: by mail-we0-f176.google.com with SMTP id u56so4266473wes.21 for ; Wed, 11 Jun 2014 03:20:31 -0700 (PDT) X-Received: by 10.194.189.116 with SMTP id gh20mr49897295wjc.41.1402482031203; Wed, 11 Jun 2014 03:20:31 -0700 (PDT) Received: from sale.linaro.local ([213.122.173.130]) by mx.google.com with ESMTPSA id ej2sm33548768wjd.21.2014.06.11.03.20.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Jun 2014 03:20:30 -0700 (PDT) From: Charles Baylis To: rearnsha@arm.com Cc: gcc-patches@gcc.gnu.org, Ramana.Radhakrishnan@arm.com Subject: [PATCH 5/9] Optimise __aeabi_ldivmod (stack manipulation) Date: Wed, 11 Jun 2014 11:19:51 +0100 Message-Id: <1402481995-12749-5-git-send-email-charles.baylis@linaro.org> In-Reply-To: <1402481995-12749-1-git-send-email-charles.baylis@linaro.org> References: <5398226C.5060905@arm.com> <1402481995-12749-1-git-send-email-charles.baylis@linaro.org> X-IsSubscribed: yes X-Original-Sender: charles.baylis@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c01::233 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 2014-05-22 Charles Baylis * config/arm/bpabi.S (__aeabi_ldivmod): Optimise stack manipulation. --- libgcc/config/arm/bpabi.S | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libgcc/config/arm/bpabi.S b/libgcc/config/arm/bpabi.S index 927e37f..3f9ece5 100644 --- a/libgcc/config/arm/bpabi.S +++ b/libgcc/config/arm/bpabi.S @@ -174,18 +174,10 @@ ARM_FUNC_START aeabi_ldivmod cfi_start __aeabi_ldivmod, LSYM(Lend_aeabi_ldivmod) test_div_by_zero signed - sub sp, sp, #8 -#if defined(__thumb2__) - mov ip, sp - push {ip, lr} -#else - do_push {sp, lr} -#endif -98: cfi_push 98b - __aeabi_ldivmod, 0xe, -0xc, 0x10 + push_for_divide __aeabi_ldivmod + /* arguments in (r0:r1), (r2:r3) and *sp */ bl SYM(__gnu_ldivmod_helper) __PLT__ - ldr lr, [sp, #4] - add sp, sp, #8 - do_pop {r2, r3} + pop_for_divide RET cfi_end LSYM(Lend_aeabi_ldivmod)