[Android] Add XorArmRegToArmReg

This commit is contained in:
zilmar 2016-10-01 10:43:31 +10:00
parent 25954e657e
commit 338881c4ab
2 changed files with 18 additions and 0 deletions

View File

@ -809,6 +809,23 @@ void CArmOps::TestVariable(uint32_t Const, void * Variable, const char * Variabl
CompareArmRegToArmReg(Arm_R2,Arm_R3);
}
void CArmOps::XorArmRegToArmReg(ArmReg DestReg, ArmReg SourceReg)
{
if (SourceReg <= 7 && DestReg <= 7)
{
CPU_Message(" eors\t%s, %s", ArmRegName(DestReg), ArmRegName(SourceReg));
ArmThumbOpcode op = {0};
op.Reg2.rn = DestReg;
op.Reg2.rm = SourceReg;
op.Reg2.opcode = 0x101;
AddCode16(op.Hex);
}
else
{
XorArmRegToArmReg(DestReg, DestReg, SourceReg);
}
}
void CArmOps::XorConstToArmReg(ArmReg DestReg, uint32_t value)
{
if (value == 0)

View File

@ -174,6 +174,7 @@ protected:
static void SubConstFromVariable(uint32_t Const, void * Variable, const char * VariableName);
static void TestVariable(uint32_t Const, void * Variable, const char * VariableName);
static void XorConstToArmReg(ArmReg DestReg, uint32_t value);
static void XorArmRegToArmReg(ArmReg DestReg, ArmReg SourceReg);
static bool CanThumbCompressConst (uint32_t value);
static uint16_t ThumbCompressConst (uint32_t value);