diff options
| author | Joachim Schmidt <joachim.schmidt557@outlook.com> | 2022-03-26 22:29:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-26 22:29:48 +0100 |
| commit | 97a53bb8a1703dfd09bee1124ae893f0764a8c8e (patch) | |
| tree | 996a97b69875acef02651cab3279fb6e62c03d18 /src/print_air.zig | |
| parent | 16e88b75ba3e2eb13dbbf0de9194c3bf1a01026e (diff) | |
| parent | 9070ad77740477f7f3806bad884b4070d476a68c (diff) | |
| download | zig-97a53bb8a1703dfd09bee1124ae893f0764a8c8e.tar.gz zig-97a53bb8a1703dfd09bee1124ae893f0764a8c8e.zip | |
Merge pull request #11311 from joachimschmidt557/builtin-with-overflow
stage2: Change semantics of AIR arithmetic overflow instructions
Diffstat (limited to 'src/print_air.zig')
| -rw-r--r-- | src/print_air.zig | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/print_air.zig b/src/print_air.zig index f1e51150a6..6552b54faf 100644 --- a/src/print_air.zig +++ b/src/print_air.zig @@ -473,14 +473,12 @@ const Writer = struct { } fn writeOverflow(w: *Writer, s: anytype, inst: Air.Inst.Index) @TypeOf(s).Error!void { - const pl_op = w.air.instructions.items(.data)[inst].pl_op; - const extra = w.air.extraData(Air.Bin, pl_op.payload).data; + const ty_pl = w.air.instructions.items(.data)[inst].ty_pl; + const extra = w.air.extraData(Air.Bin, ty_pl.payload).data; - try w.writeOperand(s, inst, 0, pl_op.operand); - try s.writeAll(", "); - try w.writeOperand(s, inst, 1, extra.lhs); + try w.writeOperand(s, inst, 0, extra.lhs); try s.writeAll(", "); - try w.writeOperand(s, inst, 2, extra.rhs); + try w.writeOperand(s, inst, 1, extra.rhs); } fn writeMemset(w: *Writer, s: anytype, inst: Air.Inst.Index) @TypeOf(s).Error!void { |
