mirror of
https://github.com/ziglang/zig.git
synced 2025-12-17 11:43:16 +00:00
wasm: allow non-int vectors
The current Wasm ABI classification function fails to handle non-integer vectors because of the call to `intInfo`.
This commit is contained in:
parent
3f5593205d
commit
1138166289
@ -45,7 +45,7 @@ pub fn classifyType(ty: Type, mod: *Module) [2]Class {
|
|||||||
}
|
}
|
||||||
return classifyType(field_ty, mod);
|
return classifyType(field_ty, mod);
|
||||||
},
|
},
|
||||||
.Int, .Enum, .ErrorSet, .Vector => {
|
.Int, .Enum, .ErrorSet => {
|
||||||
const int_bits = ty.intInfo(mod).bits;
|
const int_bits = ty.intInfo(mod).bits;
|
||||||
if (int_bits <= 64) return direct;
|
if (int_bits <= 64) return direct;
|
||||||
if (int_bits <= 128) return .{ .direct, .direct };
|
if (int_bits <= 128) return .{ .direct, .direct };
|
||||||
@ -58,6 +58,7 @@ pub fn classifyType(ty: Type, mod: *Module) [2]Class {
|
|||||||
return memory;
|
return memory;
|
||||||
},
|
},
|
||||||
.Bool => return direct,
|
.Bool => return direct,
|
||||||
|
.Vector => return direct,
|
||||||
.Array => return memory,
|
.Array => return memory,
|
||||||
.Optional => {
|
.Optional => {
|
||||||
assert(ty.isPtrLikeOptional(mod));
|
assert(ty.isPtrLikeOptional(mod));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user