diff options
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/brk.c | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sigaction.c | 11 |
2 files changed, 6 insertions, 16 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/brk.c b/sysdeps/unix/sysv/linux/i386/brk.c index 950144d41a..d99e7256d4 100644 --- a/sysdeps/unix/sysv/linux/i386/brk.c +++ b/sysdeps/unix/sysv/linux/i386/brk.c @@ -34,14 +34,9 @@ weak_alias (__curbrk, ___brk_addr) int __brk (void *addr) { - void *__unbounded newbrk, *__unbounded scratch; - - asm ("movl %%ebx, %1\n\t" /* Save %ebx in scratch register. */ - "movl %3, %%ebx\n\t" /* Put ADDR in %ebx to be syscall arg. */ - ENTER_KERNEL "\n\t" /* Perform the system call. */ - "movl %1, %%ebx" /* Restore %ebx from scratch register. */ - : "=a" (newbrk), "=r" (scratch) - : "0" (SYS_ify (brk)), "g" (__ptrvalue (addr))); + void *__unbounded newbrk; + + newbrk = INLINE_SYSCALL (brk, 1, __ptrvalue (addr)); __curbrk = newbrk; diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c index bfc8b2c2e2..9ee69e8054 100644 --- a/sysdeps/unix/sysv/linux/i386/sigaction.c +++ b/sysdeps/unix/sysv/linux/i386/sigaction.c @@ -131,14 +131,9 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) k_newact.sa_restorer = &restore; } - asm volatile ("pushl %%ebx\n\t" - "movl %2, %%ebx\n\t" - ENTER_KERNEL_STR "\n\t" - "popl %%ebx" - : "=a" (result) - : "0" (SYS_ify (sigaction)), "mr" (sig), - "c" (act ? __ptrvalue (&k_newact) : 0), - "d" (oact ? __ptrvalue (&k_oldact) : 0)); + result = INTERNAL_SYCALL (sigaction, 3, sig, + act ? __ptrvalue (&k_newact) : 0, + oact ? __ptrvalue (&k_oldact) : 0); if (result < 0) { |