| ... | ... | @@ -584,7 +584,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void { |
| 584 | 584 | .load => try self.airLoad(inst), |
| 585 | 585 | .loop => try self.airLoop(inst), |
| 586 | 586 | .not => try self.airNot(inst), |
| 587 | | .ptrtoint => @panic("TODO try self.airPtrToInt(inst)"), |
| 587 | .ptrtoint => try self.airPtrToInt(inst), |
| 588 | 588 | .ret => try self.airRet(inst), |
| 589 | 589 | .ret_load => try self.airRetLoad(inst), |
| 590 | 590 | .store => try self.airStore(inst), |
| ... | ... | @@ -1894,6 +1894,12 @@ fn airPtrElemPtr(self: *Self, inst: Air.Inst.Index) !void { |
| 1894 | 1894 | return self.finishAir(inst, result, .{ extra.lhs, extra.rhs, .none }); |
| 1895 | 1895 | } |
| 1896 | 1896 | |
| 1897 | fn airPtrToInt(self: *Self, inst: Air.Inst.Index) !void { |
| 1898 | const un_op = self.air.instructions.items(.data)[inst].un_op; |
| 1899 | const result = try self.resolveInst(un_op); |
| 1900 | return self.finishAir(inst, result, .{ un_op, .none, .none }); |
| 1901 | } |
| 1902 | |
| 1897 | 1903 | fn airRem(self: *Self, inst: Air.Inst.Index) !void { |
| 1898 | 1904 | const bin_op = self.air.instructions.items(.data)[inst].bin_op; |
| 1899 | 1905 | const lhs = try self.resolveInst(bin_op.lhs); |