mirror of
https://codeberg.org/wownero/RandomWOW
synced 2026-03-06 06:37:33 -05:00
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:
@@ -477,7 +477,7 @@ int analyze(randomx::Program& p) {
|
||||
}
|
||||
|
||||
if (opcode < randomx::ceil_IMUL_RCP) {
|
||||
uint64_t divisor = instr.getImm32();
|
||||
const uint32_t divisor = instr.getImm32();
|
||||
if (!randomx::isZeroOrPowerOf2(divisor)) {
|
||||
instr.dst = instr.dst % randomx::RegistersCount;
|
||||
instr.opcode |= DST_INT;
|
||||
|
||||
Reference in New Issue
Block a user