diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-12-06 18:39:20 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-12-06 19:04:54 +0000 |
commit | 69843cf2425d133cf81b75de200da59d08914395 (patch) | |
tree | de837b2a3e632bb6f9bfab5dbe3acd4de3f7ab41 /sysdeps/unix/sysv/solaris2/kopensolaris-gnu | |
parent | b9f0c537009a3f3b1a7c1b1dc50df700906f564c (diff) | |
download | glibc-69843cf2425d133cf81b75de200da59d08914395.tar.gz |
Syscalls on x86_64
Diffstat (limited to 'sysdeps/unix/sysv/solaris2/kopensolaris-gnu')
-rw-r--r-- | sysdeps/unix/sysv/solaris2/kopensolaris-gnu/x86_64/sysdep.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/x86_64/sysdep.h b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/x86_64/sysdep.h index 31e36fd9a0..daafef283d 100644 --- a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/x86_64/sysdep.h +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/x86_64/sysdep.h @@ -281,11 +281,23 @@ # endif /* _LIBC_REENTRANT */ #endif /* PIC */ -/* TODO: use sysenter instead of int */ +/* + * See nice comment in sysdeps/unix/sysv/linux/x86_64/sysdep.h + * about registers usage in function calls and in syscalls. + */ #undef DO_CALL #define DO_CALL(syscall_name, args) \ + DOARGS_##args \ movl $SYS_ify (syscall_name), %eax; \ - int $0x91 + syscall + +# define DOARGS_0 /* nothing */ +# define DOARGS_1 /* nothing */ +# define DOARGS_2 /* nothing */ +# define DOARGS_3 /* nothing */ +# define DOARGS_4 movq %rcx, %r10; +# define DOARGS_5 DOARGS_4 +# define DOARGS_6 DOARGS_5 #else /* !__ASSEMBLER__ */ |