commit 834202bf985c257b2bf79df7cb804af9cb0ca422 (tree)
parent 8e1aa72c69cddc9fcd0bd8a3f9f4e9d3a8d002af
Author: Koakuma <koachan@protonmail.com>
Date: Mon, 27 Sep 2021 21:00:07 +0700
SPARCv9: Fix freeAndExit implementation
This fixes the wrong branch target and register check.
(https://github.com/ziglang/zig/issues/9801)
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig
@@ -813,12 +813,11 @@ const LinuxThreadImpl = struct {
\\ # force-deactivate it by running `restore` until
\\ # all frames are cleared.
\\ 1:
- \\ cmp %%sp, 0
+ \\ cmp %%fp, 0
\\ beq 2f
\\ nop
+ \\ ba 1b
\\ restore
- \\ ba 1f
- \\ nop
\\ 2:
\\ mov 73, %%g1
\\ mov %[ptr], %%o0