don't generate code for a move from a register to itself

This commit is contained in:
Joel Dice 2008-05-17 18:13:27 -06:00
parent 85a772b0a7
commit 15c2eb13f2

View File

@ -714,9 +714,11 @@ moveRR(Context* c, unsigned size, Assembler::Register* a,
case 8:
case 4:
rex(c);
c->code.append(0x89);
c->code.append(0xc0 | (a->low << 3) | b->low);
if (a->low != b->low) {
rex(c);
c->code.append(0x89);
c->code.append(0xc0 | (a->low << 3) | b->low);
}
break;
}
}