Go to the documentation of this file.
12 #ifndef __ASM_SH_UACCESS_32_H
13 #define __ASM_SH_UACCESS_32_H
15 #define __get_user_size(x,ptr,size,retval) \
20 __get_user_asm(x, ptr, retval, "b"); \
23 __get_user_asm(x, ptr, retval, "w"); \
26 __get_user_asm(x, ptr, retval, "l"); \
29 __get_user_unknown(); \
35 #define __get_user_asm(x, addr, err, insn) \
37 __asm__ __volatile__( \
39 "mov." insn " %2, %1\n\t" \
41 ".section .fixup,\"ax\"\n" \
50 ".section __ex_table,\"a\"\n\t" \
53 :"=&r" (err), "=&r" (x) \
54 :"m" (__m(addr)), "i" (-EFAULT), "0" (err)); })
56 #define __get_user_asm(x, addr, err, insn) \
58 __asm__ __volatile__ ( \
59 "mov." insn " %1, %0\n\t" \
68 #define __put_user_size(x,ptr,size,retval) \
73 __put_user_asm(x, ptr, retval, "b"); \
76 __put_user_asm(x, ptr, retval, "w"); \
79 __put_user_asm(x, ptr, retval, "l"); \
82 __put_user_u64(x, ptr, retval); \
85 __put_user_unknown(); \
90 #define __put_user_asm(x, addr, err, insn) \
92 __asm__ __volatile__ ( \
94 "mov." insn " %1, %2\n\t" \
96 ".section .fixup,\"ax\"\n" \
104 ".section __ex_table,\"a\"\n\t" \
108 : "r" (x), "m" (__m(addr)), "i" (-EFAULT), \
114 #define __put_user_asm(x, addr, err, insn) \
116 __asm__ __volatile__ ( \
117 "mov." insn " %0, %1\n\t" \
119 : "r" (x), "m" (__m(addr)) \
125 #if defined(CONFIG_CPU_LITTLE_ENDIAN)
126 #define __put_user_u64(val,addr,retval) \
128 __asm__ __volatile__( \
131 "mov.l %S1,%T2\n\t" \
133 ".section .fixup,\"ax\"\n" \
141 ".section __ex_table,\"a\"\n\t" \
145 : "r" (val), "m" (__m(addr)), "i" (-EFAULT), "0" (retval) \
148 #define __put_user_u64(val,addr,retval) \
150 __asm__ __volatile__( \
153 "mov.l %R1,%T2\n\t" \
155 ".section .fixup,\"ax\"\n" \
163 ".section __ex_table,\"a\"\n\t" \
167 : "r" (val), "m" (__m(addr)), "i" (-EFAULT), "0" (retval) \