mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-06 09:07:16 -04:00
Revert "windows/mkwinsyscall: use syscall.SyscallN instead of syscall.Syscall{6,9,12,15}"
This reverts CL 614082. Reason for revert: syscall.SyscallN allocates more than its syscall.SyscallX counterparts, producing perf-related test failures across the board. Updates #70197 Change-Id: I51107d909fcdbef4e65ee3f84932b2a0e7804f1b Reviewed-on: https://go-review.googlesource.com/c/sys/+/625375 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
@@ -50,7 +50,7 @@ func TestDLLFilenameEscaping(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSyscallNGeneration(t *testing.T) {
|
||||
func TestSyscallXGeneration(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
wantsysfunc string
|
||||
@@ -58,17 +58,17 @@ func TestSyscallNGeneration(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "syscall with 2 params",
|
||||
wantsysfunc: "syscall.SyscallN",
|
||||
wantsysfunc: "syscall.Syscall",
|
||||
sig: "Example(a1 *uint16, a2 *uint16) = ",
|
||||
},
|
||||
{
|
||||
name: "syscall with 6 params",
|
||||
wantsysfunc: "syscall.SyscallN",
|
||||
wantsysfunc: "syscall.Syscall6",
|
||||
sig: "Example(a1 *uint, a2 *uint, a3 *uint, a4 *uint, a5 *uint, a6 *uint) = ",
|
||||
},
|
||||
{
|
||||
name: "syscall with 15 params",
|
||||
wantsysfunc: "syscall.SyscallN",
|
||||
wantsysfunc: "syscall.Syscall15",
|
||||
sig: strings.ReplaceAll(`Example(a1 *uint, a2 *uint, a3 *uint, a4 *uint, a5 *uint, a6 *uint,
|
||||
a7 *uint, a8 *uint, a9 *uint, a10 *uint, a11 *uint, a12 *uint,
|
||||
a13 *uint, a14 *uint, a15 *uint) = `, "\n", ""),
|
||||
|
||||
Reference in New Issue
Block a user