Commit be10f95994

Veikka Tuominen <git@vexu.eu>
2022-10-22 18:32:56
ARM C ABI: workaround i128 issues
1 parent 3f41979
Changed files (1)
src
arch
src/arch/arm/abi.zig
@@ -68,7 +68,14 @@ pub fn classifyType(ty: Type, target: std.Target, ctx: Context) Class {
             return Class.arrSize(bit_size, 32);
         },
         .Bool, .Float => return .byval,
-        .Int, .Enum, .ErrorSet => {
+        .Int => {
+            // TODO this is incorrect for _BitInt(128) but implementing
+            // this correctly makes implementing compiler-rt impossible.
+            // const bit_size = ty.bitSize(target);
+            // if (bit_size > 64) return .memory;
+            return .byval;
+        },
+        .Enum, .ErrorSet => {
             const bit_size = ty.bitSize(target);
             if (bit_size > 64) return .memory;
             return .byval;