From dc77d1b66dc67c6fcfeafdfd079dab79c320d2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 12 Aug 2024 12:40:54 +0200 Subject: [PATCH] std.Thread: Merge riscv32/riscv64 assembly in freeAndExit(). --- lib/std/Thread.zig | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig index b84f0274bc10..2ed6610bc0a8 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]