summaryrefslogtreecommitdiffstats
path: root/newlib/libc/machine/arm/aeabi_memset-thumb2.S
diff options
context:
space:
mode:
authorHale Wang <hale.wang@arm.com>2015-06-01 12:49:37 +0200
committerCorinna Vinschen <corinna@vinschen.de>2015-06-01 12:49:37 +0200
commit24e054c8c8ed59b4b1009f81dc2760b914ad5b00 (patch)
tree6a6adc6280e2ca5e7f486e12e1cbedf3618681b3 /newlib/libc/machine/arm/aeabi_memset-thumb2.S
parentb27c7d1d9a21496b0584a6f1252f66539151b42a (diff)
downloadcygnal-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_memset-thumb2.S')
-rw-r--r--newlib/libc/machine/arm/aeabi_memset-thumb2.S50
1 files changed, 24 insertions, 26 deletions
diff --git a/newlib/libc/machine/arm/aeabi_memset-thumb2.S b/newlib/libc/machine/arm/aeabi_memset-thumb2.S
index cb78f8754..eaca1d8d7 100644
--- a/newlib/libc/machine/arm/aeabi_memset-thumb2.S
+++ b/newlib/libc/machine/arm/aeabi_memset-thumb2.S
@@ -33,35 +33,34 @@
ASM_ALIAS __aeabi_memset4 __aeabi_memset
ASM_ALIAS __aeabi_memset8 __aeabi_memset
__aeabi_memset:
- .cfi_startproc
push {r4, r5, r6}
lsls r4, r0, #30
- beq .L14
+ beq 10f
subs r4, r1, #1
cmp r1, #0
- beq .L16
+ beq 9f
uxtb r5, r2
mov r3, r0
- b .L4
-.L6:
+ b 2f
+1:
subs r1, r4, #1
- cbz r4, .L16
+ cbz r4, 9f
mov r4, r1
-.L4:
+2:
strb r5, [r3], #1
lsls r1, r3, #30
- bne .L6
-.L2:
+ bne 1b
+3:
cmp r4, #3
- bls .L11
+ bls 7f
uxtb r5, r2
orr r5, r5, r5, lsl #8
cmp r4, #15
orr r5, r5, r5, lsl #16
- bls .L9
- add r1, r3, #16
+ bls 5f
mov r6, r4
-.L10:
+ add r1, r3, #16
+4:
subs r6, r6, #16
cmp r6, #15
str r5, [r1, #-16]
@@ -69,41 +68,40 @@ __aeabi_memset:
str r5, [r1, #-8]
str r5, [r1, #-4]
add r1, r1, #16
- bhi .L10
+ bhi 4b
sub r1, r4, #16
bic r1, r1, #15
and r4, r4, #15
adds r1, r1, #16
cmp r4, #3
add r3, r3, r1
- bls .L11
-.L9:
+ bls 7f
+5:
mov r6, r3
mov r1, r4
-.L12:
+6:
subs r1, r1, #4
cmp r1, #3
str r5, [r6], #4
- bhi .L12
+ bhi 6b
subs r1, r4, #4
bic r1, r1, #3
adds r1, r1, #4
add r3, r3, r1
and r4, r4, #3
-.L11:
- cbz r4, .L16
+7:
+ cbz r4, 9f
uxtb r2, r2
add r4, r4, r3
-.L13:
+8:
strb r2, [r3], #1
cmp r3, r4
- bne .L13
-.L16:
+ bne 8b
+9:
pop {r4, r5, r6}
bx lr
-.L14:
+10:
mov r4, r1
mov r3, r0
- b .L2
- .cfi_endproc
+ b 3b
.size __aeabi_memset, . - __aeabi_memset