// Exit this OS thread (like pthread_exit, which eventually
// calls __bsdthread_terminate).
-TEXT runtime·exit1(SB),NOSPLIT,$0
+TEXT runtime·exit1(SB),NOSPLIT,$16-0
+ // __bsdthread_terminate takes 4 word-size arguments.
+ // Set them all to 0. (None are an exit status.)
+ MOVL $0, 0(SP)
+ MOVL $0, 4(SP)
+ MOVL $0, 8(SP)
+ MOVL $0, 12(SP)
MOVL $361, AX
INT $0x80
JAE 2(PC)
// Exit this OS thread (like pthread_exit, which eventually
// calls __bsdthread_terminate).
TEXT runtime·exit1(SB),NOSPLIT,$0
- MOVL code+0(FP), DI // arg 1 exit status
+ // __bsdthread_terminate takes 4 word-size arguments.
+ // Set them all to 0. (None are an exit status.)
+ MOVL $0, DI
+ MOVL $0, SI
+ MOVL $0, DX
+ MOVL $0, R10
MOVL $(0x2000000+361), AX // syscall entry
SYSCALL
MOVL $0xf1, 0xf1 // crash
RET
+
+
TEXT runtime·open(SB),NOSPLIT,$0
MOVQ name+0(FP), DI // arg 1 pathname
MOVL mode+8(FP), SI // arg 2 flags
// Exit this OS thread (like pthread_exit, which eventually
// calls __bsdthread_terminate).
TEXT runtime·exit1(SB),NOSPLIT,$0
+ // __bsdthread_terminate takes 4 word-size arguments.
+ // Set them all to 0. (None are an exit status.)
+ MOVW $0, R0
+ MOVW $0, R1
+ MOVW $0, R2
+ MOVW $0, R3
MOVW $SYS_bsdthread_terminate, R12
SWI $0x80
MOVW $1234, R0
// Exit this OS thread (like pthread_exit, which eventually
// calls __bsdthread_terminate).
TEXT runtime·exit1(SB),NOSPLIT,$0
+ // __bsdthread_terminate takes 4 word-size arguments.
+ // Set them all to 0. (None are an exit status.)
+ MOVW $0, R0
+ MOVW $0, R1
+ MOVW $0, R2
+ MOVW $0, R3
MOVW $SYS_bsdthread_terminate, R16
SVC $0x80
MOVD $1234, R0