Commit 1138166289

Paul Berg <9824244+Pangoraw@users.noreply.github.com>
2024-02-12 14:05:34
wasm: allow non-int vectors
The current Wasm ABI classification function fails to handle non-integer vectors because of the call to `intInfo`.
1 parent 3f55932
Changed files (1)
src
arch
wasm
src/arch/wasm/abi.zig
@@ -45,7 +45,7 @@ pub fn classifyType(ty: Type, mod: *Module) [2]Class {
             }
             return classifyType(field_ty, mod);
         },
-        .Int, .Enum, .ErrorSet, .Vector => {
+        .Int, .Enum, .ErrorSet => {
             const int_bits = ty.intInfo(mod).bits;
             if (int_bits <= 64) return direct;
             if (int_bits <= 128) return .{ .direct, .direct };
@@ -58,6 +58,7 @@ pub fn classifyType(ty: Type, mod: *Module) [2]Class {
             return memory;
         },
         .Bool => return direct,
+        .Vector => return direct,
         .Array => return memory,
         .Optional => {
             assert(ty.isPtrLikeOptional(mod));