| ... | ... | @@ -611,7 +611,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void { |
| 611 | 611 | .atomic_rmw => @panic("TODO try self.airAtomicRmw(inst)"), |
| 612 | 612 | .atomic_load => @panic("TODO try self.airAtomicLoad(inst)"), |
| 613 | 613 | .memcpy => @panic("TODO try self.airMemcpy(inst)"), |
| 614 | | .memset => @panic("TODO try self.airMemset(inst)"), |
| 614 | .memset => try self.airMemset(inst), |
| 615 | 615 | .set_union_tag => @panic("TODO try self.airSetUnionTag(inst)"), |
| 616 | 616 | .get_union_tag => @panic("TODO try self.airGetUnionTag(inst)"), |
| 617 | 617 | .clz => @panic("TODO try self.airClz(inst)"), |
| ... | ... | @@ -1569,6 +1569,20 @@ fn airLoop(self: *Self, inst: Air.Inst.Index) !void { |
| 1569 | 1569 | return self.finishAirBookkeeping(); |
| 1570 | 1570 | } |
| 1571 | 1571 | |
| 1572 | fn airMemset(self: *Self, inst: Air.Inst.Index) !void { |
| 1573 | const pl_op = self.air.instructions.items(.data)[inst].pl_op; |
| 1574 | const extra = self.air.extraData(Air.Bin, pl_op.payload); |
| 1575 | |
| 1576 | const operand = pl_op.operand; |
| 1577 | const value = extra.data.lhs; |
| 1578 | const length = extra.data.rhs; |
| 1579 | _ = operand; |
| 1580 | _ = value; |
| 1581 | _ = length; |
| 1582 | |
| 1583 | return self.fail("TODO implement airMemset for {}", .{self.target.cpu.arch}); |
| 1584 | } |
| 1585 | |
| 1572 | 1586 | fn airNot(self: *Self, inst: Air.Inst.Index) !void { |
| 1573 | 1587 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 1574 | 1588 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: { |