| ... | ... | @@ -4565,7 +4565,9 @@ fn airPopcount(self: *Self, inst: Air.Inst.Index) !void { |
| 4565 | 4565 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 4566 | 4566 | const result: MCValue = result: { |
| 4567 | 4567 | const src_ty = self.typeOf(ty_op.operand); |
| 4568 | | const src_abi_size = @as(u32, @intCast(src_ty.abiSize(mod))); |
| 4568 | const src_abi_size: u32 = @intCast(src_ty.abiSize(mod)); |
| 4569 | if (src_ty.zigTypeTag(mod) == .Vector or src_abi_size > 8) |
| 4570 | return self.fail("TODO implement airPopcount for {}", .{src_ty.fmt(mod)}); |
| 4569 | 4571 | const src_mcv = try self.resolveInst(ty_op.operand); |
| 4570 | 4572 | |
| 4571 | 4573 | if (self.hasFeature(.popcnt)) { |
| ... | ... | @@ -4674,8 +4676,13 @@ fn airPopcount(self: *Self, inst: Air.Inst.Index) !void { |
| 4674 | 4676 | } |
| 4675 | 4677 | |
| 4676 | 4678 | fn byteSwap(self: *Self, inst: Air.Inst.Index, src_ty: Type, src_mcv: MCValue, mem_ok: bool) !MCValue { |
| 4679 | const mod = self.bin_file.options.module.?; |
| 4677 | 4680 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 4678 | 4681 | |
| 4682 | if (src_ty.zigTypeTag(mod) == .Vector or src_ty.abiSize(mod) > 8) return self.fail( |
| 4683 | "TODO implement byteSwap for {}", |
| 4684 | .{src_ty.fmt(mod)}, |
| 4685 | ); |
| 4679 | 4686 | const src_bits = self.regBitSize(src_ty); |
| 4680 | 4687 | const src_lock = switch (src_mcv) { |
| 4681 | 4688 | .register => |reg| self.register_manager.lockRegAssumeUnused(reg), |