提交 268cf048 编写于 作者: G Glauber Costa 提交者: Ingo Molnar

x86: don't save ebx in putuser_32.S.

Clobber it in the inline asm macros, and let the compiler do this for us.
Signed-off-by: NGlauber Costa <gcosta@redhat.com>
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 6c2d4586
...@@ -26,14 +26,8 @@ ...@@ -26,14 +26,8 @@
*/ */
#define ENTER CFI_STARTPROC ; \ #define ENTER CFI_STARTPROC ; \
pushl %ebx ; \
CFI_ADJUST_CFA_OFFSET 4 ; \
CFI_REL_OFFSET ebx, 0 ; \
GET_THREAD_INFO(%ebx) GET_THREAD_INFO(%ebx)
#define EXIT popl %ebx ; \ #define EXIT ret ; \
CFI_ADJUST_CFA_OFFSET -4 ; \
CFI_RESTORE ebx ; \
ret ; \
CFI_ENDPROC CFI_ENDPROC
.text .text
...@@ -81,10 +75,7 @@ ENTRY(__put_user_8) ...@@ -81,10 +75,7 @@ ENTRY(__put_user_8)
ENDPROC(__put_user_8) ENDPROC(__put_user_8)
bad_put_user: bad_put_user:
CFI_STARTPROC simple CFI_STARTPROC
CFI_DEF_CFA esp, 2*4
CFI_OFFSET eip, -1*4
CFI_OFFSET ebx, -2*4
movl $-14,%eax movl $-14,%eax
EXIT EXIT
END(bad_put_user) END(bad_put_user)
......
...@@ -188,23 +188,23 @@ extern void __put_user_8(void); ...@@ -188,23 +188,23 @@ extern void __put_user_8(void);
#define __put_user_1(x, ptr) \ #define __put_user_1(x, ptr) \
asm volatile("call __put_user_1" : "=a" (__ret_pu) \ asm volatile("call __put_user_1" : "=a" (__ret_pu) \
: "0" ((typeof(*(ptr)))(x)), "c" (ptr)) : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
#define __put_user_2(x, ptr) \ #define __put_user_2(x, ptr) \
asm volatile("call __put_user_2" : "=a" (__ret_pu) \ asm volatile("call __put_user_2" : "=a" (__ret_pu) \
: "0" ((typeof(*(ptr)))(x)), "c" (ptr)) : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
#define __put_user_4(x, ptr) \ #define __put_user_4(x, ptr) \
asm volatile("call __put_user_4" : "=a" (__ret_pu) \ asm volatile("call __put_user_4" : "=a" (__ret_pu) \
: "0" ((typeof(*(ptr)))(x)), "c" (ptr)) : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
#define __put_user_8(x, ptr) \ #define __put_user_8(x, ptr) \
asm volatile("call __put_user_8" : "=a" (__ret_pu) \ asm volatile("call __put_user_8" : "=a" (__ret_pu) \
: "A" ((typeof(*(ptr)))(x)), "c" (ptr)) : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
#define __put_user_X(x, ptr) \ #define __put_user_X(x, ptr) \
asm volatile("call __put_user_X" : "=a" (__ret_pu) \ asm volatile("call __put_user_X" : "=a" (__ret_pu) \
: "c" (ptr)) : "c" (ptr): "ebx")
/** /**
* put_user: - Write a simple value into user space. * put_user: - Write a simple value into user space.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册