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";\
20 #define EX_O4(x,y) EX(x,y,__retl_o4_plus_8)
21 #define EX_O2_4(x,y) EX(x,y,__retl_o2_plus_4)
22 #define EX_O2_1(x,y) EX(x,y,__retl_o2_plus_1)
24 .register %g2,#scratch
25 .register %g3,#scratch
41 /* Don't try to get too fancy here, just nice and
42 * simple. This is predominantly used for well aligned
43 * small copies in the compat layer. It is also used
44 * to copy register windows around during thread cloning.
47 ENTRY(raw_copy_in_user) /* %o0=dst, %o1=src, %o2=len */
62 1: subcc %o4, 0x8, %o4
63 EX_O4(ldxa [%o1] %asi, %o5)
64 EX_O4(stxa %o5, [%o0] %asi)
72 EX_O2_4(lduwa [%o1] %asi, %o5)
73 EX_O2_4(stwa %o5, [%o0] %asi)
82 80: /* 0 < len <= 16 */
89 EX_O2_4(lduwa [%o1] %asi, %g1)
90 EX_O2_4(stwa %g1, [%o0] %asi)
101 EX_O2_1(lduba [%o1] %asi, %g1)
102 EX_O2_1(stba %g1, [%o0] %asi)
108 ENDPROC(raw_copy_in_user)
109 EXPORT_SYMBOL(raw_copy_in_user)