Commit 856342d8 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

syscall: fix dragonfly/amd64 assembly argument sizes

This is preliminary work to unifying the
unix amd64 assembly implementations,
which is preliminary work to making the
assembly vet-friendly.

Updates #11041

Change-Id: Ic64985124f8fb86cc08898be2ec7fca972ced4ca
Reviewed-on: https://go-review.googlesource.com/25113
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent b173298c
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
// 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"
...@@ -14,7 +17,7 @@ ...@@ -14,7 +17,7 @@
// 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 // Trap # in AX, args in DI SI DX, return in AX DX
TEXT ·Syscall(SB),NOSPLIT,$0-64 TEXT ·Syscall(SB),NOSPLIT,$0-56
CALL runtime·entersyscall(SB) CALL runtime·entersyscall(SB)
MOVQ 16(SP), DI MOVQ 16(SP), DI
MOVQ 24(SP), SI MOVQ 24(SP), SI
...@@ -37,7 +40,7 @@ ok: ...@@ -37,7 +40,7 @@ ok:
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
TEXT ·Syscall6(SB),NOSPLIT,$0-88 TEXT ·Syscall6(SB),NOSPLIT,$0-80
CALL runtime·entersyscall(SB) CALL runtime·entersyscall(SB)
MOVQ 16(SP), DI MOVQ 16(SP), DI
MOVQ 24(SP), SI MOVQ 24(SP), SI
...@@ -60,7 +63,7 @@ ok6: ...@@ -60,7 +63,7 @@ ok6:
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
TEXT ·Syscall9(SB),NOSPLIT,$0-112 TEXT ·Syscall9(SB),NOSPLIT,$0-104
CALL runtime·entersyscall(SB) CALL runtime·entersyscall(SB)
MOVQ 8(SP), AX MOVQ 8(SP), AX
MOVQ 16(SP), DI MOVQ 16(SP), DI
...@@ -93,7 +96,7 @@ ok9: ...@@ -93,7 +96,7 @@ ok9:
CALL runtime·exitsyscall(SB) CALL runtime·exitsyscall(SB)
RET RET
TEXT ·RawSyscall(SB),NOSPLIT,$0-64 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
MOVQ 16(SP), DI MOVQ 16(SP), DI
MOVQ 24(SP), SI MOVQ 24(SP), SI
MOVQ 32(SP), DX MOVQ 32(SP), DX
...@@ -113,7 +116,7 @@ ok1: ...@@ -113,7 +116,7 @@ ok1:
MOVQ $0, 56(SP) // errno MOVQ $0, 56(SP) // errno
RET RET
TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
MOVQ 16(SP), DI MOVQ 16(SP), DI
MOVQ 24(SP), SI MOVQ 24(SP), SI
MOVQ 32(SP), DX 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