mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-31 11:30:56 +08:00
* libc/machine/arm/memcpy.S: Fix unaligned access copying.
This commit is contained in:
parent
35ddfc9e28
commit
de0ae33544
@ -1,3 +1,7 @@
|
|||||||
|
2011-10-04 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* libc/machine/arm/memcpy.S: Fix unaligned access copying.
|
||||||
|
|
||||||
2011-09-29 Greta Yorsh <Greta.Yorsh@arm.com>
|
2011-09-29 Greta Yorsh <Greta.Yorsh@arm.com>
|
||||||
|
|
||||||
* libc/machine/arm/memcpy.S: New file. Contains a hand coded
|
* libc/machine/arm/memcpy.S: New file. Contains a hand coded
|
||||||
|
@ -364,7 +364,7 @@ src_not_word_aligned:
|
|||||||
#ifdef __ARM_FEATURE_UNALIGNED
|
#ifdef __ARM_FEATURE_UNALIGNED
|
||||||
/* Copy word by word using LDR when alignment can be done in hardware,
|
/* Copy word by word using LDR when alignment can be done in hardware,
|
||||||
i.e., SCTLR.A is set, supporting unaligned access in LDR and STR. */
|
i.e., SCTLR.A is set, supporting unaligned access in LDR and STR. */
|
||||||
cmp r2, #60
|
subs r2, r2, #60
|
||||||
blt 8f
|
blt 8f
|
||||||
|
|
||||||
7:
|
7:
|
||||||
@ -380,12 +380,18 @@ src_not_word_aligned:
|
|||||||
bge 7b
|
bge 7b
|
||||||
|
|
||||||
8:
|
8:
|
||||||
/* Get here if there is less than 64 btyes to copy,
|
/* Get here if less than 64 bytes to copy, -64 <= r2 < 0.
|
||||||
where the number of bytes to copy is r2 + 4. */
|
Check if there is more than 3 bytes to copy. */
|
||||||
|
adds r2, r2, #60
|
||||||
|
blt copy_less_than_4
|
||||||
|
|
||||||
|
9:
|
||||||
|
/* Get here if there is less than 64 but at least 4 bytes to copy,
|
||||||
|
where the number of bytes to copy is r2+4. */
|
||||||
ldr r3, [r1], #4
|
ldr r3, [r1], #4
|
||||||
str r3, [r0], #4
|
str r3, [r0], #4
|
||||||
subs r2, r2, #4
|
subs r2, r2, #4
|
||||||
bge 8b
|
bge 9b
|
||||||
|
|
||||||
b copy_less_than_4
|
b copy_less_than_4
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user