2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file COPYING in the main directory of this archive
7 #include <linux/module.h>
8 #include <asm/uaccess.h>
10 unsigned long __generic_copy_from_user(void *to, const void __user *from,
13 unsigned long tmp, res;
18 "1: "MOVES".l (%1)+,%3\n"
24 "3: "MOVES".w (%1)+,%3\n"
28 "5: "MOVES".b (%1)+,%3\n"
31 " .section .fixup,\"ax\"\n"
49 " .section __ex_table,\"a\"\n"
55 : "=d" (res), "+a" (from), "+a" (to), "=&r" (tmp)
56 : "0" (n / 4), "d" (n & 3));
60 EXPORT_SYMBOL(__generic_copy_from_user);
62 unsigned long __generic_copy_to_user(void __user *to, const void *from,
65 unsigned long tmp, res;
70 "1: move.l (%1)+,%3\n"
71 "2: "MOVES".l %3,(%2)+\n"
77 "5: "MOVES".w %3,(%2)+\n"
81 "7: "MOVES".b %3,(%2)+\n"
83 " .section .fixup,\"ax\"\n"
90 " .section __ex_table,\"a\"\n"
99 : "=d" (res), "+a" (from), "+a" (to), "=&r" (tmp)
100 : "0" (n / 4), "d" (n & 3));
104 EXPORT_SYMBOL(__generic_copy_to_user);
110 unsigned long __clear_user(void __user *to, unsigned long n)
117 "1: "MOVES".l %2,(%1)+\n"
122 "4: "MOVES".w %2,(%1)+\n"
125 "6: "MOVES".b %2,(%1)\n"
127 " .section .fixup,\"ax\"\n"
134 " .section __ex_table,\"a\"\n"
143 : "=d" (res), "+a" (to)
144 : "r" (0), "0" (n / 4), "d" (n & 3));
148 EXPORT_SYMBOL(__clear_user);