| ... | ... | @@ -541,7 +541,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void { |
| 541 | 541 | .ret_ptr => try self.airRetPtr(inst), |
| 542 | 542 | .arg => try self.airArg(inst), |
| 543 | 543 | .assembly => try self.airAsm(inst), |
| 544 | | .bitcast => @panic("TODO try self.airBitCast(inst)"), |
| 544 | .bitcast => try self.airBitCast(inst), |
| 545 | 545 | .block => try self.airBlock(inst), |
| 546 | 546 | .br => try self.airBr(inst), |
| 547 | 547 | .breakpoint => try self.airBreakpoint(), |
| ... | ... | @@ -823,6 +823,12 @@ fn airArg(self: *Self, inst: Air.Inst.Index) !void { |
| 823 | 823 | return self.finishAir(inst, mcv, .{ .none, .none, .none }); |
| 824 | 824 | } |
| 825 | 825 | |
| 826 | fn airBitCast(self: *Self, inst: Air.Inst.Index) !void { |
| 827 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 828 | const result = try self.resolveInst(ty_op.operand); |
| 829 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); |
| 830 | } |
| 831 | |
| 826 | 832 | fn airBlock(self: *Self, inst: Air.Inst.Index) !void { |
| 827 | 833 | try self.blocks.putNoClobber(self.gpa, inst, .{ |
| 828 | 834 | // A block is a setup to be able to jump to the end. |