uaccess.h (b74b953b998bcc2db91b694446f3a2619ec32de6) | uaccess.h (247055aa21ffef1c49dd64710d5e94c2aee19b58) |
---|---|
1/* 2 * arch/arm/include/asm/uaccess.h 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 */ 8#ifndef _ASMARM_UACCESS_H --- 213 unchanged lines hidden (view full) --- 222 case 4: __get_user_asm_word(__gu_val,__gu_addr,err); break; \ 223 default: (__gu_val) = __get_user_bad(); \ 224 } \ 225 (x) = (__typeof__(*(ptr)))__gu_val; \ 226} while (0) 227 228#define __get_user_asm_byte(x,addr,err) \ 229 __asm__ __volatile__( \ | 1/* 2 * arch/arm/include/asm/uaccess.h 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 */ 8#ifndef _ASMARM_UACCESS_H --- 213 unchanged lines hidden (view full) --- 222 case 4: __get_user_asm_word(__gu_val,__gu_addr,err); break; \ 223 default: (__gu_val) = __get_user_bad(); \ 224 } \ 225 (x) = (__typeof__(*(ptr)))__gu_val; \ 226} while (0) 227 228#define __get_user_asm_byte(x,addr,err) \ 229 __asm__ __volatile__( \ |
230 "1: ldrbt %1,[%2]\n" \ | 230 "1: " T(ldrb) " %1,[%2],#0\n" \ |
231 "2:\n" \ 232 " .pushsection .fixup,\"ax\"\n" \ 233 " .align 2\n" \ 234 "3: mov %0, %3\n" \ 235 " mov %1, #0\n" \ 236 " b 2b\n" \ 237 " .popsection\n" \ 238 " .pushsection __ex_table,\"a\"\n" \ --- 19 unchanged lines hidden (view full) --- 258 __get_user_asm_byte(__b1, __gu_addr, err); \ 259 __get_user_asm_byte(__b2, __gu_addr + 1, err); \ 260 (x) = (__b1 << 8) | __b2; \ 261}) 262#endif 263 264#define __get_user_asm_word(x,addr,err) \ 265 __asm__ __volatile__( \ | 231 "2:\n" \ 232 " .pushsection .fixup,\"ax\"\n" \ 233 " .align 2\n" \ 234 "3: mov %0, %3\n" \ 235 " mov %1, #0\n" \ 236 " b 2b\n" \ 237 " .popsection\n" \ 238 " .pushsection __ex_table,\"a\"\n" \ --- 19 unchanged lines hidden (view full) --- 258 __get_user_asm_byte(__b1, __gu_addr, err); \ 259 __get_user_asm_byte(__b2, __gu_addr + 1, err); \ 260 (x) = (__b1 << 8) | __b2; \ 261}) 262#endif 263 264#define __get_user_asm_word(x,addr,err) \ 265 __asm__ __volatile__( \ |
266 "1: ldrt %1,[%2]\n" \ | 266 "1: " T(ldr) " %1,[%2],#0\n" \ |
267 "2:\n" \ 268 " .pushsection .fixup,\"ax\"\n" \ 269 " .align 2\n" \ 270 "3: mov %0, %3\n" \ 271 " mov %1, #0\n" \ 272 " b 2b\n" \ 273 " .popsection\n" \ 274 " .pushsection __ex_table,\"a\"\n" \ --- 28 unchanged lines hidden (view full) --- 303 case 4: __put_user_asm_word(__pu_val,__pu_addr,err); break; \ 304 case 8: __put_user_asm_dword(__pu_val,__pu_addr,err); break; \ 305 default: __put_user_bad(); \ 306 } \ 307} while (0) 308 309#define __put_user_asm_byte(x,__pu_addr,err) \ 310 __asm__ __volatile__( \ | 267 "2:\n" \ 268 " .pushsection .fixup,\"ax\"\n" \ 269 " .align 2\n" \ 270 "3: mov %0, %3\n" \ 271 " mov %1, #0\n" \ 272 " b 2b\n" \ 273 " .popsection\n" \ 274 " .pushsection __ex_table,\"a\"\n" \ --- 28 unchanged lines hidden (view full) --- 303 case 4: __put_user_asm_word(__pu_val,__pu_addr,err); break; \ 304 case 8: __put_user_asm_dword(__pu_val,__pu_addr,err); break; \ 305 default: __put_user_bad(); \ 306 } \ 307} while (0) 308 309#define __put_user_asm_byte(x,__pu_addr,err) \ 310 __asm__ __volatile__( \ |
311 "1: strbt %1,[%2]\n" \ | 311 "1: " T(strb) " %1,[%2],#0\n" \ |
312 "2:\n" \ 313 " .pushsection .fixup,\"ax\"\n" \ 314 " .align 2\n" \ 315 "3: mov %0, %3\n" \ 316 " b 2b\n" \ 317 " .popsection\n" \ 318 " .pushsection __ex_table,\"a\"\n" \ 319 " .align 3\n" \ --- 16 unchanged lines hidden (view full) --- 336 unsigned long __temp = (unsigned long)(x); \ 337 __put_user_asm_byte(__temp >> 8, __pu_addr, err); \ 338 __put_user_asm_byte(__temp, __pu_addr + 1, err); \ 339}) 340#endif 341 342#define __put_user_asm_word(x,__pu_addr,err) \ 343 __asm__ __volatile__( \ | 312 "2:\n" \ 313 " .pushsection .fixup,\"ax\"\n" \ 314 " .align 2\n" \ 315 "3: mov %0, %3\n" \ 316 " b 2b\n" \ 317 " .popsection\n" \ 318 " .pushsection __ex_table,\"a\"\n" \ 319 " .align 3\n" \ --- 16 unchanged lines hidden (view full) --- 336 unsigned long __temp = (unsigned long)(x); \ 337 __put_user_asm_byte(__temp >> 8, __pu_addr, err); \ 338 __put_user_asm_byte(__temp, __pu_addr + 1, err); \ 339}) 340#endif 341 342#define __put_user_asm_word(x,__pu_addr,err) \ 343 __asm__ __volatile__( \ |
344 "1: strt %1,[%2]\n" \ | 344 "1: " T(str) " %1,[%2],#0\n" \ |
345 "2:\n" \ 346 " .pushsection .fixup,\"ax\"\n" \ 347 " .align 2\n" \ 348 "3: mov %0, %3\n" \ 349 " b 2b\n" \ 350 " .popsection\n" \ 351 " .pushsection __ex_table,\"a\"\n" \ 352 " .align 3\n" \ --- 8 unchanged lines hidden (view full) --- 361#define __reg_oper1 "%Q2" 362#else 363#define __reg_oper0 "%Q2" 364#define __reg_oper1 "%R2" 365#endif 366 367#define __put_user_asm_dword(x,__pu_addr,err) \ 368 __asm__ __volatile__( \ | 345 "2:\n" \ 346 " .pushsection .fixup,\"ax\"\n" \ 347 " .align 2\n" \ 348 "3: mov %0, %3\n" \ 349 " b 2b\n" \ 350 " .popsection\n" \ 351 " .pushsection __ex_table,\"a\"\n" \ 352 " .align 3\n" \ --- 8 unchanged lines hidden (view full) --- 361#define __reg_oper1 "%Q2" 362#else 363#define __reg_oper0 "%Q2" 364#define __reg_oper1 "%R2" 365#endif 366 367#define __put_user_asm_dword(x,__pu_addr,err) \ 368 __asm__ __volatile__( \ |
369 ARM( "1: strt " __reg_oper1 ", [%1], #4\n" ) \ 370 ARM( "2: strt " __reg_oper0 ", [%1]\n" ) \ 371 THUMB( "1: strt " __reg_oper1 ", [%1]\n" ) \ 372 THUMB( "2: strt " __reg_oper0 ", [%1, #4]\n" ) \ | 369 ARM( "1: " T(str) " " __reg_oper1 ", [%1], #4\n" ) \ 370 ARM( "2: " T(str) " " __reg_oper0 ", [%1]\n" ) \ 371 THUMB( "1: " T(str) " " __reg_oper1 ", [%1]\n" ) \ 372 THUMB( "2: " T(str) " " __reg_oper0 ", [%1, #4]\n" ) \ |
373 "3:\n" \ 374 " .pushsection .fixup,\"ax\"\n" \ 375 " .align 2\n" \ 376 "4: mov %0, %3\n" \ 377 " b 3b\n" \ 378 " .popsection\n" \ 379 " .pushsection __ex_table,\"a\"\n" \ 380 " .align 3\n" \ --- 70 unchanged lines hidden --- | 373 "3:\n" \ 374 " .pushsection .fixup,\"ax\"\n" \ 375 " .align 2\n" \ 376 "4: mov %0, %3\n" \ 377 " b 3b\n" \ 378 " .popsection\n" \ 379 " .pushsection __ex_table,\"a\"\n" \ 380 " .align 3\n" \ --- 70 unchanged lines hidden --- |