aboutsummaryrefslogtreecommitdiff
path: root/src/Type.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2025-09-18 20:24:31 +0100
committerAndrew Kelley <andrew@ziglang.org>2025-09-20 18:33:01 -0700
commit20925f2957d6b3c4f8ac99c5cc96fb18f0612e4d (patch)
treee04e67ef80246cdeea2bfc0e511aaadf697d80a6 /src/Type.zig
parentf81a721e4152ef514fd5ebf2f5fb39b97f844b4b (diff)
downloadzig-20925f2957d6b3c4f8ac99c5cc96fb18f0612e4d.tar.gz
zig-20925f2957d6b3c4f8ac99c5cc96fb18f0612e4d.zip
Revert "frontend: another packedStructFieldPtrInfo fix"
This reverts commit dedccecda944f88a5278c12c24ffbea46126de63.
Diffstat (limited to 'src/Type.zig')
-rw-r--r--src/Type.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Type.zig b/src/Type.zig
index 699bc5159d..cdce964356 100644
--- a/src/Type.zig
+++ b/src/Type.zig
@@ -3540,7 +3540,10 @@ pub fn packedStructFieldPtrInfo(
parent_ptr_info.packed_offset.host_size,
parent_ptr_info.packed_offset.bit_offset + bit_offset,
} else .{
- @intCast(struct_ty.abiSize(zcu)),
+ switch (zcu.comp.getZigBackend()) {
+ else => (running_bits + 7) / 8,
+ .stage2_x86_64 => @intCast(struct_ty.abiSize(zcu)),
+ },
bit_offset,
};