Commit db8f00e277

Alex Rønne Petersen <alex@alexrp.com>
2024-08-06 15:51:40
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.
1 parent ab154be
Changed files (1)
lib
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?"),
     };
 }