runtime: fix badmorestackg0 never called on wasm

Previously, badmorestackg0 was never called since it was behind a g ==
R1 check, R1 holding g.m. This is clearly wrong, since we want to check
if g == g0. Fixed by using R2 that holds the value of g0.

Fixes [reserved]
This commit is contained in:
Mauri de Souza Meneguzzo 2023-11-05 14:42:31 -03:00
parent d72f4542fe
commit b3e92cf286
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ TEXT runtime·morestack(SB), NOSPLIT, $0-0
// Cannot grow scheduler stack (m->g0). // Cannot grow scheduler stack (m->g0).
Get g Get g
Get R1 Get R2
I64Eq I64Eq
If If
CALLNORESUME runtime·badmorestackg0(SB) CALLNORESUME runtime·badmorestackg0(SB)