commit a1d3e567635e79e0fbd8d56225d5098bc6cb8bbb (tree)
parent 606d011acf8c2a75ea1485174c2c1d24a612c86b
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Tue, 6 Aug 2024 19:37:49 +0200
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.
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/std/Target.zig b/lib/std/Target.zig
@@ -2264,9 +2264,7 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 {
.short, .ushort => return 16,
.int, .uint, .float => return 32,
.long, .ulong, .longlong, .ulonglong, .double => return 64,
- // Note: The OpenCL specification does not guarantee a particular size for long double,
- // but clang uses 128 bits.
- .longdouble => return 128,
+ .longdouble => return 64,
},
.ps4, .ps5 => switch (c_type) {