2 * linux/arch/arm/lib/clear_user.S
4 * Copyright (C) 1995, 1996,1997,1998 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 #include <linux/linkage.h>
11 #include <asm/assembler.h>
15 /* Prototype: int __arch_clear_user(void *addr, size_t sz)
16 * Purpose : clear some user memory
17 * Params : addr - user memory address to clear
18 * : sz - number of bytes to clear
19 * Returns : number of bytes NOT cleared
21 ENTRY(__arch_clear_user)
29 USER( strbt r2, [r0], #1)
30 USER( strlebt r2, [r0], #1)
31 USER( strltbt r2, [r0], #1)
33 sub r1, r1, ip @ 7 6 5 4 3 2 1
34 1: subs r1, r1, #8 @ -1 -2 -3 -4 -5 -6 -7
35 USER( strplt r2, [r0], #4)
36 USER( strplt r2, [r0], #4)
38 adds r1, r1, #4 @ 3 2 1 0 -1 -2 -3
39 USER( strplt r2, [r0], #4)
40 2: tst r1, #2 @ 1x 1x 0x 0x 1x 1x 0x
41 USER( strnebt r2, [r0], #1)
42 USER( strnebt r2, [r0], #1)
43 tst r1, #1 @ x1 x0 x1 x0 x1 x0 x1
44 USER( strnebt r2, [r0], #1)
46 LOADREGS(fd,sp!, {r1, pc})
50 9001: LOADREGS(fd,sp!, {r0, pc})