Merge pull request #2975 from lioncash/emit
x64Emitter: Simplify/compress some conditionals
This commit is contained in:
commit
0c381d6547
|
@ -166,16 +166,7 @@ struct OpArg
|
||||||
bool IsSimpleReg() const {return scale == SCALE_NONE;}
|
bool IsSimpleReg() const {return scale == SCALE_NONE;}
|
||||||
bool IsSimpleReg(X64Reg reg) const
|
bool IsSimpleReg(X64Reg reg) const
|
||||||
{
|
{
|
||||||
if (!IsSimpleReg())
|
return IsSimpleReg() && GetSimpleReg() == reg;
|
||||||
return false;
|
|
||||||
return GetSimpleReg() == reg;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CanDoOpWith(const OpArg& other) const
|
|
||||||
{
|
|
||||||
if (IsSimpleReg()) return true;
|
|
||||||
if (!IsSimpleReg() && !other.IsSimpleReg() && !other.IsImm()) return false;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetImmBits() const
|
int GetImmBits() const
|
||||||
|
|
Loading…
Reference in New Issue