Files
tinygo/src/runtime/arch_avr.go
T
Ayke van Laethem 74b20ca234 runtime: use LLVM intrinsic to read the stack pointer
This should result in smaller code.
2021-11-30 10:01:44 +01:00

19 lines
334 B
Go

// +build avr
package runtime
const GOARCH = "arm" // avr pretends to be arm
// The bitness of the CPU (e.g. 8, 32, 64).
const TargetBits = 8
// Align on a word boundary.
func align(ptr uintptr) uintptr {
// No alignment necessary on the AVR.
return ptr
}
func getCurrentStackPointer() uintptr {
return uintptr(stacksave())
}