mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
runtime: use LLVM intrinsic to read the stack pointer
This should result in smaller code.
This commit is contained in:
committed by
Ron Evans
parent
3d73ee77d3
commit
74b20ca234
@@ -1,7 +1,5 @@
|
||||
package runtime
|
||||
|
||||
import "device/arm"
|
||||
|
||||
const GOARCH = "arm64"
|
||||
|
||||
// The bitness of the CPU (e.g. 8, 32, 64).
|
||||
@@ -11,6 +9,7 @@ const TargetBits = 64
|
||||
func align(ptr uintptr) uintptr {
|
||||
return (ptr + 7) &^ 7
|
||||
}
|
||||
|
||||
func getCurrentStackPointer() uintptr {
|
||||
return arm.AsmFull("mov {}, sp", nil)
|
||||
return uintptr(stacksave())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user