Fixing div.
This commit is contained in:
parent
5309356908
commit
c5b70e615f
|
@ -2199,7 +2199,9 @@ table->AddSequence(OPCODE_DIV, [](X64Emitter& e, Instr*& i) {
|
||||||
// RAX = value, RDX = clobbered
|
// RAX = value, RDX = clobbered
|
||||||
// TODO(benvanik): make the register allocator put dest_src in RAX?
|
// TODO(benvanik): make the register allocator put dest_src in RAX?
|
||||||
auto Nax = LIKE_REG(e.rax, dest_src);
|
auto Nax = LIKE_REG(e.rax, dest_src);
|
||||||
|
auto Ndx = LIKE_REG(e.rdx, dest_src);
|
||||||
e.mov(Nax, dest_src);
|
e.mov(Nax, dest_src);
|
||||||
|
e.xor(Ndx, Ndx);
|
||||||
if (i.flags & ARITHMETIC_UNSIGNED) {
|
if (i.flags & ARITHMETIC_UNSIGNED) {
|
||||||
e.div(src);
|
e.div(src);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue