mirror of
https://github.com/ziglang/zig.git
synced 2025-12-27 00:23:22 +00:00
stage2: Ensure f128 alignment matches c_longdouble alignment
On platforms where c_longdouble is 128-bits, interop with C code is simplified by making f128 match the alignment of c_longdouble. I intended to make this change as part of #13257, but I missed this part.
This commit is contained in:
parent
e50789f1cb
commit
98b60992b3
@ -2919,7 +2919,10 @@ pub const Type = extern union {
|
||||
return AbiAlignmentAdvanced{ .scalar = abiAlignment(u80_ty, target) };
|
||||
},
|
||||
},
|
||||
.f128 => return AbiAlignmentAdvanced{ .scalar = 16 },
|
||||
.f128 => switch (CType.longdouble.sizeInBits(target)) {
|
||||
128 => return AbiAlignmentAdvanced{ .scalar = CType.longdouble.alignment(target) },
|
||||
else => return AbiAlignmentAdvanced{ .scalar = 16 },
|
||||
},
|
||||
|
||||
// TODO revisit this when we have the concept of the error tag type
|
||||
.anyerror_void_error_union,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user