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.
This commit is contained in:
Alex Rønne Petersen 2024-08-06 15:51:40 +02:00
parent ab154be7f0
commit db8f00e277
No known key found for this signature in database

View File

@ -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?"),
};
}