1 /* SPDX-License-Identifier: GPL-2.0 */
3 * __clear_user_page, __clear_user, clear_page implementation of SuperH
5 * Copyright (C) 2001 Kaz Kojima
6 * Copyright (C) 2001, 2002 Niibe Yutaka
7 * Copyright (C) 2006 Paul Mundt
9 #include <linux/linkage.h>
17 ! r4..(r4+31)&~32 -------- not aligned [ Area 0 ]
18 ! (r4+31)&~32..(r4+r5)&~32 -------- aligned [ Area 1 ]
19 ! (r4+r5)&~32..r4+r5 -------- not aligned [ Area 2 ]
24 tst r1, r5 ! length < 32
25 bt .Larea2 ! skip to remainder
51 #if defined(CONFIG_CPU_SH4)
88 mov #0, r0 ! return 0 as normal return
90 ! return the number of bytes remained
97 .section __ex_table,"a"
99 .long 0b, .Lbad_clear_user
100 .long 1b, .Lbad_clear_user
101 .long 2b, .Lbad_clear_user
102 .long 3b, .Lbad_clear_user
103 .long 4b, .Lbad_clear_user
104 .long 5b, .Lbad_clear_user
105 .long 6b, .Lbad_clear_user
106 .long 7b, .Lbad_clear_user
107 .long 8b, .Lbad_clear_user
108 .long 9b, .Lbad_clear_user