|
@@ -9,6 +9,7 @@
|
|
*/
|
|
*/
|
|
#include <linux/linkage.h>
|
|
#include <linux/linkage.h>
|
|
#include <asm/assembler.h>
|
|
#include <asm/assembler.h>
|
|
|
|
+#include <asm/unwind.h>
|
|
|
|
|
|
.text
|
|
.text
|
|
.align 5
|
|
.align 5
|
|
@@ -18,6 +19,7 @@
|
|
* mis-aligned by, and r1 is the number of bytes. If r1 < 4, then we
|
|
* mis-aligned by, and r1 is the number of bytes. If r1 < 4, then we
|
|
* don't bother; we use byte stores instead.
|
|
* don't bother; we use byte stores instead.
|
|
*/
|
|
*/
|
|
|
|
+UNWIND( .fnstart )
|
|
1: subs r1, r1, #4 @ 1 do we have enough
|
|
1: subs r1, r1, #4 @ 1 do we have enough
|
|
blt 5f @ 1 bytes to align with?
|
|
blt 5f @ 1 bytes to align with?
|
|
cmp r3, #2 @ 1
|
|
cmp r3, #2 @ 1
|
|
@@ -47,6 +49,9 @@ ENTRY(__memzero)
|
|
* use the LR
|
|
* use the LR
|
|
*/
|
|
*/
|
|
str lr, [sp, #-4]! @ 1
|
|
str lr, [sp, #-4]! @ 1
|
|
|
|
+UNWIND( .fnend )
|
|
|
|
+UNWIND( .fnstart )
|
|
|
|
+UNWIND( .save {lr} )
|
|
mov ip, r2 @ 1
|
|
mov ip, r2 @ 1
|
|
mov lr, r2 @ 1
|
|
mov lr, r2 @ 1
|
|
|
|
|
|
@@ -66,6 +71,7 @@ ENTRY(__memzero)
|
|
tst r1, #16 @ 1 16 bytes or more?
|
|
tst r1, #16 @ 1 16 bytes or more?
|
|
stmneia r0!, {r2, r3, ip, lr} @ 4
|
|
stmneia r0!, {r2, r3, ip, lr} @ 4
|
|
ldr lr, [sp], #4 @ 1
|
|
ldr lr, [sp], #4 @ 1
|
|
|
|
+UNWIND( .fnend )
|
|
|
|
|
|
#else
|
|
#else
|
|
|
|
|
|
@@ -75,6 +81,9 @@ ENTRY(__memzero)
|
|
*/
|
|
*/
|
|
|
|
|
|
stmfd sp!, {r4-r7, lr}
|
|
stmfd sp!, {r4-r7, lr}
|
|
|
|
+UNWIND( .fnend )
|
|
|
|
+UNWIND( .fnstart )
|
|
|
|
+UNWIND( .save {r4-r7, lr} )
|
|
mov r4, r2
|
|
mov r4, r2
|
|
mov r5, r2
|
|
mov r5, r2
|
|
mov r6, r2
|
|
mov r6, r2
|
|
@@ -105,9 +114,11 @@ ENTRY(__memzero)
|
|
tst r1, #16
|
|
tst r1, #16
|
|
stmneia r0!, {r4-r7}
|
|
stmneia r0!, {r4-r7}
|
|
ldmfd sp!, {r4-r7, lr}
|
|
ldmfd sp!, {r4-r7, lr}
|
|
|
|
+UNWIND( .fnend )
|
|
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+UNWIND( .fnstart )
|
|
4: tst r1, #8 @ 1 8 bytes or more?
|
|
4: tst r1, #8 @ 1 8 bytes or more?
|
|
stmneia r0!, {r2, r3} @ 2
|
|
stmneia r0!, {r2, r3} @ 2
|
|
tst r1, #4 @ 1 4 bytes or more?
|
|
tst r1, #4 @ 1 4 bytes or more?
|
|
@@ -122,4 +133,5 @@ ENTRY(__memzero)
|
|
tst r1, #1 @ 1 a byte left over
|
|
tst r1, #1 @ 1 a byte left over
|
|
strneb r2, [r0], #1 @ 1
|
|
strneb r2, [r0], #1 @ 1
|
|
ret lr @ 1
|
|
ret lr @ 1
|
|
|
|
+UNWIND( .fnend )
|
|
ENDPROC(__memzero)
|
|
ENDPROC(__memzero)
|