aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-11-28 13:04:32 +0200
committerVeikka Tuominen <git@vexu.eu>2022-11-30 15:14:34 +0200
commit3281494dc50055dde0415cefb7dec806437741cc (patch)
tree2f44d186e61ba1c76ee438dcb244f8b2361c414e /src/codegen
parenta67ea4a4ae6f8392e2cf9672279aa1b2f80dab72 (diff)
downloadzig-3281494dc50055dde0415cefb7dec806437741cc.tar.gz
zig-3281494dc50055dde0415cefb7dec806437741cc.zip
cbe: prevent access of inactive union field in unimplemented instructions
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/c.zig18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
index 6e96e92529..13ff4e7344 100644
--- a/src/codegen/c.zig
+++ b/src/codegen/c.zig
@@ -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", .{});
}