mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
stage2: fix compilation on 32 bit targets
This commit is contained in:
parent
1417698c11
commit
1f823eecdd
@ -373,7 +373,7 @@ fn analyzeInst(
|
||||
.vector_init => {
|
||||
const ty_pl = inst_datas[inst].ty_pl;
|
||||
const vector_ty = a.air.getRefType(ty_pl.ty);
|
||||
const len = vector_ty.arrayLen();
|
||||
const len = @intCast(usize, vector_ty.arrayLen());
|
||||
const elements = @bitCast([]const Air.Inst.Ref, a.air.extra[ty_pl.payload..][0..len]);
|
||||
|
||||
if (elements.len <= bpi - 1) {
|
||||
|
||||
@ -15056,7 +15056,7 @@ fn coerceTupleToArray(
|
||||
) !Air.Inst.Ref {
|
||||
const inst_ty = sema.typeOf(inst);
|
||||
const inst_len = inst_ty.arrayLen();
|
||||
const dest_len = dest_ty.arrayLen();
|
||||
const dest_len = try sema.usizeCast(block, dest_ty_src, dest_ty.arrayLen());
|
||||
|
||||
if (dest_len != inst_len) {
|
||||
const msg = msg: {
|
||||
|
||||
@ -296,7 +296,7 @@ const Writer = struct {
|
||||
fn writeVectorInit(w: *Writer, s: anytype, inst: Air.Inst.Index) @TypeOf(s).Error!void {
|
||||
const ty_pl = w.air.instructions.items(.data)[inst].ty_pl;
|
||||
const vector_ty = w.air.getRefType(ty_pl.ty);
|
||||
const len = vector_ty.arrayLen();
|
||||
const len = @intCast(usize, vector_ty.arrayLen());
|
||||
const elements = @bitCast([]const Air.Inst.Ref, w.air.extra[ty_pl.payload..][0..len]);
|
||||
|
||||
try s.print("{}, [", .{vector_ty});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user