authorgravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-12-10 20:58:22+07:00
committergravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-12-10 21:31:59+07:00
logb4b7a404cfa0cfdc212fa66351789a199acb6e0c
treeba7aa82ef4cb9e319951a40b9c7f085fc174c766
parenta369e8af9ed9e385b6125085073a50fbce109817

stage2: sparc64: Implement airBitReverse


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

src/arch/sparc64/CodeGen.zig+7-1
...@@ -611,7 +611,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {...@@ -611,7 +611,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
611 .ctz => try self.airCtz(inst),611 .ctz => try self.airCtz(inst),
612 .popcount => try self.airPopcount(inst),612 .popcount => try self.airPopcount(inst),
613 .byte_swap => @panic("TODO try self.airByteSwap(inst)"),613 .byte_swap => @panic("TODO try self.airByteSwap(inst)"),
614 .bit_reverse => @panic("TODO try self.airBitReverse(inst)"),614 .bit_reverse => try self.airBitReverse(inst),
615 .tag_name => try self.airTagName(inst),615 .tag_name => try self.airTagName(inst),
616 .error_name => try self.airErrorName(inst),616 .error_name => try self.airErrorName(inst),
617 .splat => try self.airSplat(inst),617 .splat => try self.airSplat(inst),
...@@ -1090,6 +1090,12 @@ fn airBitCast(self: *Self, inst: Air.Inst.Index) !void {...@@ -1090,6 +1090,12 @@ fn airBitCast(self: *Self, inst: Air.Inst.Index) !void {
1090 return self.finishAir(inst, result, .{ ty_op.operand, .none, .none });1090 return self.finishAir(inst, result, .{ ty_op.operand, .none, .none });
1091}1091}
10921092
1093fn airBitReverse(self: *Self, inst: Air.Inst.Index) !void {
1094 const ty_op = self.air.instructions.items(.data)[inst].ty_op;
1095 const result: MCValue = if (self.liveness.isUnused(inst)) .dead else return self.fail("TODO implement airBitReverse for {}", .{self.target.cpu.arch});
1096 return self.finishAir(inst, result, .{ ty_op.operand, .none, .none });
1097}
1098
1093fn airBlock(self: *Self, inst: Air.Inst.Index) !void {1099fn airBlock(self: *Self, inst: Air.Inst.Index) !void {
1094 try self.blocks.putNoClobber(self.gpa, inst, .{1100 try self.blocks.putNoClobber(self.gpa, inst, .{
1095 // A block is a setup to be able to jump to the end.1101 // A block is a setup to be able to jump to the end.