Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305457
b: refs/heads/master
c: 535c0c3
h: refs/heads/master
i:
  305455: 63ab68e
v: v3
  • Loading branch information
H. Peter Anvin committed Apr 20, 2012
1 parent 28551fa commit c8fd2da
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a3e859fed1244b72253718e076a724ffe13a9584
refs/heads/master: 535c0c34698061544f81a51c65fc51f4eeeebff6
28 changes: 20 additions & 8 deletions trunk/arch/x86/include/asm/asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,28 @@

/* Exception table entry */
#ifdef __ASSEMBLY__
# define _ASM_EXTABLE(from,to) \
.pushsection "__ex_table","a" ; \
_ASM_ALIGN ; \
_ASM_PTR from , to ; \
# define _ASM_EXTABLE(from,to) \
.pushsection "__ex_table","a" ; \
_ASM_ALIGN ; \
_ASM_PTR from , to ; \
.popsection

# define _ASM_EXTABLE_EX(from,to) \
.pushsection "__ex_table","a" ; \
_ASM_ALIGN ; \
_ASM_PTR from , (to) - (from) ; \
.popsection
#else
# define _ASM_EXTABLE(from,to) \
" .pushsection \"__ex_table\",\"a\"\n" \
_ASM_ALIGN "\n" \
_ASM_PTR #from "," #to "\n" \
# define _ASM_EXTABLE(from,to) \
" .pushsection \"__ex_table\",\"a\"\n" \
_ASM_ALIGN "\n" \
_ASM_PTR #from "," #to "\n" \
" .popsection\n"

# define _ASM_EXTABLE_EX(from,to) \
" .pushsection \"__ex_table\",\"a\"\n" \
_ASM_ALIGN "\n" \
_ASM_PTR #from ",(" #to ")-(" #from ")\n" \
" .popsection\n"
#endif

Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/x86/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ extern int __get_user_bad(void);
asm volatile("1: movl %%eax,0(%1)\n" \
"2: movl %%edx,4(%1)\n" \
"3:\n" \
_ASM_EXTABLE(1b, 2b - 1b) \
_ASM_EXTABLE(2b, 3b - 2b) \
_ASM_EXTABLE_EX(1b, 2b) \
_ASM_EXTABLE_EX(2b, 3b) \
: : "A" (x), "r" (addr))

#define __put_user_x8(x, ptr, __ret_pu) \
Expand Down Expand Up @@ -408,7 +408,7 @@ do { \
#define __get_user_asm_ex(x, addr, itype, rtype, ltype) \
asm volatile("1: mov"itype" %1,%"rtype"0\n" \
"2:\n" \
_ASM_EXTABLE(1b, 2b - 1b) \
_ASM_EXTABLE_EX(1b, 2b) \
: ltype(x) : "m" (__m(addr)))

#define __put_user_nocheck(x, ptr, size) \
Expand Down Expand Up @@ -450,7 +450,7 @@ struct __large_struct { unsigned long buf[100]; };
#define __put_user_asm_ex(x, addr, itype, rtype, ltype) \
asm volatile("1: mov"itype" %"rtype"0,%1\n" \
"2:\n" \
_ASM_EXTABLE(1b, 2b - 1b) \
_ASM_EXTABLE_EX(1b, 2b) \
: : ltype(x), "m" (__m(addr)))

/*
Expand Down

0 comments on commit c8fd2da

Please sign in to comment.