From f0b9f51481dcfd7a90ce0479c067c32530f2bd6d Mon Sep 17 00:00:00 2001 From: Softonik Date: Sun, 24 Mar 2024 04:12:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=BE=20?= =?UTF-8?q?=D0=BD=D0=B5=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D1=83?= =?UTF-8?q?=D0=B5=D0=BC=D0=BE=D0=B5=20tinygo=5FscanCurrentStack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/device/esp/esp32.S | 6 ------ src/runtime/gc_stack_raw.go | 8 ++------ 2 files changed, 2 insertions(+), 12 deletions(-) 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.