| ... | @@ -3124,7 +3124,7 @@ fn airClz(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -3124,7 +3124,7 @@ fn airClz(self: *Self, inst: Air.Inst.Index) !void { |
| 3124 | const imm_reg = try self.copyToTmpRegister(dst_ty, .{ | 3124 | const imm_reg = try self.copyToTmpRegister(dst_ty, .{ |
| 3125 | .immediate = src_bits ^ (src_bits - 1), | 3125 | .immediate = src_bits ^ (src_bits - 1), |
| 3126 | }); | 3126 | }); |
| 3127 | try self.genBinOpMir(.bsf, src_ty, dst_mcv, mat_src_mcv); | 3127 | try self.genBinOpMir(.bsr, src_ty, dst_mcv, mat_src_mcv); |
| 3128 | | 3128 | |
| 3129 | const cmov_abi_size = @max(@intCast(u32, dst_ty.abiSize(self.target.*)), 2); | 3129 | const cmov_abi_size = @max(@intCast(u32, dst_ty.abiSize(self.target.*)), 2); |
| 3130 | try self.asmCmovccRegisterRegister( | 3130 | try self.asmCmovccRegisterRegister( |
| ... | @@ -3138,7 +3138,7 @@ fn airClz(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -3138,7 +3138,7 @@ fn airClz(self: *Self, inst: Air.Inst.Index) !void { |
| 3138 | const imm_reg = try self.copyToTmpRegister(dst_ty, .{ | 3138 | const imm_reg = try self.copyToTmpRegister(dst_ty, .{ |
| 3139 | .immediate = @as(u64, math.maxInt(u64)) >> @intCast(u6, 64 - self.regBitSize(dst_ty)), | 3139 | .immediate = @as(u64, math.maxInt(u64)) >> @intCast(u6, 64 - self.regBitSize(dst_ty)), |
| 3140 | }); | 3140 | }); |
| 3141 | try self.genBinOpMir(.bsf, src_ty, dst_mcv, mat_src_mcv); | 3141 | try self.genBinOpMir(.bsr, src_ty, dst_mcv, mat_src_mcv); |
| 3142 | | 3142 | |
| 3143 | const cmov_abi_size = @max(@intCast(u32, dst_ty.abiSize(self.target.*)), 2); | 3143 | const cmov_abi_size = @max(@intCast(u32, dst_ty.abiSize(self.target.*)), 2); |
| 3144 | try self.asmCmovccRegisterRegister( | 3144 | try self.asmCmovccRegisterRegister( |