diff options
author | Hale Wang <hale.wang@arm.com> | 2015-06-01 12:49:37 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-06-01 12:49:37 +0200 |
commit | 24e054c8c8ed59b4b1009f81dc2760b914ad5b00 (patch) | |
tree | 6a6adc6280e2ca5e7f486e12e1cbedf3618681b3 /newlib/libc/machine/arm/aeabi_memmove-arm.S | |
parent | b27c7d1d9a21496b0584a6f1252f66539151b42a (diff) | |
download | cygnal-24e054c8c8ed59b4b1009f81dc2760b914ad5b00.tar.gz cygnal-24e054c8c8ed59b4b1009f81dc2760b914ad5b00.tar.bz2 cygnal-24e054c8c8ed59b4b1009f81dc2760b914ad5b00.zip |
Update the assembler code to support old ARM architectures.
* libc/machine/arm/aeabi_memmove-arm.S (__aeabi_memmove): Update the
assembler implementation.
* libc/machine/arm/aeabi_memmove-thumb.S (__aeabi_memmove): Ditto.
* libc/machine/arm/aeabi_memmove-thumb2.S (__aeabi_memmove): Ditto.
* libc/machine/arm/aeabi_memset-arm.S (__aeabi_memset): Ditto.
* libc/machine/arm/aeabi_memset-thumb.S (__aeabi_memset): Ditto.
* libc/machine/arm/aeabi_memset-thumb2.S (__aeabi_memset): Ditto.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/machine/arm/aeabi_memmove-arm.S')
-rw-r--r-- | newlib/libc/machine/arm/aeabi_memmove-arm.S | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/newlib/libc/machine/arm/aeabi_memmove-arm.S b/newlib/libc/machine/arm/aeabi_memmove-arm.S index 371f21567..e6e9639fa 100644 --- a/newlib/libc/machine/arm/aeabi_memmove-arm.S +++ b/newlib/libc/machine/arm/aeabi_memmove-arm.S @@ -33,31 +33,32 @@ ASM_ALIAS __aeabi_memmove4 __aeabi_memmove ASM_ALIAS __aeabi_memmove8 __aeabi_memmove __aeabi_memmove: - .cfi_startproc cmp r0, r1 + bls 2f add r3, r1, r2 - bhi .L2 -.L4: - sub r2, r0, #1 - b .L3 -.L2: cmp r0, r3 - addcc r1, r0, r2 - rsbcc r2, r3, r2 - bcs .L4 -.L5: - cmn r3, r2 - ldrneb ip, [r3, #-1]! - strneb ip, [r1, #-1]! - bne .L5 -.L11: + bcs 2f + cmp r2, #0 + add r1, r0, r2 + bxeq lr + rsb r2, r2, r3 +1: + ldrb ip, [r3, #-1]! + cmp r2, r3 + strb ip, [r1, #-1]! + bne 1b bx lr -.L3: - cmp r1, r3 - ldrneb ip, [r1], #1 - strneb ip, [r2, #1]! - bne .L3 -.L12: +2: + cmp r2, #0 + addne r2, r1, r2 + subne r3, r0, #1 + beq 4f +3: + ldrb ip, [r1], #1 + cmp r2, r1 + strb ip, [r3, #1]! + bne 3b + bx lr +4: bx lr - .cfi_endproc .size __aeabi_memmove, . - __aeabi_memmove |