authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-08-05 23:01:42+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-02 22:32:17+02:00
log00fb5e34df33deaed78210157c4ee1ad189351ac
tree48a7ff05469f77341c204a7f7de967954ac2873a
parent61f447523350a467fde242b846ed27b084ed1f50
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: fix alignment for int/long types on m68k


1 files changed, 8 insertions(+), 0 deletions(-)

lib/std/Target.zig+8
......@@ -3075,6 +3075,10 @@ pub fn cTypeAlignment(target: *const Target, c_type: CType) u16 {
30753075 },
30763076 else => {},
30773077 },
3078 .m68k => switch (c_type) {
3079 .int, .uint, .long, .ulong => return 2,
3080 else => {},
3081 },
30783082 .powerpc, .powerpcle, .powerpc64, .powerpc64le => switch (target.os.tag) {
30793083 .aix => switch (c_type) {
30803084 .double, .longdouble => return 4,
......@@ -3175,6 +3179,10 @@ pub fn cTypePreferredAlignment(target: *const Target, c_type: CType) u16 {
31753179 else => {},
31763180 },
31773181 },
3182 .m68k => switch (c_type) {
3183 .int, .uint, .long, .ulong => return 2,
3184 else => {},
3185 },
31783186 .wasm32, .wasm64 => switch (target.os.tag) {
31793187 .emscripten => switch (c_type) {
31803188 .longdouble => return 8,