mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +00:00
CPU/Recompiler: Tiny optimization for div on x64
This commit is contained in:
parent
25d4060bce
commit
663dc496bf
|
@ -785,6 +785,15 @@ void CodeGenerator::EmitDiv(HostReg to_reg_quotient, HostReg to_reg_remainder, H
|
||||||
// what we want, but swapped, so exchange them
|
// what we want, but swapped, so exchange them
|
||||||
m_emit->xchg(m_emit->rax, m_emit->rdx);
|
m_emit->xchg(m_emit->rax, m_emit->rdx);
|
||||||
}
|
}
|
||||||
|
else if (to_reg_quotient != Xbyak::Operand::RAX && to_reg_quotient != Xbyak::Operand::RDX &&
|
||||||
|
to_reg_remainder != Xbyak::Operand::RAX && to_reg_remainder != Xbyak::Operand::RDX)
|
||||||
|
{
|
||||||
|
// store to the registers we want.. this could be optimized better
|
||||||
|
if (to_reg_quotient != HostReg_Count)
|
||||||
|
m_emit->mov(GetHostReg64(to_reg_quotient), m_emit->rax);
|
||||||
|
if (to_reg_remainder != HostReg_Count)
|
||||||
|
m_emit->mov(GetHostReg64(to_reg_remainder), m_emit->rdx);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// store to the registers we want.. this could be optimized better
|
// store to the registers we want.. this could be optimized better
|
||||||
|
|
Loading…
Reference in a new issue