Commit 834202bf98

Koakuma <koachan@protonmail.com>
2021-09-27 16:00:07
SPARCv9: Fix freeAndExit implementation
This fixes the wrong branch target and register check. (https://github.com/ziglang/zig/issues/9801)
1 parent 8e1aa72
Changed files (1)
lib
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