From b8f1a054e7df7573cf3fb14e96e12581579b783e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 14 Sep 2026 23:30:26 +0200 Subject: [PATCH] zig.h: fix the fallback path in zig_e_zig_x86_get_xcr0() --- lib/zig.h | 5 +---- stage1/zig.h | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/zig.h b/lib/zig.h index 30e6f3f96a97f47b6648db1d1587bc75c88b6c3f..dd9fa902f34bf2073c111763208937b4abbac01f 100644 --- a/lib/zig.h +++ b/lib/zig.h @@ -6794,10 +6794,7 @@ static inline uint32_t zig_e_zig_x86_get_xcr0(void) { __asm__("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0)); return eax; #else - *eax = 0; - *ebx = 0; - *ecx = 0; - *edx = 0; + return 0; #endif } diff --git a/stage1/zig.h b/stage1/zig.h index 30e6f3f96a97f47b6648db1d1587bc75c88b6c3f..dd9fa902f34bf2073c111763208937b4abbac01f 100644 --- a/stage1/zig.h +++ b/stage1/zig.h @@ -6794,10 +6794,7 @@ static inline uint32_t zig_e_zig_x86_get_xcr0(void) { __asm__("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0)); return eax; #else - *eax = 0; - *ebx = 0; - *ecx = 0; - *edx = 0; + return 0; #endif } -- 2.54.0