From db8f00e277016e12495bcc5217090052eea69eb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 6 Aug 2024 15:51:40 +0200 Subject: [PATCH] std.Target: Fix ptrBitWidth_cpu_abi() for sparc32. CPU feature set has nothing to do with ABI choice; the pointer bit width is determined only by looking at the choice of sparc vs sparc64. --- lib/std/Target.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/std/Target.zig b/lib/std/Target.zig index e8df26f52e..facdc1c01c 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -1852,6 +1852,7 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 { .kalimba, .lanai, .wasm32, + .sparc, .spirv32, .loongarch32, .xtensa, @@ -1878,8 +1879,6 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 { .loongarch64, => 64, - .sparc => if (std.Target.sparc.featureSetHas(cpu.features, .v9)) 64 else 32, - .spirv => @panic("TODO what should this value be?"), }; }