[Android] Rename some variable names in ArmOps.h

This commit is contained in:
zilmar 2017-01-10 17:54:11 +11:00
parent e65fd32de4
commit 5febae4ec9
2 changed files with 40 additions and 40 deletions

View File

@ -18,11 +18,11 @@
#include <Project64-core/N64System/Recompiler/Arm/ArmRegInfo.h> #include <Project64-core/N64System/Recompiler/Arm/ArmRegInfo.h>
CArmRegInfo CArmOps::m_RegWorkingSet; CArmRegInfo CArmOps::m_RegWorkingSet;
bool CArmOps::mInItBlock = false; bool CArmOps::m_InItBlock = false;
int CArmOps::mItBlockInstruction = 0; int CArmOps::m_ItBlockInstruction = 0;
CArmOps::ArmCompareType CArmOps::mItBlockCompareType; CArmOps::ArmCompareType CArmOps::m_ItBlockCompareType;
CArmOps::ArmItMask CArmOps::mItBlockMask; CArmOps::ArmItMask CArmOps::m_ItBlockMask;
CArmOps::ArmReg CArmOps::mLastStoreReg; CArmOps::ArmReg CArmOps::m_LastStoreReg;
/************************************************************************** /**************************************************************************
* Logging Functions * * Logging Functions *
@ -319,14 +319,14 @@ void CArmOps::MoveArmRegToVariable(ArmReg Reg, void * Variable, const char * Var
void CArmOps::MoveConstToArmReg(ArmReg Reg, uint16_t value, const char * comment) void CArmOps::MoveConstToArmReg(ArmReg Reg, uint16_t value, const char * comment)
{ {
if (Reg == mLastStoreReg) if (Reg == m_LastStoreReg)
{ {
ArmNop(); ArmNop();
} }
PreOpCheck(true,__FILE__,__LINE__); PreOpCheck(true,__FILE__,__LINE__);
if ((value & 0xFF00) == 0 && Reg <= 7) if ((value & 0xFF00) == 0 && Reg <= 7)
{ {
CPU_Message(" mov%s\t%s, #0x%X\t; %s", mInItBlock ? ArmCurrentItCondition() : "s", ArmRegName(Reg), (uint32_t)value, comment != NULL ? comment : stdstr_f("0x%X", (uint32_t)value).c_str()); CPU_Message(" mov%s\t%s, #0x%X\t; %s", m_InItBlock ? ArmCurrentItCondition() : "s", ArmRegName(Reg), (uint32_t)value, comment != NULL ? comment : stdstr_f("0x%X", (uint32_t)value).c_str());
ArmThumbOpcode op = { 0 }; ArmThumbOpcode op = { 0 };
op.Imm8.imm8 = value; op.Imm8.imm8 = value;
op.Imm8.rdn = Reg; op.Imm8.rdn = Reg;
@ -335,7 +335,7 @@ void CArmOps::MoveConstToArmReg(ArmReg Reg, uint16_t value, const char * comment
} }
else if (CanThumbCompressConst(value)) else if (CanThumbCompressConst(value))
{ {
CPU_Message(" mov%s.w\t%s, #0x%X\t; %s", mInItBlock ? ArmCurrentItCondition() : "", ArmRegName(Reg), (uint32_t)value, comment != NULL ? comment : stdstr_f("0x%X", (uint32_t)value).c_str()); CPU_Message(" mov%s.w\t%s, #0x%X\t; %s", m_InItBlock ? ArmCurrentItCondition() : "", ArmRegName(Reg), (uint32_t)value, comment != NULL ? comment : stdstr_f("0x%X", (uint32_t)value).c_str());
uint16_t CompressedValue = ThumbCompressConst(value); uint16_t CompressedValue = ThumbCompressConst(value);
Arm32Opcode op = { 0 }; Arm32Opcode op = { 0 };
op.imm8_3_1.rn = 0xF; op.imm8_3_1.rn = 0xF;
@ -352,7 +352,7 @@ void CArmOps::MoveConstToArmReg(ArmReg Reg, uint16_t value, const char * comment
} }
else else
{ {
CPU_Message(" movw%s\t%s, #0x%X\t; %s", mInItBlock ? ArmCurrentItCondition() : "", ArmRegName(Reg), (uint32_t)value, comment != NULL ? comment : stdstr_f("0x%X", (uint32_t)value).c_str()); CPU_Message(" movw%s\t%s, #0x%X\t; %s", m_InItBlock ? ArmCurrentItCondition() : "", ArmRegName(Reg), (uint32_t)value, comment != NULL ? comment : stdstr_f("0x%X", (uint32_t)value).c_str());
Arm32Opcode op = { 0 }; Arm32Opcode op = { 0 };
op.imm16.opcode = ArmMOV_IMM16; op.imm16.opcode = ArmMOV_IMM16;
@ -366,7 +366,7 @@ void CArmOps::MoveConstToArmReg(ArmReg Reg, uint16_t value, const char * comment
AddCode32(op.Hex); AddCode32(op.Hex);
} }
if (mInItBlock) if (m_InItBlock)
{ {
ProgressItBlock(); ProgressItBlock();
} }
@ -466,10 +466,10 @@ void CArmOps::IfBlock(ArmItMask mask, ArmCompareType CompareType)
PreOpCheck(false,__FILE__,__LINE__); PreOpCheck(false,__FILE__,__LINE__);
CPU_Message(" it%s\t%s", ArmItMaskName(mask), ArmCompareSuffix(CompareType)); CPU_Message(" it%s\t%s", ArmItMaskName(mask), ArmCompareSuffix(CompareType));
mInItBlock = true; m_InItBlock = true;
mItBlockInstruction = 0; m_ItBlockInstruction = 0;
mItBlockCompareType = CompareType; m_ItBlockCompareType = CompareType;
mItBlockMask = mask; m_ItBlockMask = mask;
uint8_t computed_mask = 0; uint8_t computed_mask = 0;
switch (mask) switch (mask)
@ -1086,7 +1086,7 @@ void CArmOps::StoreArmRegToArmRegPointer(ArmReg DestReg, ArmReg RegPointer, uint
op.Imm5.opcode = ArmSTR_ThumbImm; op.Imm5.opcode = ArmSTR_ThumbImm;
AddCode16(op.Hex); AddCode16(op.Hex);
} }
mLastStoreReg = DestReg; m_LastStoreReg = DestReg;
} }
void CArmOps::StoreArmRegToArmRegPointer(ArmReg DestReg, ArmReg RegPointer, ArmReg RegPointer2, uint8_t shift) void CArmOps::StoreArmRegToArmRegPointer(ArmReg DestReg, ArmReg RegPointer, ArmReg RegPointer2, uint8_t shift)
@ -1498,11 +1498,11 @@ void * CArmOps::GetAddressOf(int value, ...)
void CArmOps::PreOpCheck(bool AllowedInItBlock, const char * FileName, uint32_t LineNumber) void CArmOps::PreOpCheck(bool AllowedInItBlock, const char * FileName, uint32_t LineNumber)
{ {
if (!AllowedInItBlock && mInItBlock) if (!AllowedInItBlock && m_InItBlock)
{ {
g_Notify->BreakPoint(FileName, LineNumber); g_Notify->BreakPoint(FileName, LineNumber);
} }
mLastStoreReg = Arm_Unknown; m_LastStoreReg = Arm_Unknown;
} }
void CArmOps::BreakPointNotification(const char * FileName, uint32_t LineNumber) void CArmOps::BreakPointNotification(const char * FileName, uint32_t LineNumber)
@ -1650,17 +1650,17 @@ const char * CArmOps::ArmItMaskName(ArmItMask mask)
const char * CArmOps::ArmCurrentItCondition() const char * CArmOps::ArmCurrentItCondition()
{ {
if (mItBlockInstruction == 0) if (m_ItBlockInstruction == 0)
{ {
return ArmCompareSuffix(mItBlockCompareType); return ArmCompareSuffix(m_ItBlockCompareType);
} }
if (mItBlockInstruction == 1 && mItBlockMask == ItMask_T) if (m_ItBlockInstruction == 1 && m_ItBlockMask == ItMask_T)
{ {
return ArmCompareSuffix(mItBlockCompareType); return ArmCompareSuffix(m_ItBlockCompareType);
} }
if (mItBlockInstruction == 1 && mItBlockMask == ItMask_E) if (m_ItBlockInstruction == 1 && m_ItBlockMask == ItMask_E)
{ {
return ArmCompareSuffix(ArmCompareInverseType(mItBlockCompareType)); return ArmCompareSuffix(ArmCompareInverseType(m_ItBlockCompareType));
} }
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
return ""; return "";
@ -1669,32 +1669,32 @@ const char * CArmOps::ArmCurrentItCondition()
void CArmOps::ProgressItBlock ( void ) void CArmOps::ProgressItBlock ( void )
{ {
bool itBlockDone = false; bool itBlockDone = false;
mItBlockInstruction += 1; m_ItBlockInstruction += 1;
if (mItBlockInstruction == 1) if (m_ItBlockInstruction == 1)
{ {
if (mItBlockMask == ItMask_None) if (m_ItBlockMask == ItMask_None)
{ {
itBlockDone = true; itBlockDone = true;
} }
} }
else if (mItBlockInstruction == 2) else if (m_ItBlockInstruction == 2)
{ {
if (mItBlockMask == ItMask_T || mItBlockMask == ItMask_E) if (m_ItBlockMask == ItMask_T || m_ItBlockMask == ItMask_E)
{ {
itBlockDone = true; itBlockDone = true;
} }
} }
else if (mItBlockInstruction == 3) else if (m_ItBlockInstruction == 3)
{ {
if (mItBlockMask == ItMask_TT || mItBlockMask == ItMask_ET || mItBlockMask == ItMask_TE || mItBlockMask == ItMask_EE) if (m_ItBlockMask == ItMask_TT || m_ItBlockMask == ItMask_ET || m_ItBlockMask == ItMask_TE || m_ItBlockMask == ItMask_EE)
{ {
itBlockDone = true; itBlockDone = true;
} }
} }
else if (mItBlockInstruction == 4) else if (m_ItBlockInstruction == 4)
{ {
if (mItBlockMask == ItMask_TTT || mItBlockMask == ItMask_ETT || mItBlockMask == ItMask_TET || mItBlockMask == ItMask_EET || if (m_ItBlockMask == ItMask_TTT || m_ItBlockMask == ItMask_ETT || m_ItBlockMask == ItMask_TET || m_ItBlockMask == ItMask_EET ||
mItBlockMask == ItMask_TTE || mItBlockMask == ItMask_ETE || mItBlockMask == ItMask_TEE || mItBlockMask == ItMask_EEE) m_ItBlockMask == ItMask_TTE || m_ItBlockMask == ItMask_ETE || m_ItBlockMask == ItMask_TEE || m_ItBlockMask == ItMask_EEE)
{ {
itBlockDone = true; itBlockDone = true;
} }
@ -1706,8 +1706,8 @@ void CArmOps::ProgressItBlock ( void )
if (itBlockDone) if (itBlockDone)
{ {
mInItBlock = false; m_InItBlock = false;
mItBlockInstruction = 0; m_ItBlockInstruction = 0;
} }
} }

View File

@ -239,11 +239,11 @@ private:
static void AddCode16(uint16_t value); static void AddCode16(uint16_t value);
static void AddCode32(uint32_t value); static void AddCode32(uint32_t value);
static bool mInItBlock; static bool m_InItBlock;
static int mItBlockInstruction; static int m_ItBlockInstruction;
static ArmCompareType mItBlockCompareType; static ArmCompareType m_ItBlockCompareType;
static ArmItMask mItBlockMask; static ArmItMask m_ItBlockMask;
static ArmReg mLastStoreReg; static ArmReg m_LastStoreReg;
}; };
#define AddressOf(Addr) CArmOps::GetAddressOf(5,(Addr)) #define AddressOf(Addr) CArmOps::GetAddressOf(5,(Addr))