aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
diff options
context:
space:
mode:
authorKoakuma <koachan@protonmail.com>2021-09-27 21:00:07 +0700
committerKoakuma <koachan@protonmail.com>2021-10-10 09:13:17 +0700
commit834202bf985c257b2bf79df7cb804af9cb0ca422 (patch)
tree34a0d31263390ad9a853437435e547d7940212ac /lib/std/Thread.zig
parent8e1aa72c69cddc9fcd0bd8a3f9f4e9d3a8d002af (diff)
downloadzig-834202bf985c257b2bf79df7cb804af9cb0ca422.tar.gz
zig-834202bf985c257b2bf79df7cb804af9cb0ca422.zip
SPARCv9: Fix freeAndExit implementation
This fixes the wrong branch target and register check. (https://github.com/ziglang/zig/issues/9801)
Diffstat (limited to 'lib/std/Thread.zig')
-rw-r--r--lib/std/Thread.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig
index ae3a3e9d9e..625255d411 100644
--- 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