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>
8 #include <asm/export.h>
14 .section __ex_table,"a";\
16 .word 98b, __retl_one; \
20 .register %g2,#scratch
21 .register %g3,#scratch
26 /* Don't try to get too fancy here, just nice and
27 * simple. This is predominantly used for well aligned
28 * small copies in the compat layer. It is also used
29 * to copy register windows around during thread cloning.
32 ENTRY(___copy_in_user) /* %o0=dst, %o1=src, %o2=len */
47 1: subcc %o4, 0x8, %o4
48 EX(ldxa [%o1] %asi, %o5)
49 EX(stxa %o5, [%o0] %asi)
57 EX(lduwa [%o1] %asi, %o5)
58 EX(stwa %o5, [%o0] %asi)
67 80: /* 0 < len <= 16 */
74 EX(lduwa [%o1] %asi, %g1)
75 EX(stwa %g1, [%o0] %asi)
86 EX(lduba [%o1] %asi, %g1)
87 EX(stba %g1, [%o0] %asi)
93 ENDPROC(___copy_in_user)
94 EXPORT_SYMBOL(___copy_in_user)