mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-08 10:35:47 +00:00
Add MOV optimization and MOV_sum
Replaces incarnations of the A=B+C pattern throughout the code so we can apply optimizations consistently.
This commit is contained in:
parent
adcef046f6
commit
1e08ad0d97
5 changed files with 92 additions and 88 deletions
|
@ -310,6 +310,7 @@ struct OpArg
|
|||
}
|
||||
bool IsSimpleReg() const { return scale == SCALE_NONE; }
|
||||
bool IsSimpleReg(X64Reg reg) const { return IsSimpleReg() && GetSimpleReg() == reg; }
|
||||
bool IsZero() const { return IsImm() && offset == 0; }
|
||||
int GetImmBits() const
|
||||
{
|
||||
switch (scale)
|
||||
|
@ -639,6 +640,7 @@ public:
|
|||
void TEST(int bits, const OpArg& a1, const OpArg& a2);
|
||||
|
||||
void CMP_or_TEST(int bits, const OpArg& a1, const OpArg& a2);
|
||||
void MOV_sum(int bits, X64Reg dest, const OpArg& a1, const OpArg& a2);
|
||||
|
||||
// Are these useful at all? Consider removing.
|
||||
void XCHG(int bits, const OpArg& a1, const OpArg& a2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue