Files
tinygo/src/runtime/arch_xtensa.go
T
Ayke van Laethem 35f427c8cc xtensa: use 8-byte alignment
This is probably not necessary on Espressif chips, but let's strictly
follow the ABI to be sure.
2023-01-17 19:32:18 +01:00

20 lines
390 B
Go

//go:build xtensa
package runtime
const GOARCH = "arm" // xtensa pretends to be arm
// The bitness of the CPU (e.g. 8, 32, 64).
const TargetBits = 32
const deferExtraRegs = 0
// The largest alignment according to the Xtensa ABI is 8 (long long, double).
func align(ptr uintptr) uintptr {
return (ptr + 7) &^ 7
}
func getCurrentStackPointer() uintptr {
return uintptr(stacksave())
}