2 * arch/alpha/lib/copy_user.S
4 * Copy to/from user space, handling exceptions as we go.. This
5 * isn't exactly pretty.
7 * This is essentially the same as "memcpy()", but with a few twists.
8 * Notably, we have to make sure that $0 is always up-to-date and
9 * contains the right "bytes left to copy" value (and that it is updated
10 * only _after_ a successful copy). There is also some rather minor
11 * exception setup stuff..
14 #include <asm/export.h>
16 /* Allow an exception for an insn; exit if we get one. */
19 .section __ex_table,"a"; \
21 lda $31, $exitin-99b($31); \
26 .section __ex_table,"a"; \
28 lda $31, $exitout-99b($31); \
44 EXI( ldq_u $1,0($17) )
45 EXO( ldq_u $2,0($16) )
51 EXO( stq_u $1,0($16) )
62 EXI( ldq_u $3,0($17) )
65 EXI( ldq_u $2,8($17) )
80 EXI( ldq_u $1,0($17) )
81 EXO( ldq_u $2,0($16) )
86 EXO( stq_u $1,0($16) )
120 EXPORT_SYMBOL(__copy_user)