Optimized randomx_reciprocal

Also limited it to 32 bit because it's supposed to work only with 32-bit values, according to the specs.
This commit is contained in:
SChernykh
2023-10-20 15:05:13 +02:00
parent 5fc512e71c
commit 5c49ab12a0
8 changed files with 23 additions and 42 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ namespace randomx {
}
if (opcode < ceil_IMUL_RCP) {
uint64_t divisor = instr.getImm32();
const uint32_t divisor = instr.getImm32();
if (!isZeroOrPowerOf2(divisor)) {
auto dst = instr.dst % RegistersCount;
ibc.type = InstructionType::IMUL_R;