From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28895 invoked by alias); 23 Apr 2014 11:18:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 28885 invoked by uid 89); 23 Apr 2014 11:18:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f171.google.com Received: from mail-lb0-f171.google.com (HELO mail-lb0-f171.google.com) (209.85.217.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 23 Apr 2014 11:18:45 +0000 Received: by mail-lb0-f171.google.com with SMTP id w7so623486lbi.2 for ; Wed, 23 Apr 2014 04:18:42 -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:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=QY1Yl1u/yho+JX8+lz05NsVVftHZSkAOgUgzLgHEMaY=; b=T/Z2IR/gj136lZX5uN6O2Y5PPrB2pOeDRcZoxVc++rlwo/DePVnCy6j4WeYnimTQZz HQoPsAlB0b4K7sDOfiC1tu7CPGc/of9hG33Sd7gBhgBqtnEOxK/Pv0Q55Eu4NpPEwkA6 zp+VMOr5RNbxr8eaJ+5H23La5PEfNhNt6+g1kDc3f2irsJdFbuiOqjZp+VASsg5LeiuV bI/MrFrkzUoXXwp12g8JCG6u/TaAv1lS6geoS4nohUEHXJSIc0t9e+S4DtBuLp3PPF5J 5sn+3my6StpaGvPlsgPeLCZSBVsXuMBKAB+r9OMr6dL6ueVBouCsK6D6WOxEQ3soIgYz wMIg== X-Gm-Message-State: ALoCoQlyf9MmJBLlr6dC7CHQWBlBSmy8NKT8IXS/Qd+q+dKC9FPYdp5u5ccK8PS9v4OwB7nIgEui MIME-Version: 1.0 X-Received: by 10.152.23.169 with SMTP id n9mr1271945laf.45.1398251921938; Wed, 23 Apr 2014 04:18:41 -0700 (PDT) Received: by 10.112.110.104 with HTTP; Wed, 23 Apr 2014 04:18:41 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Apr 2014 11:21:00 -0000 Message-ID: Subject: Re: [PATCH, ARM] Improve 64 bit division performance From: Charles Baylis To: GCC Patches , Ramana Radhakrishnan , Richard Earnshaw Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg01405.txt.bz2 Ping? Ramana mentioned at Linaro Connect that this should be tested on more platforms. I've now checked this on qemu with no regressions on trunk for: arm-unknown-linux-gnueabihf v7-A: ARM and Thumb-2 arm-unknown-linux-gnueabi v4t, v5t, v6: ARM OK for trunk? Archive link: http://gcc.gnu.org/ml/gcc-patches/2014-02/msg01611.html On 27 February 2014 16:38, Charles Baylis wrote: > [resending as text/plain] > > Hi > > These patches optimise 64 bit division by removing the use of the > __gnu_[u]ldivmod_helper functions and hence avoiding the redundant > calculation of the remainder in those functions. > > Bootstrapped, tested and checked for arm-unknown-linux-gnueabihf. > > Benchmarked on Chromebook and Raspberry Pi using attached divbench3.c. > Loop1 varies the divisor and loop2 varies the dividend. > > Chromebook: > > before: > loop1 unsigned: 3.474419 > loop2 unsigned: 6.564871 > loop1 signed: 4.127967 > loop2 signed: 6.071490 > > after: > loop1 unsigned: 2.781364 > loop2 unsigned: 6.166478 > loop1 signed: 2.800974 > loop2 signed: 6.129588 > > Raspberry pi: > before > loop1 unsigned: 28.881753 > loop2 unsigned: 19.876385 > loop1 signed: 32.074941 > loop2 signed: 20.594860 > > after: > loop1 unsigned: 24.893846 > loop2 unsigned: 19.537562 > loop1 signed: 25.334509 > loop2 signed: 19.615088 > > Any comments? OK for stage 1? > > > Patch 1: > > 2014-02-27 Charles Baylis > > * config/arm/bpabi.S (__aeabi_uldivmod): Perform division using call > to __udivmoddi4. > > > Patch 2: > > 2014-02-27 Charles Baylis > > * config/arm/bpabi.S (__aeabi_ldivmod): Perform signed division via > call to __udivmoddi4 and fixing up for negative operands.