aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Tapscott <topolarity@tapscott.me>2022-10-23 23:17:23 -0700
committerCody Tapscott <topolarity@tapscott.me>2022-10-23 23:18:50 -0700
commit4ecc384f99e5f4c5a320714484866fb48699245f (patch)
tree3b520a0ef4fe06337a76bee353b70e9df51c46ab
parentc96f85852ed2e1d5b2ecb43770a3c41d7f38f284 (diff)
downloadzig-4ecc384f99e5f4c5a320714484866fb48699245f.tar.gz
zig-4ecc384f99e5f4c5a320714484866fb48699245f.zip
Fix long double on x86_64-windows
The larger alignment on this platform means that long double reports a sizeof 16 bytes, but it's underlying size is really just the 10 bytes of `f80` C doesn't give us a way to see the "underlying" size of a type, so this has to be caught by hand or by monitoring runtime memory. Luckily, x86 and x86-64 are the only platforms that seem to use a non-power-of-two type like this.
-rw-r--r--src/type.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type.zig b/src/type.zig
index d78e2909b5..8f2cd7c54d 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -6827,7 +6827,7 @@ pub const CType = enum {
},
.longlong, .ulonglong, .double => return 64,
.longdouble => switch (target.abi) {
- .gnu, .gnuilp32, .cygnus => return 128,
+ .gnu, .gnuilp32, .cygnus => return 80,
else => return 64,
},
},