mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 18:47:47 +00:00
35f427c8cc
This is probably not necessary on Espressif chips, but let's strictly follow the ABI to be sure.
20 lines
390 B
Go
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())
|
|
}
|