Use 'mov' instead of 'lea' for setting the syscall number in %eax as that
is clearer about what we are actually doing. Requested by: bde
This commit is contained in:
parent
2e6c92ffce
commit
a1d8094b9e
@ -47,14 +47,14 @@
|
||||
.set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
|
||||
.weak CNAME(__CONCAT(_,x)); \
|
||||
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
|
||||
lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
|
||||
mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b
|
||||
|
||||
#define RSYSCALL(x) SYSCALL(x); ret
|
||||
|
||||
#define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \
|
||||
.weak CNAME(__CONCAT(_,x)); \
|
||||
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
|
||||
lea __CONCAT(SYS_,x), %eax; KERNCALL; ret
|
||||
mov __CONCAT($SYS_,x),%eax; KERNCALL; ret
|
||||
|
||||
/* gas messes up offset -- although we don't currently need it, do for BCS */
|
||||
#define LCALL(x,y) .byte 0x9a ; .long y; .word x
|
||||
|
@ -58,7 +58,7 @@ ENTRY(brk)
|
||||
movl (%ecx),%eax
|
||||
movl %eax,4(%esp)
|
||||
ok:
|
||||
lea SYS_break,%eax
|
||||
mov $SYS_break,%eax
|
||||
KERNCALL
|
||||
jb err
|
||||
movl 4(%esp),%eax
|
||||
@ -77,7 +77,7 @@ err:
|
||||
movl HIDENAME(minbrk),%eax
|
||||
movl %eax,4(%esp)
|
||||
ok:
|
||||
lea SYS_break,%eax
|
||||
mov $SYS_break,%eax
|
||||
KERNCALL
|
||||
jb err
|
||||
movl 4(%esp),%eax
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <machine/psl.h>
|
||||
|
||||
ENTRY(exect)
|
||||
lea SYS_execve,%eax
|
||||
mov $SYS_execve,%eax
|
||||
pushf
|
||||
popl %edx
|
||||
orl $ PSL_T,%edx
|
||||
|
@ -51,7 +51,7 @@ ENTRY(ptrace)
|
||||
#else
|
||||
movl %eax,CNAME(errno)
|
||||
#endif
|
||||
lea SYS_ptrace,%eax
|
||||
mov $SYS_ptrace,%eax
|
||||
KERNCALL
|
||||
jb err
|
||||
ret
|
||||
|
@ -60,7 +60,7 @@ ENTRY(sbrk)
|
||||
testl %ecx,%ecx
|
||||
jz back
|
||||
addl %eax,4(%esp)
|
||||
lea SYS_break,%eax
|
||||
mov $SYS_break,%eax
|
||||
KERNCALL
|
||||
jb err
|
||||
PIC_PROLOGUE
|
||||
@ -81,7 +81,7 @@ err:
|
||||
testl %ecx,%ecx
|
||||
jz back
|
||||
addl %eax,4(%esp)
|
||||
lea SYS_break,%eax
|
||||
mov $SYS_break,%eax
|
||||
KERNCALL
|
||||
jb err
|
||||
movl HIDENAME(curbrk),%eax
|
||||
|
@ -47,7 +47,7 @@
|
||||
.set vfork,__sys_vfork
|
||||
ENTRY(__sys_vfork)
|
||||
popl %ecx /* my rta into ecx */
|
||||
lea SYS_vfork,%eax
|
||||
mov $SYS_vfork,%eax
|
||||
KERNCALL
|
||||
jb 1f
|
||||
jmp *%ecx
|
||||
|
@ -47,14 +47,14 @@
|
||||
.set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
|
||||
.weak CNAME(__CONCAT(_,x)); \
|
||||
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
|
||||
lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
|
||||
mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b
|
||||
|
||||
#define RSYSCALL(x) SYSCALL(x); ret
|
||||
|
||||
#define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \
|
||||
.weak CNAME(__CONCAT(_,x)); \
|
||||
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
|
||||
lea __CONCAT(SYS_,x), %eax; KERNCALL; ret
|
||||
mov __CONCAT($SYS_,x),%eax; KERNCALL; ret
|
||||
|
||||
/* gas messes up offset -- although we don't currently need it, do for BCS */
|
||||
#define LCALL(x,y) .byte 0x9a ; .long y; .word x
|
||||
|
@ -65,7 +65,7 @@ ENTRY(rfork_thread)
|
||||
*/
|
||||
pushl 8(%ebp)
|
||||
pushl $0
|
||||
leal SYS_rfork, %eax
|
||||
movl $SYS_rfork, %eax
|
||||
KERNCALL
|
||||
jb 2f
|
||||
|
||||
@ -98,9 +98,9 @@ ENTRY(rfork_thread)
|
||||
pushl %eax
|
||||
pushl $0
|
||||
#ifdef SYS_exit
|
||||
leal SYS_exit, %eax
|
||||
movl $SYS_exit, %eax
|
||||
#else
|
||||
leal SYS_sys_exit, %eax
|
||||
movl $SYS_sys_exit, %eax
|
||||
#endif
|
||||
KERNCALL
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
.set vfork,__sys_vfork
|
||||
ENTRY(__sys_vfork)
|
||||
popl %ecx /* my rta into ecx */
|
||||
lea SYS_vfork,%eax
|
||||
mov $SYS_vfork,%eax
|
||||
KERNCALL
|
||||
jb 1f
|
||||
jmp *%ecx
|
||||
|
@ -58,7 +58,7 @@ ENTRY(brk)
|
||||
movl (%ecx),%eax
|
||||
movl %eax,4(%esp)
|
||||
ok:
|
||||
lea SYS_break,%eax
|
||||
mov $SYS_break,%eax
|
||||
KERNCALL
|
||||
jb err
|
||||
movl 4(%esp),%eax
|
||||
@ -77,7 +77,7 @@ err:
|
||||
movl HIDENAME(minbrk),%eax
|
||||
movl %eax,4(%esp)
|
||||
ok:
|
||||
lea SYS_break,%eax
|
||||
mov $SYS_break,%eax
|
||||
KERNCALL
|
||||
jb err
|
||||
movl 4(%esp),%eax
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <machine/psl.h>
|
||||
|
||||
ENTRY(exect)
|
||||
lea SYS_execve,%eax
|
||||
mov $SYS_execve,%eax
|
||||
pushf
|
||||
popl %edx
|
||||
orl $ PSL_T,%edx
|
||||
|
@ -51,7 +51,7 @@ ENTRY(ptrace)
|
||||
#else
|
||||
movl %eax,CNAME(errno)
|
||||
#endif
|
||||
lea SYS_ptrace,%eax
|
||||
mov $SYS_ptrace,%eax
|
||||
KERNCALL
|
||||
jb err
|
||||
ret
|
||||
|
@ -60,7 +60,7 @@ ENTRY(sbrk)
|
||||
testl %ecx,%ecx
|
||||
jz back
|
||||
addl %eax,4(%esp)
|
||||
lea SYS_break,%eax
|
||||
mov $SYS_break,%eax
|
||||
KERNCALL
|
||||
jb err
|
||||
PIC_PROLOGUE
|
||||
@ -81,7 +81,7 @@ err:
|
||||
testl %ecx,%ecx
|
||||
jz back
|
||||
addl %eax,4(%esp)
|
||||
lea SYS_break,%eax
|
||||
mov $SYS_break,%eax
|
||||
KERNCALL
|
||||
jb err
|
||||
movl HIDENAME(curbrk),%eax
|
||||
|
Loading…
x
Reference in New Issue
Block a user