PureGo Version
v0.10.2
Operating System
Go Version (go version)
1.26.5
What steps will reproduce the problem?
Run any example on ARMv5 CPU without FPU. I.e. Marwell Kirkwood which is used on NASes.
What is the expected result?
Examples are crashing with SIGILL
What happens instead?
Everything works, functions containing float32/64 arguments and return values can be called via RegisterFunc/RegisterCallback.
Anything else you feel useful to add?
Reason: all assembly trampolines in purego for 'arm' are unconditionally saving/restoring FP registers. Go runtime has special variable goarmsoftfp to detect soft-float usage and skip FP-related instructions.
Linux/ARM declared as Tier 2 supported target in README and IMHO should be supported equal to Go itself: recognize soft-float usage and act properly.
PureGo Version
v0.10.2
Operating System
Go Version (
go version)1.26.5
What steps will reproduce the problem?
Run any example on ARMv5 CPU without FPU. I.e. Marwell Kirkwood which is used on NASes.
What is the expected result?
Examples are crashing with SIGILL
What happens instead?
Everything works, functions containing float32/64 arguments and return values can be called via RegisterFunc/RegisterCallback.
Anything else you feel useful to add?
Reason: all assembly trampolines in purego for 'arm' are unconditionally saving/restoring FP registers. Go runtime has special variable
goarmsoftfpto detect soft-float usage and skip FP-related instructions.Linux/ARM declared as Tier 2 supported target in README and IMHO should be supported equal to Go itself: recognize soft-float usage and act properly.