[PATCH] i386: Add dwarf2 annotations to *_user and checksum functions

Signed-off-by: Andi Kleen <ak@suse.de>
This commit is contained in:
Jan Beulich
2007-05-02 19:27:05 +02:00
committed by Andi Kleen
parent 3755090722
commit 00e065ea58
3 changed files with 102 additions and 32 deletions

View File

@@ -8,6 +8,8 @@
* return an error value in addition to the "real"
* return value.
*/
#include <linux/linkage.h>
#include <asm/dwarf2.h>
#include <asm/thread_info.h>
@@ -23,23 +25,28 @@
* as they get called from within inline assembly.
*/
#define ENTER pushl %ebx ; GET_THREAD_INFO(%ebx)
#define EXIT popl %ebx ; ret
#define ENTER CFI_STARTPROC ; \
pushl %ebx ; \
CFI_ADJUST_CFA_OFFSET 4 ; \
CFI_REL_OFFSET ebx, 0 ; \
GET_THREAD_INFO(%ebx)
#define EXIT popl %ebx ; \
CFI_ADJUST_CFA_OFFSET -4 ; \
CFI_RESTORE ebx ; \
ret ; \
CFI_ENDPROC
.text
.align 4
.globl __put_user_1
__put_user_1:
ENTRY(__put_user_1)
ENTER
cmpl TI_addr_limit(%ebx),%ecx
jae bad_put_user
1: movb %al,(%ecx)
xorl %eax,%eax
EXIT
ENDPROC(__put_user_1)
.align 4
.globl __put_user_2
__put_user_2:
ENTRY(__put_user_2)
ENTER
movl TI_addr_limit(%ebx),%ebx
subl $1,%ebx
@@ -48,10 +55,9 @@ __put_user_2:
2: movw %ax,(%ecx)
xorl %eax,%eax
EXIT
ENDPROC(__put_user_2)
.align 4
.globl __put_user_4
__put_user_4:
ENTRY(__put_user_4)
ENTER
movl TI_addr_limit(%ebx),%ebx
subl $3,%ebx
@@ -60,10 +66,9 @@ __put_user_4:
3: movl %eax,(%ecx)
xorl %eax,%eax
EXIT
ENDPROC(__put_user_4)
.align 4
.globl __put_user_8
__put_user_8:
ENTRY(__put_user_8)
ENTER
movl TI_addr_limit(%ebx),%ebx
subl $7,%ebx
@@ -73,10 +78,16 @@ __put_user_8:
5: movl %edx,4(%ecx)
xorl %eax,%eax
EXIT
ENDPROC(__put_user_8)
bad_put_user:
CFI_STARTPROC simple
CFI_DEF_CFA esp, 2*4
CFI_OFFSET eip, -1*4
CFI_OFFSET ebx, -2*4
movl $-14,%eax
EXIT
END(bad_put_user)
.section __ex_table,"a"
.long 1b,bad_put_user