diff --git a/src/device/esp/esp32.S b/src/device/esp/esp32.S index f1850fdc..78d52623 100644 --- a/src/device/esp/esp32.S +++ b/src/device/esp/esp32.S @@ -49,9 +49,3 @@ call_start_cpu0_go: // Jump to the runtime start function written in Go. call4 main - -.section .text.tinygo_scanCurrentStack -.global tinygo_scanCurrentStack -tinygo_scanCurrentStack: - // TODO: save callee saved registers on the stack - j tinygo_scanstack diff --git a/src/runtime/gc_stack_raw.go b/src/runtime/gc_stack_raw.go index 50d57858..fe7877f1 100644 --- a/src/runtime/gc_stack_raw.go +++ b/src/runtime/gc_stack_raw.go @@ -19,12 +19,8 @@ func markStack() { } } -//go:export tinygo_scanCurrentStack -func scanCurrentStack() - -//go:export tinygo_scanstack -func scanstack(sp uintptr) { - sp = getCurrentStackPointer() +func scanCurrentStack() { + sp := getCurrentStackPointer() // Mark current stack. // This function is called by scanCurrentStack, after pushing all registers onto the stack. // Callee-saved registers have been pushed onto stack by tinygo_localscan, so this will scan them too.