mirror of
https://github.com/ziglang/zig.git
synced 2026-01-07 14:03:26 +00:00
cbe: prevent access of inactive union field in unimplemented instructions
This commit is contained in:
parent
a67ea4a4ae
commit
3281494dc5
@ -5285,30 +5285,12 @@ fn airSplat(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||
fn airSelect(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||
if (f.liveness.isUnused(inst)) return CValue.none;
|
||||
|
||||
const inst_ty = f.air.typeOfIndex(inst);
|
||||
const ty_pl = f.air.instructions.items(.data)[inst].ty_pl;
|
||||
|
||||
const writer = f.object.writer();
|
||||
const local = try f.allocLocal(inst_ty, .Const);
|
||||
try writer.writeAll(" = ");
|
||||
|
||||
_ = local;
|
||||
_ = ty_pl;
|
||||
return f.fail("TODO: C backend: implement airSelect", .{});
|
||||
}
|
||||
|
||||
fn airShuffle(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||
if (f.liveness.isUnused(inst)) return CValue.none;
|
||||
|
||||
const inst_ty = f.air.typeOfIndex(inst);
|
||||
const ty_op = f.air.instructions.items(.data)[inst].ty_op;
|
||||
const operand = try f.resolveInst(ty_op.operand);
|
||||
const writer = f.object.writer();
|
||||
const local = try f.allocLocal(inst_ty, .Const);
|
||||
try writer.writeAll(" = ");
|
||||
|
||||
_ = operand;
|
||||
_ = local;
|
||||
return f.fail("TODO: C backend: implement airShuffle", .{});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user