From c268c48c8ee93c731583406175c1d6dd91f156e2 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 22 Feb 2025 22:57:10 +0100 Subject: [PATCH] system: Fix syscall return value constraint The previous constraint was making the compiler discard the return value when building in release mode. --- system/lib/syscalls.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/lib/syscalls.zig b/system/lib/syscalls.zig index 3de13b9..6cc57d4 100644 --- a/system/lib/syscalls.zig +++ b/system/lib/syscalls.zig @@ -4,7 +4,7 @@ const target = @import("builtin").target; fn syscall(num: kernel.SystemCall, arg0: u64, arg1: u64) i64 { return switch (target.cpu.arch) { .x86_64 => asm volatile ("int $66" - : [result] "=r" (-> i64), + : [result] "={rax}" (-> i64), : [num] "{rax}" (@intFromEnum(num)), [arg0] "{rdi}" (arg0), [arg1] "{rsi}" (arg1),