diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/amd64/SYS.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libc/amd64/SYS.h b/lib/libc/amd64/SYS.h index 1483f9d..5dc8b46 100644 --- a/lib/libc/amd64/SYS.h +++ b/lib/libc/amd64/SYS.h @@ -40,22 +40,19 @@ #include <sys/syscall.h> #include <machine/asm.h> -#define SYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \ +#define SYSCALL(x) 2: jmp PIC_PLT(HIDENAME(cerror)); \ ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(x); \ .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b + mov __CONCAT($SYS_,x),%rax; 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)); \ - mov __CONCAT($SYS_,x),%eax; KERNCALL; ret + mov __CONCAT($SYS_,x),%rax; 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 - -#define KERNCALL int $0x80 +#define KERNCALL movq %rcx, %r10; syscall |