| ... | ... | @@ -611,7 +611,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void { |
| 611 | 611 | .ctz => try self.airCtz(inst), |
| 612 | 612 | .popcount => try self.airPopcount(inst), |
| 613 | 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 | 615 | .tag_name => try self.airTagName(inst), |
| 616 | 616 | .error_name => try self.airErrorName(inst), |
| 617 | 617 | .splat => try self.airSplat(inst), |
| ... | ... | @@ -1090,6 +1090,12 @@ fn airBitCast(self: *Self, inst: Air.Inst.Index) !void { |
| 1090 | 1090 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); |
| 1091 | 1091 | } |
| 1092 | 1092 | |
| 1093 | fn 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 | |
| 1093 | 1099 | fn airBlock(self: *Self, inst: Air.Inst.Index) !void { |
| 1094 | 1100 | try self.blocks.putNoClobber(self.gpa, inst, .{ |
| 1095 | 1101 | // A block is a setup to be able to jump to the end. |