diff options
| author | Elliott Hughes <enh@google.com> | 2014-02-19 16:53:20 -0800 |
|---|---|---|
| committer | Elliott Hughes <enh@google.com> | 2014-02-20 13:51:26 -0800 |
| commit | 851e68a2402fa414544e66650e09dfdaac813e51 (patch) | |
| tree | baec353c8e9b6f24e885459b20a8748fc5c39468 /libc/arch-mips/bionic/__bionic_clone.S | |
| parent | 22c6b7ffd36fe8b34b677eea94d00aef2624e4e8 (diff) | |
| download | bionic-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/__bionic_clone.S')
| -rw-r--r-- | libc/arch-mips/bionic/__bionic_clone.S | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/libc/arch-mips/bionic/__bionic_clone.S b/libc/arch-mips/bionic/__bionic_clone.S index 8970b6e..9273134 100644 --- a/libc/arch-mips/bionic/__bionic_clone.S +++ b/libc/arch-mips/bionic/__bionic_clone.S @@ -26,49 +26,43 @@ * SUCH DAMAGE. */ -#include <asm/unistd.h> +#include <private/bionic_asm.h> #include <linux/errno.h> #include <linux/sched.h> // pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg); - .text - .type __bionic_clone, @function - .global __bionic_clone - .align 4 - .ent __bionic_clone -__bionic_clone: +ENTRY(__bionic_clone) .set noreorder - .cpload $t9 + .cpload t9 .set reorder # set up child stack - subu $a1,16 - lw $t0,20($sp) # fn - lw $t1,24($sp) # arg - sw $t0,0($a1) # fn - sw $t1,4($a1) # arg + subu a1,16 + lw t0,20(sp) # fn + lw t1,24(sp) # arg + sw t0,0(a1) # fn + sw t1,4(a1) # arg # remainder of arguments are correct for clone system call - li $v0,__NR_clone + li v0,__NR_clone syscall - bnez $a3,.L__error_bc + bnez a3,.L__error_bc - beqz $v0,.L__thread_start_bc + beqz v0,.L__thread_start_bc - j $ra + j ra .L__thread_start_bc: - lw $a0,0($sp) # fn - lw $a1,4($sp) # arg + lw a0,0(sp) # fn + lw a1,4(sp) # arg # void __bionic_clone_entry(int (*func)(void*), void *arg) - la $t9,__bionic_clone_entry - j $t9 + la t9,__bionic_clone_entry + j t9 .L__error_bc: - move $a0,$v0 - la $t9,__set_errno - j $t9 - - .end __bionic_clone + move a0,v0 + la t9,__set_errno + j t9 +END(__bionic_clone) |
