mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +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
@@ -69,12 +69,3 @@ __vector_WDT:
|
||||
|
||||
pop r16
|
||||
reti
|
||||
|
||||
; This is necessary for the garbage collector.
|
||||
; It returns the stack pointer as an uintptr.
|
||||
.section .text.runtime.getCurrentStackPointer
|
||||
.global runtime.getCurrentStackPointer
|
||||
runtime.getCurrentStackPointer:
|
||||
in r24, 0x3d; SPL
|
||||
in r25, 0x3e; SPH
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user