struct_386.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // SPDX-License-Identifier: Apache-2.0
  2. // SPDX-FileCopyrightText: 2025 The Ebitengine Authors
  3. package purego
  4. import "reflect"
  5. func addStruct(v reflect.Value, numInts, numFloats, numStack *int, addInt, addFloat, addStack func(uintptr), keepAlive []any) []any {
  6. panic("purego: struct arguments are not supported")
  7. }
  8. func getStruct(outType reflect.Type, syscall syscall15Args) (v reflect.Value) {
  9. panic("purego: struct returns are not supported")
  10. }
  11. func placeRegisters(v reflect.Value, addFloat func(uintptr), addInt func(uintptr)) {
  12. panic("purego: placeRegisters not implemented on 386")
  13. }
  14. // shouldBundleStackArgs always returns false on 386
  15. // since C-style stack argument bundling is only needed on Darwin ARM64.
  16. func shouldBundleStackArgs(v reflect.Value, numInts, numFloats int) bool {
  17. return false
  18. }
  19. // structFitsInRegisters is not used on 386.
  20. func structFitsInRegisters(val reflect.Value, tempNumInts, tempNumFloats int) (bool, int, int) {
  21. panic("purego: structFitsInRegisters should not be called on 386")
  22. }
  23. // collectStackArgs is not used on 386.
  24. func collectStackArgs(args []reflect.Value, startIdx int, numInts, numFloats int,
  25. keepAlive []any, addInt, addFloat, addStack func(uintptr),
  26. pNumInts, pNumFloats, pNumStack *int) ([]reflect.Value, []any) {
  27. panic("purego: collectStackArgs should not be called on 386")
  28. }
  29. // bundleStackArgs is not used on 386.
  30. func bundleStackArgs(stackArgs []reflect.Value, addStack func(uintptr)) {
  31. panic("purego: bundleStackArgs should not be called on 386")
  32. }