[PATCH] memcpy-armv7a.S: Improve performance with misaligned buffers.
Richard Earnshaw
rearnsha@arm.com
Mon Jul 1 09:46:00 GMT 2013
On 28/06/13 11:25, Will Newton wrote:
>
> Adjust the conditions for entering the aligned copy loop to
> improve performance on mutually misaligned buffer copies.
>
> 2013-06-28 Will Newton <will.newton@linaro.org>
>
> * libc/machine/arm/memcpy-armv7a.S: Adjust entry to
> aligned loop to improve misaligned copy performance.
> ---
> newlib/libc/machine/arm/memcpy-armv7a.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/newlib/libc/machine/arm/memcpy-armv7a.S b/newlib/libc/machine/arm/memcpy-armv7a.S
> index de5bf9a..cd7962e 100644
> --- a/newlib/libc/machine/arm/memcpy-armv7a.S
> +++ b/newlib/libc/machine/arm/memcpy-armv7a.S
> @@ -242,8 +242,8 @@ def_fn memcpy p2align=6
> .Lcpy_not_short:
> /* At least 64 bytes to copy, but don't know the alignment yet. */
> str tmp2, [sp, #-FRAME_SIZE]!
> - and tmp2, src, #3
> - and tmp1, dst, #3
> + and tmp2, src, #7
> + and tmp1, dst, #7
> cmp tmp1, tmp2
> bne .Lcpy_notaligned
>
OK.
R.
More information about the Newlib
mailing list