| ... | ... | @@ -537,7 +537,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void { |
| 537 | 537 | .xor => @panic("TODO try self.airXor(inst)"), |
| 538 | 538 | .shr, .shr_exact => @panic("TODO try self.airShr(inst)"), |
| 539 | 539 | |
| 540 | | .alloc => @panic("TODO try self.airAlloc(inst)"), |
| 540 | .alloc => try self.airAlloc(inst), |
| 541 | 541 | .ret_ptr => try self.airRetPtr(inst), |
| 542 | 542 | .arg => try self.airArg(inst), |
| 543 | 543 | .assembly => try self.airAsm(inst), |
| ... | ... | @@ -671,6 +671,11 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void { |
| 671 | 671 | } |
| 672 | 672 | } |
| 673 | 673 | |
| 674 | fn airAlloc(self: *Self, inst: Air.Inst.Index) !void { |
| 675 | const stack_offset = try self.allocMemPtr(inst); |
| 676 | return self.finishAir(inst, .{ .ptr_stack_offset = stack_offset }, .{ .none, .none, .none }); |
| 677 | } |
| 678 | |
| 674 | 679 | fn airAsm(self: *Self, inst: Air.Inst.Index) !void { |
| 675 | 680 | const ty_pl = self.air.instructions.items(.data)[inst].ty_pl; |
| 676 | 681 | const extra = self.air.extraData(Air.Asm, ty_pl.payload); |