1
2
3
4
5
6#include <linux/linkage.h>
7#include <asm/asm-uaccess.h>
8
9 .text
10
11
12
13
14
15
16
17
18
19
20 .p2align 4
21
22
23SYM_FUNC_START(__arch_clear_user)
24 add x2, x0, x1
25 subs x1, x1,
26 b.mi 2f
271:
28USER(9f, sttr xzr, [x0])
29 add x0, x0,
30 subs x1, x1,
31 b.hi 1b
32USER(9f, sttr xzr, [x2,
33 mov x0,
34 ret
35
362: tbz x1,
37USER(9f, sttr wzr, [x0])
38USER(8f, sttr wzr, [x2,
39 mov x0,
40 ret
41
423: tbz x1,
43USER(9f, sttrh wzr, [x0])
444: tbz x1,
45USER(7f, sttrb wzr, [x2,
465: mov x0,
47 ret
48
49
507: sub x0, x2,
518: add x0, x0,
529: sub x0, x2, x0
53 ret
54SYM_FUNC_END(__arch_clear_user)
55EXPORT_SYMBOL(__arch_clear_user)
56