History log of /bionic/libc/arch-arm/bionic/memcpy.S
Revision Date Author Comments
6d0bcdc8329dde4d3c83e95475bc670002f41309 17-Jan-2011 Henrik Smiding <henrik.smiding@stericsson.com> Add optimized version of memcpy for Cortex A9

Adds new code to memcpy function, optimized for Cortex A9.
Adds new ARM-only loop, for operations where source and
destination are aligned.

Copyright (C) ST-Ericsson SA 2010

Modified neon implementation to fit Cortex A9 cache line size,
for those running 32 bytes L2 cache line size.
Also split the implementation in aligned and unaligned access,
for those that allows unaligned memory access with Neon.
For totally aligned operations, arm-only code is used.

Change-Id: I95ebf6164cd6486b12a7e3e98e369db21e7e18d2
Author: Henrik Smiding henrik.smiding@stericsson.com for ST-Ericsson.
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
08e72d0161e39e99ff1003bf1ce894f37d7b7eb4 07-May-2012 Prajakta Gudadhe <pgudadhe@nvidia.com> bionic: add support for non-NEON memcpy() on NEON SoCs

Some SoCs that support NEON nevertheless perform better with a non-NEON than a
NEON memcpy(). This patch adds build variable ARCH_ARM_USE_NON_NEON_MEMCPY,
which can be set in BoardConfig.mk. When ARCH_ARM_USE_NON_NEON_MEMCPY is
defined, we compile in the non-NEON optimized memcpy() even if the SoC supports
NEON.

Change-Id: Ia0e5bee6bad5880ffc5ff8f34a1382d567546cf9
fe6338da9168330d44b409b2ee36103e8bfe6697 15-Sep-2010 Henrik Smiding <henrik.smiding@stericsson.com> Adjust memcpy for ARM Cortex A9 cache line size

ARM Cortex A8 use 64 bytes and ARM Cortex A9 use 32 bytes cache line
size.

The following patch:
Adds code to adjust memcpy cache line size to match A9 cache line
size.
Adds a flag to select between 32 bytes and 64 bytes cache line
size.

Copyright (C) ST-Ericsson SA 2010
Modified neon implementation to fit Cortex A9 cache line size
Author: Henrik Smiding henrik.smiding@stericsson.com for
ST-Ericsson.

Change-Id: I8a55946bfb074e6ec0a14805ed65f73fcd0984a3
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
487b613e572160e80d0700e1bcd0e405420d14ea 04-Oct-2011 Evgeniy Stepanov <eugenis@google.com> Use ENTRY and EXIT macros for strcmp, memcpy, atexit.

Without this change strcmp size is zero (not set), and it gets
ignored by Valgrind. Changes to memcpy and atexit don't affect the
generated binary in any way.

Change-Id: I05818cb5951f75901dc8c0eef02807a2e83a9231
420878c6908cf9c2862888477ec3f424a06cf172 16-Feb-2011 Kenny Root <kroot@google.com> Add function marks and size indications

Add a macro to annotate function end and start using both ENTRY and END
for each function. This allows valgrind (and presumably other debugging
tools) to use the debug symbols to trace the functions.

Change-Id: I5f09cef8e22fb356eb6f5cee952b031e567599b6
ecede4022283650ee4c4ed117a792d6db0b929fd 10-Mar-2010 Colin Cross <ccross@android.com> Only use NEON memcpy if __ARM_NEON__ is defined

Change-Id: I32e6b9385d46efeec15dee8e395a82eef24ba3ea
194d3fa048cf909ca592dd56fa538dc9cd3f5ddb 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
199f9d923804d74e021dd80e48ec75c0a96dba77 28-Oct-2009 Mathias Agopian <mathias@google.com> Improve memcpy performance from 290 MiB/s to 340 MiB/s (17% improvment)

use 64 bytes cache lines, reduce the main loop to 64-bytes instead of
128 bytes and adjust the prefetch distance to the optimal value.
fdc5c1f56f9d21034badb8e4b092c47098f19613 05-Oct-2009 David 'Digit' Turner <digit@google.com> Re-enable ARMv7 memcpy implementation.

Do not submit this patch before the one that modifies the Android emulator to
work-around a weird ARMv7 emulation issue. This is done to temporarily re-allow
the -user builds needed for QA.
1e40783d9ad29c88a4d547774e05080fc4327a2e 03-Oct-2009 David 'Digit' Turner <digit@google.com> Fix armv7-user builds by disabling the ARMv7-optimized memcpy.

This is required to work-around some corny bugs in ARMv7 emulation.

The emulation itself is required to run the dex pre-optimization pass
for -user builds.
ee223d02d96815c989b62043ff1237b1cd4e14b0 28-Sep-2009 Mathias Agopian <mathias@google.com> NEON optimized memcpy.

372 MB/s for large transfers, 440 MB/s for smaller ones down to 1KB. 130 MB/s for very small transfers ( < 32 bytes )
Performance is similar with non-congruent buffers.
f355096a64b74c8e869527de55f7e908873e3128 27-Sep-2009 David 'Digit' Turner <digit@google.com> Remove NEON optimizations for memcpy
bd192b470b69e00e9313680b70c5572a609e535d 15-Sep-2009 Ben Cheng <bccheng@google.com> Add stack unwinding directives to assembly leaf functions.

So that the real culprit of native crashes can surface in the stack trace.
1bbc56cd227546cb155bb47721cdb717780a3400 26-Aug-2009 David 'Digit' Turner <digit@google.com> Neon-optimized versions of memcpy.

This optimization come from the external 0xdroid repository.
Original patch can be found here:

http://gitorious.org/0xdroid/bionic/commit/ebafe41c2c02f8c09a3c1d7746047083df180ac5
1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1767f908af327fa388b1c66883760ad851267013 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
4e468ed2eb86a2406e14f1eca82072ee501d05fd 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
e0055e0f99732dbaea81fd1c7055efb7b506c221 04-Dec-2008 Jean-Baptiste Queru <jbq@google.com> Introduce a new ARM header file <machine/cpu-features.h>

Introduce a new header file containing ARM-specific feature
test macros (e.g. __ARM_HAVE_PAIR_LOAD_STORE corresponding
to ldrd/strd instructions). Also modify a few files in our
system to use the macros in order to build for ARMv4T.
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution