1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: 2025 The Ebitengine Authors
3
4package purego
5
6import (
7 "reflect"
8 "unsafe"
9)
10
11func addStruct(v reflect.Value, numInts, numFloats, numStack *int, addInt, addFloat, addStack func(uintptr), keepAlive []any) []any {
12 panic("purego: struct arguments are not supported")
13}
14
15func getStruct(outType reflect.Type, syscall syscall15Args) (v reflect.Value) {
16 panic("purego: struct returns are not supported")
17}
18
19func placeRegisters(v reflect.Value, addFloat func(uintptr), addInt func(uintptr)) {
20 panic("purego: placeRegisters not implemented on 386")
21}
22
23// shouldBundleStackArgs always returns false on 386
24// since C-style stack argument bundling is only needed on Darwin ARM64.
25func shouldBundleStackArgs(v reflect.Value, numInts, numFloats int) bool {
26 return false
27}
28
29// structFitsInRegisters is not used on 386.
30func structFitsInRegisters(val reflect.Value, tempNumInts, tempNumFloats int) (bool, int, int) {
31 panic("purego: structFitsInRegisters should not be called on 386")
32}
33
34// collectStackArgs is not used on 386.
35func collectStackArgs(args []reflect.Value, startIdx int, numInts, numFloats int,
36 keepAlive []any, addInt, addFloat, addStack func(uintptr),
37 pNumInts, pNumFloats, pNumStack *int) ([]reflect.Value, []any) {
38 panic("purego: collectStackArgs should not be called on 386")
39}
40
41// bundleStackArgs is not used on 386.
42func bundleStackArgs(stackArgs []reflect.Value, addStack func(uintptr)) {
43 panic("purego: bundleStackArgs should not be called on 386")
44}
45
46func getCallbackStruct(inType reflect.Type, frame unsafe.Pointer, floatsN *int, intsN *int, stackSlot *int, stackByteOffset *uintptr) reflect.Value {
47 panic("purego: struct callback arguments are not supported on 386")
48}
49
50func setStruct(a *callbackArgs, ret reflect.Value) {
51 panic("purego: struct returns are not supported on 386")
52}