1 /* copy_in_user.S: Copy from userspace to userspace.
3 * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
6 #include <linux/linkage.h>
13 .section __ex_table,"a";\
15 .word 98b, __retl_one; \
19 .register %g2,#scratch
20 .register %g3,#scratch
25 /* Don't try to get too fancy here, just nice and
26 * simple. This is predominantly used for well aligned
27 * small copies in the compat layer. It is also used
28 * to copy register windows around during thread cloning.
31 ENTRY(___copy_in_user) /* %o0=dst, %o1=src, %o2=len */
46 1: subcc %o4, 0x8, %o4
47 EX(ldxa [%o1] %asi, %o5)
48 EX(stxa %o5, [%o0] %asi)
56 EX(lduwa [%o1] %asi, %o5)
57 EX(stwa %o5, [%o0] %asi)
66 80: /* 0 < len <= 16 */
73 EX(lduwa [%o1] %asi, %g1)
74 EX(stwa %g1, [%o0] %asi)
85 EX(lduba [%o1] %asi, %g1)
86 EX(stba %g1, [%o0] %asi)
92 ENDPROC(___copy_in_user)