From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27477 invoked by alias); 9 Sep 2013 09:40:21 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 27468 invoked by uid 89); 9 Sep 2013 09:40:21 -0000 Received: from mail-bk0-f42.google.com (HELO mail-bk0-f42.google.com) (209.85.214.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 09 Sep 2013 09:40:21 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: mail-bk0-f42.google.com Received: by mail-bk0-f42.google.com with SMTP id my10so2229149bkb.29 for ; Mon, 09 Sep 2013 02:40:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=5QHYfH6ZZdqwkLrZRK+bPLP57qxXScGJoMJ1dagrUEA=; b=SK298NyiMn+lh7TJKxh0CEcTNGPga9Dx076vVlv+L8iYC7YBqF5D/sKFlSXOX2GXjo lP5eRYo5HwJsSMxEq/wgNoFkh+4PWgYDyQn/E5c1J/5YGcPty9luyXC0GdOUHKUvgcBC naUc61BefgxV9im8GJtFTXnuatSwi9Qrr1x6T8U9rVjx8dNx7B+ghHheRVJpe6kULxjk hgokikmlstwWLMtX1XZ07pi8c5RRPL2vDKEuLg2pVToyqjgblhdvLx/m4G0zOY9p7FRm oLVTfdY8MpeZZpqoyFaVjw9s7FjbTO9Y9B5LeebAjCNHi9/nLZk+UQPCmTIqkbdZar6B 5KPw== X-Gm-Message-State: ALoCoQkrUZ5Sj0vCiSrnmnw3k6FRAavR+vZpfrwepGQfL1NTLOLawewR3mbMhhCbvsayv1O4DWKg X-Received: by 10.204.66.133 with SMTP id n5mr183586bki.38.1378719617217; Mon, 09 Sep 2013 02:40:17 -0700 (PDT) Received: from localhost.localdomain (cpc6-seac21-2-0-cust453.7-2.cable.virginmedia.com. [82.1.113.198]) by mx.google.com with ESMTPSA id pk7sm2396329bkb.2.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 09 Sep 2013 02:40:16 -0700 (PDT) Message-ID: <522D977E.2000906@linaro.org> Date: Mon, 09 Sep 2013 09:40:00 -0000 From: Will Newton User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: libc-ports@sourceware.org CC: patches@linaro.org Subject: [PATCH v3] ARM: Improve armv7 memcpy performance. Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00069.txt.bz2 Only enter the aligned copy loop with buffers that can be 8-byte aligned. This improves performance slightly on Cortex-A9 and Cortex-A15 cores for large copies with buffers that are 4-byte aligned but not 8-byte aligned. ports/ChangeLog.arm: 2013-08-30 Will Newton * sysdeps/arm/armv7/multiarch/memcpy_impl.S: Tighten check on entry to aligned copy loop to improve performance. --- ports/sysdeps/arm/armv7/multiarch/memcpy_impl.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Changes in v3: - Fixed comments diff --git a/ports/sysdeps/arm/armv7/multiarch/memcpy_impl.S b/ports/sysdeps/arm/armv7/multiarch/memcpy_impl.S index 3decad6..330bb2d 100644 --- a/ports/sysdeps/arm/armv7/multiarch/memcpy_impl.S +++ b/ports/sysdeps/arm/armv7/multiarch/memcpy_impl.S @@ -369,8 +369,8 @@ ENTRY(memcpy) cfi_adjust_cfa_offset (FRAME_SIZE) cfi_rel_offset (tmp2, 0) cfi_remember_state - and tmp2, src, #3 - and tmp1, dst, #3 + and tmp2, src, #7 + and tmp1, dst, #7 cmp tmp1, tmp2 bne .Lcpy_notaligned @@ -381,9 +381,9 @@ ENTRY(memcpy) vmov.f32 s0, s0 #endif - /* SRC and DST have the same mutual 32-bit alignment, but we may + /* SRC and DST have the same mutual 64-bit alignment, but we may still need to pre-copy some bytes to get to natural alignment. - We bring DST into full 64-bit alignment. */ + We bring SRC and DST into full 64-bit alignment. */ lsls tmp2, dst, #29 beq 1f rsbs tmp2, tmp2, #0 -- 1.8.1.4