authorgravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-05-06 22:10:41+07:00
committergravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-05-16 22:48:49+07:00
log3ab66343709147f17c6035fc298ffcc0088f0e1d
treec16a09214e35d054c87f4879f8ba7eb7d671616c
parent339b0517b3a1e33f2b348ac9764687847054bea2

stage2: sparc64: Implement airAlloc


1 files changed, 6 insertions(+), 1 deletions(-)

src/arch/sparc64/CodeGen.zig+6-1
......@@ -537,7 +537,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
537537 .xor => @panic("TODO try self.airXor(inst)"),
538538 .shr, .shr_exact => @panic("TODO try self.airShr(inst)"),
539539
540 .alloc => @panic("TODO try self.airAlloc(inst)"),
540 .alloc => try self.airAlloc(inst),
541541 .ret_ptr => try self.airRetPtr(inst),
542542 .arg => try self.airArg(inst),
543543 .assembly => try self.airAsm(inst),
......@@ -671,6 +671,11 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
671671 }
672672}
673673
674fn 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
674679fn airAsm(self: *Self, inst: Air.Inst.Index) !void {
675680 const ty_pl = self.air.instructions.items(.data)[inst].ty_pl;
676681 const extra = self.air.extraData(Air.Asm, ty_pl.payload);