mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 05:53:39 +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
@@ -39,6 +39,12 @@ func memmove(dst, src unsafe.Pointer, size uintptr)
|
||||
// llvm.memset.p0i8.i32(ptr, 0, size, false).
|
||||
func memzero(ptr unsafe.Pointer, size uintptr)
|
||||
|
||||
// This intrinsic returns the current stack pointer.
|
||||
// It is normally used together with llvm.stackrestore but also works to get the
|
||||
// current stack pointer in a platform-independent way.
|
||||
//export llvm.stacksave
|
||||
func stacksave() unsafe.Pointer
|
||||
|
||||
//export strlen
|
||||
func strlen(ptr unsafe.Pointer) uintptr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user