diff --git a/src/Type.zig b/src/Type.zig index 2c207738b8f55cae37a5a120b68d968fa51e1f66..7a4256263882de8fe68ec8331e256b3dabd53db8 100644 --- a/src/Type.zig +++ b/src/Type.zig @@ -1302,10 +1302,7 @@ pub fn abiSize(ty: Type, zcu: *const Zcu) u64 { } pub fn ptrAbiAlignment(target: *const Target) Alignment { - // The eZ80 has 24-bit pointers, which aren't exact powers of two, tripping - // the assert. The alignment of eZ80 pointers is 1, so we bypass the check. - if (target.cpu.arch == .ez80) return .@"1"; - return .fromNonzeroByteUnits(@divExact(target.ptrBitWidth(), 8)); + return .fromNonzeroByteUnits(std.zig.target.intAlignment(target, target.ptrBitWidth())); } pub fn ptrAbiSize(target: *const Target) u64 { return @divExact(target.ptrBitWidth(), 8);