runtime: use LLVM intrinsic to read the stack pointer

This should result in smaller code.
This commit is contained in:
Ayke van Laethem
2021-11-27 14:34:34 +01:00
committed by Ron Evans
parent 3d73ee77d3
commit 74b20ca234
10 changed files with 17 additions and 28 deletions
-9
View File
@@ -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