diff options
| author | David Chase <drchase@google.com> | 2023-04-25 19:14:05 -0400 |
|---|---|---|
| committer | David Chase <drchase@google.com> | 2023-05-11 13:45:40 +0000 |
| commit | 2e93fe0a9f55aaa2a762e7fb454d76b2ee3a4e4f (patch) | |
| tree | 6ad00fee3adb58714aa001ece696eeebeb2b5087 /src/runtime/syscall_windows.go | |
| parent | a2838ec5f20b56e94a18c873ab4b68397355e214 (diff) | |
| download | go-2e93fe0a9f55aaa2a762e7fb454d76b2ee3a4e4f.tar.xz | |
runtime: move per-type types to internal/abi
Change-Id: I1f031f0f83a94bebe41d3978a91a903dc5bcda66
Reviewed-on: https://go-review.googlesource.com/c/go/+/489276
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/syscall_windows.go')
| -rw-r--r-- | src/runtime/syscall_windows.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/runtime/syscall_windows.go b/src/runtime/syscall_windows.go index 352a007e32..ba88e93d7d 100644 --- a/src/runtime/syscall_windows.go +++ b/src/runtime/syscall_windows.go @@ -186,13 +186,13 @@ func (p *abiDesc) tryRegAssignArg(t *_type, offset uintptr) bool { case kindArray: at := (*arraytype)(unsafe.Pointer(t)) if at.Len == 1 { - return p.tryRegAssignArg((*_type)(unsafe.Pointer(at.Elem)), offset) // TODO fix when runtime is fully commoned up w/ abi.Type + return p.tryRegAssignArg(at.Elem, offset) // TODO fix when runtime is fully commoned up w/ abi.Type } case kindStruct: st := (*structtype)(unsafe.Pointer(t)) - for i := range st.fields { - f := &st.fields[i] - if !p.tryRegAssignArg(f.typ, offset+f.offset) { + for i := range st.Fields { + f := &st.Fields[i] + if !p.tryRegAssignArg(f.Typ, offset+f.Offset) { return false } } @@ -276,7 +276,7 @@ func compileCallback(fn eface, cdecl bool) (code uintptr) { // Check arguments and construct ABI translation. var abiMap abiDesc - for _, t := range ft.in() { + for _, t := range ft.InSlice() { abiMap.assignArg(t) } // The Go ABI aligns the result to the word size. src is @@ -284,13 +284,13 @@ func compileCallback(fn eface, cdecl bool) (code uintptr) { abiMap.dstStackSize = alignUp(abiMap.dstStackSize, goarch.PtrSize) abiMap.retOffset = abiMap.dstStackSize - if len(ft.out()) != 1 { + if len(ft.OutSlice()) != 1 { panic("compileCallback: expected function with one uintptr-sized result") } - if ft.out()[0].Size_ != goarch.PtrSize { + if ft.OutSlice()[0].Size_ != goarch.PtrSize { panic("compileCallback: expected function with one uintptr-sized result") } - if k := ft.out()[0].Kind_ & kindMask; k == kindFloat32 || k == kindFloat64 { + if k := ft.OutSlice()[0].Kind_ & kindMask; k == kindFloat32 || k == kindFloat64 { // In cdecl and stdcall, float results are returned in // ST(0). In fastcall, they're returned in XMM0. // Either way, it's not AX. |
