aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386/syscall.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/syscall.S')
-rw-r--r--sysdeps/unix/sysv/linux/i386/syscall.S14
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/syscall.S b/sysdeps/unix/sysv/linux/i386/syscall.S
index 6e6aa5d3c8..52eb48a9ae 100644
--- a/sysdeps/unix/sysv/linux/i386/syscall.S
+++ b/sysdeps/unix/sysv/linux/i386/syscall.S
@@ -18,14 +18,14 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-.globl syscall_error
+ .text
+ SYSCALL_ERROR_HANDLER /* Define error handler for PIC. */
ENTRY (syscall)
- popl %ecx /* Pop return address into %ecx. */
- popl %eax /* Pop syscall number into %eax. */
- pushl %ecx /* Push back return address. */
- DO_CALL (5) /* Frob the args and do the system call. */
- movl (%esp), %ecx
- pushl %ecx
+ PUSHARGS_5 /* Save register contents. */
+ _DOARGS_5(36) /* Load arguments. */
+ movl 16(%esp), %eax /* Load syscall number into %eax. */
+ int $0x80 /* Do the system call. */
+ POPARGS_5 /* Restore register contents. */
testl %eax, %eax /* Check %eax for error. */
jl JUMPTARGET(syscall_error) /* Jump to error handler if negative. */
ret /* Return to caller. */