arm64: fix register save/restore to include vector registers

Some vector registers must be preserved across calls, but this wasn't
happening on Linux and MacOS. When I added support for windows/arm64, I
saw that it required these vector registers to be preserved and assumed
this was Windows deviating from the standard calling convention. But
actually, Windows was just implementing the standard calling convention
and the bug was on Linux and MacOS.

This commit fixes the bug on Linux and MacOS and at the same time merges
the Go and assembly files as they no longer need to be separate.
This commit is contained in:
Ayke van Laethem
2023-02-19 17:07:40 +01:00
committed by Ron Evans
parent f41b6a3b96
commit cce9c6d5a1
7 changed files with 29 additions and 187 deletions
+10 -2
View File
@@ -1,4 +1,4 @@
//go:build scheduler.tasks && arm64 && !windows
//go:build scheduler.tasks && arm64
package task
@@ -21,8 +21,16 @@ type calleeSavedRegs struct {
x27 uintptr
x28 uintptr
x29 uintptr
pc uintptr // aka x30 aka LR
pc uintptr // aka x30 aka LR
d8 uintptr
d9 uintptr
d10 uintptr
d11 uintptr
d12 uintptr
d13 uintptr
d14 uintptr
d15 uintptr
}
// archInit runs architecture-specific setup for the goroutine startup.