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..
13 * NOTE! This is not directly C-callable, because the calling semantics are
18 * destination address in $6
19 * source address in $7
20 * return address in $28
23 * bytes left to copy in $0
26 * $1,$2,$3,$4,$5,$6,$7
29 #include <asm/export.h>
31 /* Allow an exception for an insn; exit if we get one. */
34 .section __ex_table,"a"; \
36 lda $31, $exitin-99b($31); \
41 .section __ex_table,"a"; \
43 lda $31, $exitout-99b($31); \
100 EXO( stq_u $1,0($6) )
134 EXPORT_SYMBOL(__copy_user)