Print average program code size

Fixed assembly for MUL_64 and IMUL_32
Division weight 4 -> 8
This commit is contained in:
tevador
2019-01-12 16:05:09 +01:00
parent 2756bcdcfe
commit 1426fcbab5
8 changed files with 337 additions and 225 deletions

View File

@@ -222,7 +222,7 @@ namespace RandomX {
void AssemblyGeneratorX86::h_MUL_64(Instruction& instr, int i) {
genar(instr, i);
asmCode << "\timul rax, ";
if ((instr.locb & 7) >= 6) {
if ((instr.locb & 3) == 0) {
asmCode << "rax, ";
}
genbia(instr);
@@ -250,7 +250,7 @@ namespace RandomX {
void AssemblyGeneratorX86::h_IMUL_32(Instruction& instr, int i) {
genar(instr, i);
asmCode << "\tmovsxd rcx, eax" << std::endl;
if ((instr.locb & 7) >= 6) {
if ((instr.locb & 3) == 0) {
asmCode << "\tmov rax, " << instr.imm32 << std::endl;
}
else {