mirror of
https://github.com/golang/go
synced 2024-11-22 00:04:41 -07:00
parent
68d5c51287
commit
6f91ba1b0f
@ -18,8 +18,8 @@ TEXT write(SB),7,$0
|
||||
SWI $SYS_write
|
||||
RET
|
||||
|
||||
TEXT exit(SB),7,$0
|
||||
// Exit value already in R0
|
||||
TEXT exit(SB),7,$-4
|
||||
MOVW 0(FP), R0
|
||||
SWI $SYS_exit
|
||||
|
||||
TEXT runtime·mmap(SB),7,$0
|
||||
|
@ -6,9 +6,6 @@
|
||||
// System calls for arm, Linux
|
||||
//
|
||||
|
||||
#define SYS_BASE 0x00900000
|
||||
#define SYS_syscall (SYS_BASE+113);
|
||||
|
||||
// TODO(kaib): handle error returns
|
||||
|
||||
// func Syscall(syscall uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
|
||||
@ -19,7 +16,7 @@ TEXT syscall·Syscall(SB),7,$0
|
||||
MOVW 8(SP), R0
|
||||
MOVW 12(SP), R1
|
||||
MOVW 16(SP), R2
|
||||
SWI $SYS_syscall
|
||||
SWI $0
|
||||
MOVW R0, 20(SP) // r1
|
||||
MOVW R1, 24(SP) // r2
|
||||
MOVW $0, R0
|
||||
@ -38,7 +35,7 @@ TEXT syscall·Syscall6(SB),7,$0
|
||||
MOVW 20(SP), R3
|
||||
MOVW 24(SP), R4
|
||||
MOVW 28(SP), R5
|
||||
SWI $SYS_syscall
|
||||
SWI $0
|
||||
MOVW R0, 32(SP) // r1
|
||||
MOVW R1, 36(SP) // r2
|
||||
MOVW $0, R0
|
||||
@ -52,7 +49,7 @@ TEXT syscall·RawSyscall(SB),7,$0
|
||||
MOVW 8(SP), R0
|
||||
MOVW 12(SP), R1
|
||||
MOVW 16(SP), R2
|
||||
SWI $SYS_syscall
|
||||
SWI $0
|
||||
MOVW R0, 20(SP) // r1
|
||||
MOVW R1, 24(SP) // r2
|
||||
MOVW $0, R0
|
||||
|
@ -3,9 +3,7 @@
|
||||
package syscall
|
||||
|
||||
const (
|
||||
SYS_SYSCALL_BASE = 0x900000;
|
||||
// for thumb and eabi
|
||||
//SYS_SYSCALL_BASE = 0;
|
||||
SYS_SYSCALL_BASE = 0;
|
||||
|
||||
SYS_RESTART_SYSCALL = (SYS_SYSCALL_BASE + 0);
|
||||
SYS_EXIT = (SYS_SYSCALL_BASE + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user