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