aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-08-12 12:40:54 +0200
committerAndrew Kelley <andrew@ziglang.org>2024-08-13 23:53:57 -0700
commitdc77d1b66dc67c6fcfeafdfd079dab79c320d2b1 (patch)
tree80a3e00c77baf15a931de4c03c73b16e1c3aa7e7 /lib/std/Thread.zig
parent1018cdc0a8d0bdd9c90cf09fed5a38f510f97b62 (diff)
downloadzig-dc77d1b66dc67c6fcfeafdfd079dab79c320d2b1.tar.gz
zig-dc77d1b66dc67c6fcfeafdfd079dab79c320d2b1.zip
std.Thread: Merge riscv32/riscv64 assembly in freeAndExit().
Diffstat (limited to 'lib/std/Thread.zig')
-rw-r--r--lib/std/Thread.zig15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig
index b84f0274bc..2ed6610bc0 100644
--- a/lib/std/Thread.zig
+++ b/lib/std/Thread.zig
@@ -1175,20 +1175,7 @@ const LinuxThreadImpl = struct {
[len] "r" (self.mapped.len),
: "memory"
),
- .riscv32 => asm volatile (
- \\ li a7, 215 # SYS_munmap
- \\ mv a0, %[ptr]
- \\ mv a1, %[len]
- \\ ecall
- \\ li a7, 93 # SYS_exit
- \\ mv a0, zero
- \\ ecall
- :
- : [ptr] "r" (@intFromPtr(self.mapped.ptr)),
- [len] "r" (self.mapped.len),
- : "memory"
- ),
- .riscv64 => asm volatile (
+ .riscv32, .riscv64 => asm volatile (
\\ li a7, 215 # SYS_munmap
\\ mv a0, %[ptr]
\\ mv a1, %[len]