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

This commit is contained in:
Alex Rønne Petersen 2025-08-05 23:01:42 +02:00
parent 61f4475233
commit 00fb5e34df
No known key found for this signature in database

View File

@ -3075,6 +3075,10 @@ pub fn cTypeAlignment(target: *const Target, c_type: CType) u16 {
},
else => {},
},
.m68k => switch (c_type) {
.int, .uint, .long, .ulong => return 2,
else => {},
},
.powerpc, .powerpcle, .powerpc64, .powerpc64le => switch (target.os.tag) {
.aix => switch (c_type) {
.double, .longdouble => return 4,
@ -3175,6 +3179,10 @@ pub fn cTypePreferredAlignment(target: *const Target, c_type: CType) u16 {
else => {},
},
},
.m68k => switch (c_type) {
.int, .uint, .long, .ulong => return 2,
else => {},
},
.wasm32, .wasm64 => switch (target.os.tag) {
.emscripten => switch (c_type) {
.longdouble => return 8,