mirror of
https://codeberg.org/wownero/RandomWOW
synced 2026-03-05 22:27:33 -05:00
Refactoring (#95)
* Blake2Generator::getInt32 renamed to getUInt32 to avoid confusion * isPowerOf2 renamed to isZeroOrPowerOf2 to avoid confusion * added asserts to validate the input/output size of AES functions * fixed possible overflow in JitCompilerX86::getCodeSize (unused function)
This commit is contained in:
@@ -446,7 +446,7 @@ namespace randomx {
|
||||
|
||||
void AssemblyGeneratorX86::h_IMUL_RCP(Instruction& instr, int i) {
|
||||
uint64_t divisor = instr.getImm32();
|
||||
if (!isPowerOf2(divisor)) {
|
||||
if (!isZeroOrPowerOf2(divisor)) {
|
||||
registerUsage[instr.dst] = i;
|
||||
asmCode << "\tmov rax, " << randomx_reciprocal(divisor) << std::endl;
|
||||
asmCode << "\timul " << regR[instr.dst] << ", rax" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user