diff options
Diffstat (limited to 'libc/arch-mips/bionic/syscall.S')
-rw-r--r-- | libc/arch-mips/bionic/syscall.S | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/libc/arch-mips/bionic/syscall.S b/libc/arch-mips/bionic/syscall.S index af5bcc9..5fed0ac 100644 --- a/libc/arch-mips/bionic/syscall.S +++ b/libc/arch-mips/bionic/syscall.S @@ -26,11 +26,7 @@ * SUCH DAMAGE. */ -#include <asm/unistd.h> - .text - .globl syscall - .align 4 - .ent syscall +#include <private/bionic_asm.h> /* * The caller is only required to allocate 16 bytes of stack for a0-a3. @@ -38,28 +34,28 @@ */ #define STACKSIZE 2*4 -syscall: +ENTRY(syscall) .set noreorder - .cpload $t9 - move $v0, $a0 - move $a0, $a1 - move $a1, $a2 - move $a2, $a3 - lw $a3, 16($sp) - lw $t0, 20($sp) - lw $t1, 24($sp) - subu $sp, STACKSIZE - sw $t0, 16($sp) - sw $t1, 20($sp) + .cpload t9 + move v0, a0 + move a0, a1 + move a1, a2 + move a2, a3 + lw a3, 16(sp) + lw t0, 20(sp) + lw t1, 24(sp) + subu sp, STACKSIZE + sw t0, 16(sp) + sw t1, 20(sp) syscall - addu $sp, STACKSIZE - bnez $a3, 1f - move $a0, $v0 - j $ra + addu sp, STACKSIZE + bnez a3, 1f + move a0, v0 + j ra nop 1: - la $t9,__set_errno - j $t9 + la t9,__set_errno_internal + j t9 nop .set reorder - .end syscall +END(syscall) |