Commit 318947c6 authored by David Crawshaw's avatar David Crawshaw

syscall: use name+(NN)FP for darwin

Generated from a script using go vet then read by a human.

Change-Id: Ie5f7ab3a1075a9c8defbf5f827a8658e3eb55cab
Reviewed-on: https://go-review.googlesource.com/2746Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 9785a396
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
#include "textflag.h" #include "textflag.h"
#include "funcdata.h" #include "funcdata.h"
...@@ -18,34 +15,34 @@ ...@@ -18,34 +15,34 @@
TEXT ·Syscall(SB),NOSPLIT,$0-28 TEXT ·Syscall(SB),NOSPLIT,$0-28
CALL runtime·entersyscall(SB) CALL runtime·entersyscall(SB)
MOVL 4(SP), AX // syscall entry MOVL trap+0(FP), AX // syscall entry
// slide args down on top of system call number // slide args down on top of system call number
LEAL 8(SP), SI LEAL a1+4(FP), SI
LEAL 4(SP), DI LEAL trap+0(FP), DI
CLD CLD
MOVSL MOVSL
MOVSL MOVSL
MOVSL MOVSL
INT $0x80 INT $0x80
JAE ok JAE ok
MOVL $-1, 20(SP) // r1 MOVL $-1, r1+16(FP)
MOVL $-1, 24(SP) // r2 MOVL $-1, r2+20(FP)
MOVL AX, 28(SP) // errno MOVL AX, err+24(FP)
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
ok: ok:
MOVL AX, 20(SP) // r1 MOVL AX, r1+16(FP)
MOVL DX, 24(SP) // r2 MOVL DX, r2+20(FP)
MOVL $0, 28(SP) // errno MOVL $0, err+24(FP)
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
TEXT ·Syscall6(SB),NOSPLIT,$0-40 TEXT ·Syscall6(SB),NOSPLIT,$0-40
CALL runtime·entersyscall(SB) CALL runtime·entersyscall(SB)
MOVL 4(SP), AX // syscall entry MOVL trap+0(FP), AX // syscall entry
// slide args down on top of system call number // slide args down on top of system call number
LEAL 8(SP), SI LEAL a1+4(FP), SI
LEAL 4(SP), DI LEAL trap+0(FP), DI
CLD CLD
MOVSL MOVSL
MOVSL MOVSL
...@@ -55,24 +52,24 @@ TEXT ·Syscall6(SB),NOSPLIT,$0-40 ...@@ -55,24 +52,24 @@ TEXT ·Syscall6(SB),NOSPLIT,$0-40
MOVSL MOVSL
INT $0x80 INT $0x80
JAE ok6 JAE ok6
MOVL $-1, 32(SP) // r1 MOVL $-1, r1+28(FP)
MOVL $-1, 36(SP) // r2 MOVL $-1, r2+32(FP)
MOVL AX, 40(SP) // errno MOVL AX, err+36(FP)
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
ok6: ok6:
MOVL AX, 32(SP) // r1 MOVL AX, r1+28(FP)
MOVL DX, 36(SP) // r2 MOVL DX, r2+32(FP)
MOVL $0, 40(SP) // errno MOVL $0, err+36(FP)
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
TEXT ·Syscall9(SB),NOSPLIT,$0-52 TEXT ·Syscall9(SB),NOSPLIT,$0-52
CALL runtime·entersyscall(SB) CALL runtime·entersyscall(SB)
MOVL 4(SP), AX // syscall entry MOVL num+0(FP), AX // syscall entry
// slide args down on top of system call number // slide args down on top of system call number
LEAL 8(SP), SI LEAL a1+4(FP), SI
LEAL 4(SP), DI LEAL num+0(FP), DI
CLD CLD
MOVSL MOVSL
MOVSL MOVSL
...@@ -85,44 +82,44 @@ TEXT ·Syscall9(SB),NOSPLIT,$0-52 ...@@ -85,44 +82,44 @@ TEXT ·Syscall9(SB),NOSPLIT,$0-52
MOVSL MOVSL
INT $0x80 INT $0x80
JAE ok9 JAE ok9
MOVL $-1, 44(SP) // r1 MOVL $-1, r1+40(FP)
MOVL $-1, 48(SP) // r2 MOVL $-1, r2+44(FP)
MOVL AX, 52(SP) // errno MOVL AX, err+48(FP)
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
ok9: ok9:
MOVL AX, 44(SP) // r1 MOVL AX, r1+40(FP)
MOVL DX, 48(SP) // r2 MOVL DX, r2+44(FP)
MOVL $0, 52(SP) // errno MOVL $0, err+48(FP)
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
TEXT ·RawSyscall(SB),NOSPLIT,$0-28 TEXT ·RawSyscall(SB),NOSPLIT,$0-28
MOVL 4(SP), AX // syscall entry MOVL trap+0(FP), AX // syscall entry
// slide args down on top of system call number // slide args down on top of system call number
LEAL 8(SP), SI LEAL a1+4(FP), SI
LEAL 4(SP), DI LEAL trap+0(FP), DI
CLD CLD
MOVSL MOVSL
MOVSL MOVSL
MOVSL MOVSL
INT $0x80 INT $0x80
JAE ok1 JAE ok1
MOVL $-1, 20(SP) // r1 MOVL $-1, r1+16(FP)
MOVL $-1, 24(SP) // r2 MOVL $-1, r2+20(FP)
MOVL AX, 28(SP) // errno MOVL AX, err+24(FP)
RET RET
ok1: ok1:
MOVL AX, 20(SP) // r1 MOVL AX, r1+16(FP)
MOVL DX, 24(SP) // r2 MOVL DX, r2+20(FP)
MOVL $0, 28(SP) // errno MOVL $0, err+24(FP)
RET RET
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
MOVL 4(SP), AX // syscall entry MOVL trap+0(FP), AX // syscall entry
// slide args down on top of system call number // slide args down on top of system call number
LEAL 8(SP), SI LEAL a1+4(FP), SI
LEAL 4(SP), DI LEAL trap+0(FP), DI
CLD CLD
MOVSL MOVSL
MOVSL MOVSL
...@@ -132,12 +129,12 @@ TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 ...@@ -132,12 +129,12 @@ TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
MOVSL MOVSL
INT $0x80 INT $0x80
JAE ok2 JAE ok2
MOVL $-1, 32(SP) // r1 MOVL $-1, r1+28(FP)
MOVL $-1, 36(SP) // r2 MOVL $-1, r2+32(FP)
MOVL AX, 40(SP) // errno MOVL AX, err+36(FP)
RET RET
ok2: ok2:
MOVL AX, 32(SP) // r1 MOVL AX, r1+28(FP)
MOVL DX, 36(SP) // r2 MOVL DX, r2+32(FP)
MOVL $0, 40(SP) // errno MOVL $0, err+36(FP)
RET RET
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
#include "textflag.h" #include "textflag.h"
#include "funcdata.h" #include "funcdata.h"
...@@ -18,90 +15,90 @@ ...@@ -18,90 +15,90 @@
TEXT ·Syscall(SB),NOSPLIT,$0-56 TEXT ·Syscall(SB),NOSPLIT,$0-56
CALL runtime·entersyscall(SB) CALL runtime·entersyscall(SB)
MOVQ 16(SP), DI MOVQ a1+8(FP), DI
MOVQ 24(SP), SI MOVQ a2+16(FP), SI
MOVQ 32(SP), DX MOVQ a3+24(FP), DX
MOVQ $0, R10 MOVQ $0, R10
MOVQ $0, R8 MOVQ $0, R8
MOVQ $0, R9 MOVQ $0, R9
MOVQ 8(SP), AX // syscall entry MOVQ trap+0(FP), AX // syscall entry
ADDQ $0x2000000, AX ADDQ $0x2000000, AX
SYSCALL SYSCALL
JCC ok JCC ok
MOVQ $-1, 40(SP) // r1 MOVQ $-1, r1+32(FP)
MOVQ $0, 48(SP) // r2 MOVQ $0, r2+40(FP)
MOVQ AX, 56(SP) // errno MOVQ AX, err+48(FP)
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
ok: ok:
MOVQ AX, 40(SP) // r1 MOVQ AX, r1+32(FP)
MOVQ DX, 48(SP) // r2 MOVQ DX, r2+40(FP)
MOVQ $0, 56(SP) // errno MOVQ $0, err+48(FP)
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
TEXT ·Syscall6(SB),NOSPLIT,$0-80 TEXT ·Syscall6(SB),NOSPLIT,$0-80
CALL runtime·entersyscall(SB) CALL runtime·entersyscall(SB)
MOVQ 16(SP), DI MOVQ a1+8(FP), DI
MOVQ 24(SP), SI MOVQ a2+16(FP), SI
MOVQ 32(SP), DX MOVQ a3+24(FP), DX
MOVQ 40(SP), R10 MOVQ a4+32(FP), R10
MOVQ 48(SP), R8 MOVQ a5+40(FP), R8
MOVQ 56(SP), R9 MOVQ a6+48(FP), R9
MOVQ 8(SP), AX // syscall entry MOVQ trap+0(FP), AX // syscall entry
ADDQ $0x2000000, AX ADDQ $0x2000000, AX
SYSCALL SYSCALL
JCC ok6 JCC ok6
MOVQ $-1, 64(SP) // r1 MOVQ $-1, r1+56(FP)
MOVQ $0, 72(SP) // r2 MOVQ $0, r2+64(FP)
MOVQ AX, 80(SP) // errno MOVQ AX, err+72(FP)
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
ok6: ok6:
MOVQ AX, 64(SP) // r1 MOVQ AX, r1+56(FP)
MOVQ DX, 72(SP) // r2 MOVQ DX, r2+64(FP)
MOVQ $0, 80(SP) // errno MOVQ $0, err+72(FP)
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
TEXT ·RawSyscall(SB),NOSPLIT,$0-56 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
MOVQ 16(SP), DI MOVQ a1+8(FP), DI
MOVQ 24(SP), SI MOVQ a2+16(FP), SI
MOVQ 32(SP), DX MOVQ a3+24(FP), DX
MOVQ $0, R10 MOVQ $0, R10
MOVQ $0, R8 MOVQ $0, R8
MOVQ $0, R9 MOVQ $0, R9
MOVQ 8(SP), AX // syscall entry MOVQ trap+0(FP), AX // syscall entry
ADDQ $0x2000000, AX ADDQ $0x2000000, AX
SYSCALL SYSCALL
JCC ok1 JCC ok1
MOVQ $-1, 40(SP) // r1 MOVQ $-1, r1+32(FP)
MOVQ $0, 48(SP) // r2 MOVQ $0, r2+40(FP)
MOVQ AX, 56(SP) // errno MOVQ AX, err+48(FP)
RET RET
ok1: ok1:
MOVQ AX, 40(SP) // r1 MOVQ AX, r1+32(FP)
MOVQ DX, 48(SP) // r2 MOVQ DX, r2+40(FP)
MOVQ $0, 56(SP) // errno MOVQ $0, err+48(FP)
RET RET
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
MOVQ 16(SP), DI MOVQ a1+8(FP), DI
MOVQ 24(SP), SI MOVQ a2+16(FP), SI
MOVQ 32(SP), DX MOVQ a3+24(FP), DX
MOVQ 40(SP), R10 MOVQ a4+32(FP), R10
MOVQ 48(SP), R8 MOVQ a5+40(FP), R8
MOVQ 56(SP), R9 MOVQ a6+48(FP), R9
MOVQ 8(SP), AX // syscall entry MOVQ trap+0(FP), AX // syscall entry
ADDQ $0x2000000, AX ADDQ $0x2000000, AX
SYSCALL SYSCALL
JCC ok2 JCC ok2
MOVQ $-1, 64(SP) // r1 MOVQ $-1, r1+56(FP)
MOVQ $0, 72(SP) // r2 MOVQ $0, r2+64(FP)
MOVQ AX, 80(SP) // errno MOVQ AX, err+72(FP)
RET RET
ok2: ok2:
MOVQ AX, 64(SP) // r1 MOVQ AX, r1+56(FP)
MOVQ DX, 72(SP) // r2 MOVQ DX, r2+64(FP)
MOVQ $0, 80(SP) // errno MOVQ $0, err+72(FP)
RET RET
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment