mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 22:14:53 +02:00
Use go 1.22 for building
It supports PCALIGN on non ARM arches as well
This commit is contained in:
@@ -1053,24 +1053,11 @@ func (s *Function) Return() {
|
||||
}
|
||||
|
||||
func (s *Function) end_function() {
|
||||
v := strings.Split(runtime.Version()[2:], ".")[:2]
|
||||
atoi := func(x string) (v int) {
|
||||
if v, err := strconv.Atoi(x); err != nil {
|
||||
panic(err)
|
||||
} else {
|
||||
return v
|
||||
}
|
||||
}
|
||||
ver := struct {
|
||||
major, minor int
|
||||
}{atoi(v[0]), atoi(v[1])}
|
||||
if s.ISA.Goarch == ARM64 || (ver.major > 1 || ver.minor > 21) {
|
||||
amt := 16
|
||||
if s.Used256BitReg {
|
||||
amt = 32
|
||||
}
|
||||
s.instr(fmt.Sprintf("PCALIGN $%d\n", amt))
|
||||
amt := 16
|
||||
if s.Used256BitReg {
|
||||
amt = 32
|
||||
}
|
||||
s.instr(fmt.Sprintf("PCALIGN $%d\n", amt))
|
||||
s.Return()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user