Commit 33f95ec4 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

syscall: superficial cleanup of amd64 unix assembly

This is preliminary work to unifying them.

Updates #11041

Change-Id: Ibe83da3d626f1da9e8888e26cedd3af2152b42e6
Reviewed-on: https://go-review.googlesource.com/25114
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 856342d8
......@@ -14,18 +14,18 @@
// func Syscall(trap int64, a1, a2, a3 int64) (r1, r2, err int64);
// func Syscall6(trap int64, a1, a2, a3, a4, a5, a6 int64) (r1, r2, err int64);
// func Syscall9(trap int64, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int64)
// func Syscall9(trap int64, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int64);
// Trap # in AX, args in DI SI DX, return in AX DX
TEXT ·Syscall(SB),NOSPLIT,$0-56
CALL runtime·entersyscall(SB)
MOVQ 8(SP), AX // syscall entry
MOVQ 16(SP), DI
MOVQ 24(SP), SI
MOVQ 32(SP), DX
MOVQ $0, R10
MOVQ $0, R8
MOVQ $0, R9
MOVQ 8(SP), AX // syscall entry
SYSCALL
JCC ok
MOVQ $-1, 40(SP) // r1
......@@ -42,13 +42,13 @@ ok:
TEXT ·Syscall6(SB),NOSPLIT,$0-80
CALL runtime·entersyscall(SB)
MOVQ 8(SP), AX // syscall entry
MOVQ 16(SP), DI
MOVQ 24(SP), SI
MOVQ 32(SP), DX
MOVQ 40(SP), R10
MOVQ 48(SP), R8
MOVQ 56(SP), R9
MOVQ 8(SP), AX // syscall entry
SYSCALL
JCC ok6
MOVQ $-1, 64(SP) // r1
......@@ -65,7 +65,7 @@ ok6:
TEXT ·Syscall9(SB),NOSPLIT,$0-104
CALL runtime·entersyscall(SB)
MOVQ 8(SP), AX
MOVQ 8(SP), AX // syscall entry
MOVQ 16(SP), DI
MOVQ 24(SP), SI
MOVQ 32(SP), DX
......
......@@ -14,18 +14,18 @@
// func Syscall(trap int64, a1, a2, a3 int64) (r1, r2, err int64);
// func Syscall6(trap int64, a1, a2, a3, a4, a5, a6 int64) (r1, r2, err int64);
// func Syscall9(trap int64, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int64)
// func Syscall9(trap int64, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int64);
// Trap # in AX, args in DI SI DX, return in AX DX
TEXT ·Syscall(SB),NOSPLIT,$0-56
CALL runtime·entersyscall(SB)
MOVQ 8(SP), AX // syscall entry
MOVQ 16(SP), DI
MOVQ 24(SP), SI
MOVQ 32(SP), DX
MOVQ $0, R10
MOVQ $0, R8
MOVQ $0, R9
MOVQ 8(SP), AX // syscall entry
SYSCALL
JCC ok
MOVQ $-1, 40(SP) // r1
......@@ -42,13 +42,13 @@ ok:
TEXT ·Syscall6(SB),NOSPLIT,$0-80
CALL runtime·entersyscall(SB)
MOVQ 8(SP), AX // syscall entry
MOVQ 16(SP), DI
MOVQ 24(SP), SI
MOVQ 32(SP), DX
MOVQ 40(SP), R10
MOVQ 48(SP), R8
MOVQ 56(SP), R9
MOVQ 8(SP), AX // syscall entry
SYSCALL
JCC ok6
MOVQ $-1, 64(SP) // r1
......@@ -65,7 +65,7 @@ ok6:
TEXT ·Syscall9(SB),NOSPLIT,$0-104
CALL runtime·entersyscall(SB)
MOVQ 8(SP), AX
MOVQ 8(SP), AX // syscall entry
MOVQ 16(SP), DI
MOVQ 24(SP), SI
MOVQ 32(SP), DX
......
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