authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-10-22 19:32:56+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-10-22 19:32:56+03:00
logbe10f95994d077f9b8137bb58d0349f78f408219
tree563c96e8655c8d7b66bd57f0673d5258eb409fb2
parent3f4197906190fe39d75f5e9bee2d9a7e5813f800

ARM C ABI: workaround i128 issues


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

src/arch/arm/abi.zig+8-1
......@@ -68,7 +68,14 @@ pub fn classifyType(ty: Type, target: std.Target, ctx: Context) Class {
6868 return Class.arrSize(bit_size, 32);
6969 },
7070 .Bool, .Float => return .byval,
71 .Int, .Enum, .ErrorSet => {
71 .Int => {
72 // TODO this is incorrect for _BitInt(128) but implementing
73 // this correctly makes implementing compiler-rt impossible.
74 // const bit_size = ty.bitSize(target);
75 // if (bit_size > 64) return .memory;
76 return .byval;
77 },
78 .Enum, .ErrorSet => {
7279 const bit_size = ty.bitSize(target);
7380 if (bit_size > 64) return .memory;
7481 return .byval;