Commit 04523db6ae

Jakub Konka <kubkon@jakubkonka.com>
2022-03-24 18:54:17
x64: fix for 32bit builds
1 parent 4ef26fc
Changed files (1)
src
arch
src/arch/x86_64/CodeGen.zig
@@ -5692,7 +5692,7 @@ fn airReduce(self: *Self, inst: Air.Inst.Index) !void {
 
 fn airAggregateInit(self: *Self, inst: Air.Inst.Index) !void {
     const result_ty = self.air.typeOfIndex(inst);
-    const len = result_ty.arrayLen();
+    const len = @intCast(usize, result_ty.arrayLen());
     const ty_pl = self.air.instructions.items(.data)[inst].ty_pl;
     const elements = @bitCast([]const Air.Inst.Ref, self.air.extra[ty_pl.payload..][0..len]);
     const abi_size = @intCast(u32, result_ty.abiSize(self.target.*));