authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-06 19:37:49+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-06 20:17:03+02:00
loga1d3e567635e79e0fbd8d56225d5098bc6cb8bbb
tree092a7ac2fcfab0e0cf4deebccdc213ab2e7f4377
parent606d011acf8c2a75ea1485174c2c1d24a612c86b
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: Fix C long double size for opencl (8, not 16).

This value was correct for the old SPIR, but not for SPIR-V.

1 files changed, 1 insertions(+), 3 deletions(-)

lib/std/Target.zig+1-3
......@@ -2264,9 +2264,7 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 {
22642264 .short, .ushort => return 16,
22652265 .int, .uint, .float => return 32,
22662266 .long, .ulong, .longlong, .ulonglong, .double => return 64,
2267 // Note: The OpenCL specification does not guarantee a particular size for long double,
2268 // but clang uses 128 bits.
2269 .longdouble => return 128,
2267 .longdouble => return 64,
22702268 },
22712269
22722270 .ps4, .ps5 => switch (c_type) {