Use go 1.22 for building
It supports PCALIGN on non ARM arches as well
This commit is contained in:
parent
2f727e6561
commit
720618bc37
2 changed files with 5 additions and 18 deletions
2
go.mod
2
go.mod
|
|
@ -1,6 +1,6 @@
|
|||
module kitty
|
||||
|
||||
go 1.21
|
||||
go 1.22
|
||||
|
||||
require (
|
||||
github.com/ALTree/bigfloat v0.2.0
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue