summaryrefslogtreecommitdiffstats
path: root/libc/arch-mips/bionic/syscall.S
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-02-19 16:53:20 -0800
committerElliott Hughes <enh@google.com>2014-02-20 13:51:26 -0800
commit851e68a2402fa414544e66650e09dfdaac813e51 (patch)
treebaec353c8e9b6f24e885459b20a8748fc5c39468 /libc/arch-mips/bionic/syscall.S
parent22c6b7ffd36fe8b34b677eea94d00aef2624e4e8 (diff)
downloadbionic-851e68a2402fa414544e66650e09dfdaac813e51.zip
bionic-851e68a2402fa414544e66650e09dfdaac813e51.tar.gz
bionic-851e68a2402fa414544e66650e09dfdaac813e51.tar.bz2
Unify our assembler macros.
Our <machine/asm.h> files were modified from upstream, to the extent that no architecture was actually using the upstream ENTRY or END macros, assuming that architecture even had such a macro upstream. This patch moves everyone to the same macros, with just a few tweaks remaining in the <machine/asm.h> files, which no one should now use directly. I've removed most of the unused cruft from the <machine/asm.h> files, though there's still rather a lot in the mips/mips64 ones. Bug: 12229603 Change-Id: I2fff287dc571ac1087abe9070362fb9420d85d6d
Diffstat (limited to 'libc/arch-mips/bionic/syscall.S')
-rw-r--r--libc/arch-mips/bionic/syscall.S44
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..db477a5 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
+ j t9
nop
.set reorder
- .end syscall
+END(syscall)