[Project64] Update X86ops.cpp to use standard types
This commit is contained in:
parent
a6d1722122
commit
cfdb5dc8d0
|
@ -743,7 +743,7 @@ void CCodeBlock::CompileExitCode()
|
|||
{
|
||||
CPU_Message("");
|
||||
CPU_Message(" $Exit_%d",ExitIter->ID);
|
||||
SetJump32(ExitIter->JumpLoc,(DWORD *)m_RecompPos);
|
||||
SetJump32(ExitIter->JumpLoc,(uint32_t *)m_RecompPos);
|
||||
m_NextInstruction = ExitIter->NextInstruction;
|
||||
m_EnterSection->CompileExit((uint32_t)-1, ExitIter->TargetPC,ExitIter->ExitRegSet,ExitIter->reason,true,NULL);
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ CCodeSection::~CCodeSection()
|
|||
{
|
||||
}
|
||||
|
||||
void CCodeSection::CompileExit(DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, bool CompileNow, void(*x86Jmp)(const char * Label, DWORD Value))
|
||||
void CCodeSection::CompileExit(DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, bool CompileNow, void(*x86Jmp)(const char * Label, uint32_t Value))
|
||||
{
|
||||
if (!CompileNow)
|
||||
{
|
||||
|
@ -127,7 +127,7 @@ void CCodeSection::CompileExit(DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitRegSe
|
|||
ExitInfo.ExitRegSet = ExitRegSet;
|
||||
ExitInfo.reason = reason;
|
||||
ExitInfo.NextInstruction = m_NextInstruction;
|
||||
ExitInfo.JumpLoc = (DWORD *)(m_RecompPos - 4);
|
||||
ExitInfo.JumpLoc = (uint32_t *)(m_RecompPos - 4);
|
||||
m_BlockInfo->m_ExitInfo.push_back(ExitInfo);
|
||||
return;
|
||||
}
|
||||
|
@ -444,10 +444,10 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
}
|
||||
} else if (TargetSection[i] == NULL && JumpInfo[i]->FallThrough) {
|
||||
if (JumpInfo[i]->LinkLocation != NULL) {
|
||||
SetJump32(JumpInfo[i]->LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo[i]->LinkLocation,(uint32_t *)m_RecompPos);
|
||||
JumpInfo[i]->LinkLocation = NULL;
|
||||
if (JumpInfo[i]->LinkLocation2 != NULL) {
|
||||
SetJump32(JumpInfo[i]->LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo[i]->LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
JumpInfo[i]->LinkLocation2 = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -457,10 +457,10 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
if (!JumpInfo[i]->FallThrough) { continue; }
|
||||
if (JumpInfo[i]->TargetPC == TargetSection[i]->m_EnterPC) { continue; }
|
||||
if (JumpInfo[i]->LinkLocation != NULL) {
|
||||
SetJump32(JumpInfo[i]->LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo[i]->LinkLocation,(uint32_t *)m_RecompPos);
|
||||
JumpInfo[i]->LinkLocation = NULL;
|
||||
if (JumpInfo[i]->LinkLocation2 != NULL) {
|
||||
SetJump32(JumpInfo[i]->LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo[i]->LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
JumpInfo[i]->LinkLocation2 = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -488,10 +488,10 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
sprintf(Label,"Section_%d",TargetSection[i]->m_SectionID);
|
||||
JumpInfo[i]->FallThrough = false;
|
||||
if (JumpInfo[i]->LinkLocation != NULL) {
|
||||
SetJump32(JumpInfo[i]->LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo[i]->LinkLocation,(uint32_t *)m_RecompPos);
|
||||
JumpInfo[i]->LinkLocation = NULL;
|
||||
if (JumpInfo[i]->LinkLocation2 != NULL) {
|
||||
SetJump32(JumpInfo[i]->LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo[i]->LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
JumpInfo[i]->LinkLocation2 = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -524,7 +524,7 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
m_RegWorkingSet = JumpInfo[i]->RegSet;
|
||||
SyncRegState(TargetSection[i]->m_RegEnter);
|
||||
JmpLabel32(Label,0);
|
||||
SetJump32((DWORD *)m_RecompPos - 1,(DWORD *)(TargetSection[i]->m_CompiledLocation));
|
||||
SetJump32((uint32_t *)m_RecompPos - 1,(uint32_t *)(TargetSection[i]->m_CompiledLocation));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -582,10 +582,10 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
if (JumpInfo[i]->LinkLocation == NULL) { continue; }
|
||||
if (TargetSection[i] == NULL) {
|
||||
CPU_Message("ExitBlock (from %d):",m_SectionID);
|
||||
SetJump32(JumpInfo[i]->LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo[i]->LinkLocation,(uint32_t *)m_RecompPos);
|
||||
JumpInfo[i]->LinkLocation = NULL;
|
||||
if (JumpInfo[i]->LinkLocation2 != NULL) {
|
||||
SetJump32(JumpInfo[i]->LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo[i]->LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
JumpInfo[i]->LinkLocation2 = NULL;
|
||||
}
|
||||
CompileExit (JumpInfo[i]->JumpPC,JumpInfo[i]->TargetPC,JumpInfo[i]->RegSet,JumpInfo[i]->ExitReason,true,NULL);
|
||||
|
@ -602,10 +602,10 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
stdstr_f Label("Section_%d (from %d):",TargetSection[i]->m_SectionID,m_SectionID);
|
||||
|
||||
CPU_Message(Label.c_str());
|
||||
SetJump32(JumpInfo[i]->LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo[i]->LinkLocation,(uint32_t *)m_RecompPos);
|
||||
JumpInfo[i]->LinkLocation = NULL;
|
||||
if (JumpInfo[i]->LinkLocation2 != NULL) {
|
||||
SetJump32(JumpInfo[i]->LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo[i]->LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
JumpInfo[i]->LinkLocation2 = NULL;
|
||||
}
|
||||
m_RegWorkingSet = JumpInfo[i]->RegSet;
|
||||
|
@ -627,7 +627,7 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
m_RegWorkingSet = JumpInfo[i]->RegSet;
|
||||
SyncRegState(TargetSection[i]->m_RegEnter);
|
||||
JmpLabel32(Label.c_str(),0);
|
||||
SetJump32((DWORD *)m_RecompPos - 1,(DWORD *)(TargetSection[i]->m_CompiledLocation));
|
||||
SetJump32((uint32_t *)m_RecompPos - 1,(uint32_t *)(TargetSection[i]->m_CompiledLocation));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1658,9 +1658,9 @@ bool CCodeSection::InheritParentInfo()
|
|||
m_RegEnter = JumpInfo->RegSet;
|
||||
if (JumpInfo->LinkLocation != NULL) {
|
||||
CPU_Message(" Section_%d:",m_SectionID);
|
||||
SetJump32(JumpInfo->LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo->LinkLocation,(uint32_t *)m_RecompPos);
|
||||
if (JumpInfo->LinkLocation2 != NULL) {
|
||||
SetJump32(JumpInfo->LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo->LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
}
|
||||
}
|
||||
m_RegWorkingSet = m_RegEnter;
|
||||
|
@ -1743,10 +1743,10 @@ bool CCodeSection::InheritParentInfo()
|
|||
|
||||
if (JumpInfo->LinkLocation != NULL) {
|
||||
CPU_Message(" Section_%d (from %d):",m_SectionID,Parent->m_SectionID);
|
||||
SetJump32(JumpInfo->LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo->LinkLocation,(uint32_t *)m_RecompPos);
|
||||
JumpInfo->LinkLocation = NULL;
|
||||
if (JumpInfo->LinkLocation2 != NULL) {
|
||||
SetJump32(JumpInfo->LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo->LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
JumpInfo->LinkLocation2 = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -1981,10 +1981,10 @@ bool CCodeSection::InheritParentInfo()
|
|||
JumpInfo = ParentList[CurrentParent].JumpInfo;
|
||||
CPU_Message(" Section_%d (from %d):",m_SectionID,Parent->m_SectionID);
|
||||
if (JumpInfo->LinkLocation != NULL) {
|
||||
SetJump32(JumpInfo->LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo->LinkLocation,(uint32_t *)m_RecompPos);
|
||||
JumpInfo->LinkLocation = NULL;
|
||||
if (JumpInfo->LinkLocation2 != NULL) {
|
||||
SetJump32(JumpInfo->LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo->LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
JumpInfo->LinkLocation2 = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -2010,10 +2010,10 @@ bool CCodeSection::InheritParentInfo()
|
|||
JumpInfo = ParentList[i].JumpInfo;
|
||||
|
||||
if (JumpInfo->LinkLocation != NULL) {
|
||||
SetJump32(JumpInfo->LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo->LinkLocation,(uint32_t *)m_RecompPos);
|
||||
JumpInfo->LinkLocation = NULL;
|
||||
if (JumpInfo->LinkLocation2 != NULL) {
|
||||
SetJump32(JumpInfo->LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo->LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
JumpInfo->LinkLocation2 = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
void CompileCop1Test ();
|
||||
bool GenerateX86Code ( DWORD Test );
|
||||
void GenerateSectionLinkage ();
|
||||
void CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, bool CompileNow, void (*x86Jmp)(const char * Label, DWORD Value));
|
||||
void CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, bool CompileNow, void (*x86Jmp)(const char * Label, uint32_t Value));
|
||||
void DetermineLoop ( DWORD Test, DWORD Test2, DWORD TestID );
|
||||
bool FixConstants ( DWORD Test );
|
||||
CCodeSection * ExistingSection ( DWORD Addr, DWORD Test );
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
CRegInfo ExitRegSet;
|
||||
EXIT_REASON reason;
|
||||
STEP_TYPE NextInstruction;
|
||||
DWORD * JumpLoc; //32bit jump
|
||||
uint32_t * JumpLoc; //32bit jump
|
||||
};
|
||||
|
||||
typedef std::list<CExitInfo> EXIT_LIST;
|
||||
|
|
|
@ -132,20 +132,20 @@ void CRecompilerOps::Compile_Branch (CRecompilerOps::BranchFunction CompareFunc,
|
|||
if (m_Section->m_Jump.LinkLocation != NULL) {
|
||||
CPU_Message("");
|
||||
CPU_Message(" %s:",m_Section->m_Jump.BranchLabel.c_str());
|
||||
SetJump32((DWORD *)m_Section->m_Jump.LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Jump.LinkLocation,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Jump.LinkLocation = NULL;
|
||||
if (m_Section->m_Jump.LinkLocation2 != NULL) {
|
||||
SetJump32((DWORD *)m_Section->m_Jump.LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Jump.LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Jump.LinkLocation2 = NULL;
|
||||
}
|
||||
m_Section->m_Jump.FallThrough = true;
|
||||
} else if (m_Section->m_Cont.LinkLocation != NULL){
|
||||
CPU_Message("");
|
||||
CPU_Message(" %s:",m_Section->m_Cont.BranchLabel.c_str());
|
||||
SetJump32((DWORD *)m_Section->m_Cont.LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Cont.LinkLocation,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Cont.LinkLocation = NULL;
|
||||
if (m_Section->m_Cont.LinkLocation2 != NULL) {
|
||||
SetJump32((DWORD *)m_Section->m_Cont.LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Cont.LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Cont.LinkLocation2 = NULL;
|
||||
}
|
||||
m_Section->m_Cont.FallThrough = true;
|
||||
|
@ -179,10 +179,10 @@ void CRecompilerOps::Compile_Branch (CRecompilerOps::BranchFunction CompareFunc,
|
|||
|
||||
CPU_Message(" ");
|
||||
CPU_Message(" %s:",m_Section->m_Jump.BranchLabel.c_str());
|
||||
SetJump32(m_Section->m_Jump.LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Jump.LinkLocation,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Jump.LinkLocation = NULL;
|
||||
if (m_Section->m_Jump.LinkLocation2 != NULL) {
|
||||
SetJump32(m_Section->m_Jump.LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Jump.LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Jump.LinkLocation2 = NULL;
|
||||
}
|
||||
MoveConstToVariable(m_Section->m_Jump.TargetPC,&R4300iOp::m_JumpToLocation,"R4300iOp::m_JumpToLocation");
|
||||
|
@ -195,10 +195,10 @@ void CRecompilerOps::Compile_Branch (CRecompilerOps::BranchFunction CompareFunc,
|
|||
|
||||
CPU_Message(" ");
|
||||
CPU_Message(" %s:",m_Section->m_Cont.BranchLabel.c_str());
|
||||
SetJump32(m_Section->m_Cont.LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Cont.LinkLocation,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Cont.LinkLocation = NULL;
|
||||
if (m_Section->m_Cont.LinkLocation2 != NULL) {
|
||||
SetJump32(m_Section->m_Cont.LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Cont.LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Cont.LinkLocation2 = NULL;
|
||||
}
|
||||
MoveConstToVariable(m_Section->m_Cont.TargetPC,&R4300iOp::m_JumpToLocation,"R4300iOp::m_JumpToLocation");
|
||||
|
@ -254,10 +254,10 @@ void CRecompilerOps::Compile_Branch (CRecompilerOps::BranchFunction CompareFunc,
|
|||
|
||||
if (JumpInfo->LinkLocation != NULL) {
|
||||
CPU_Message(" %s:",JumpInfo->BranchLabel.c_str());
|
||||
SetJump32((DWORD *)JumpInfo->LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo->LinkLocation,(uint32_t *)m_RecompPos);
|
||||
JumpInfo->LinkLocation = NULL;
|
||||
if (JumpInfo->LinkLocation2 != NULL) {
|
||||
SetJump32((DWORD *)JumpInfo->LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)JumpInfo->LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
JumpInfo->LinkLocation2 = NULL;
|
||||
}
|
||||
JumpInfo->FallThrough = true;
|
||||
|
@ -363,10 +363,10 @@ void CRecompilerOps::Compile_BranchLikely (BranchFunction CompareFunc, bool Link
|
|||
if (m_Section->m_Jump.LinkLocation != NULL || m_Section->m_Jump.FallThrough)
|
||||
{
|
||||
if (m_Section->m_Jump.LinkLocation != NULL) {
|
||||
SetJump32(m_Section->m_Jump.LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Jump.LinkLocation,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Jump.LinkLocation = NULL;
|
||||
if (m_Section->m_Jump.LinkLocation2 != NULL) {
|
||||
SetJump32(m_Section->m_Jump.LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Jump.LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Jump.LinkLocation2 = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -380,10 +380,10 @@ void CRecompilerOps::Compile_BranchLikely (BranchFunction CompareFunc, bool Link
|
|||
}
|
||||
|
||||
if (m_Section->m_Cont.LinkLocation != NULL) {
|
||||
SetJump32(m_Section->m_Cont.LinkLocation,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Cont.LinkLocation,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Cont.LinkLocation = NULL;
|
||||
if (m_Section->m_Cont.LinkLocation2 != NULL) {
|
||||
SetJump32(m_Section->m_Cont.LinkLocation2,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)m_Section->m_Cont.LinkLocation2,(uint32_t *)m_RecompPos);
|
||||
m_Section->m_Cont.LinkLocation2 = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -5242,7 +5242,7 @@ void CRecompilerOps::CompileSystemCheck (DWORD TargetPC, const CRegInfo & RegSet
|
|||
ExitCodeBlock();
|
||||
CPU_Message("");
|
||||
CPU_Message(" $Continue_From_Interrupt_Test:");
|
||||
SetJump32(Jump,(DWORD *)m_RecompPos);
|
||||
SetJump32((uint32_t *)Jump,(uint32_t *)m_RecompPos);
|
||||
}
|
||||
|
||||
void CRecompilerOps::OverflowDelaySlot(bool TestTimer)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -13,291 +13,292 @@
|
|||
class CX86Ops
|
||||
{
|
||||
public:
|
||||
enum x86Reg {
|
||||
x86_EAX = 0,
|
||||
x86_EBX = 3,
|
||||
x86_ECX = 1,
|
||||
x86_EDX = 2,
|
||||
x86_ESI = 6,
|
||||
x86_EDI = 7,
|
||||
x86_EBP = 5,
|
||||
x86_ESP = 4,
|
||||
x86_Any8Bit = -3,
|
||||
x86_Any = -2,
|
||||
x86_Unknown = -1,
|
||||
enum x86Reg
|
||||
{
|
||||
x86_EAX = 0,
|
||||
x86_EBX = 3,
|
||||
x86_ECX = 1,
|
||||
x86_EDX = 2,
|
||||
x86_ESI = 6,
|
||||
x86_EDI = 7,
|
||||
x86_EBP = 5,
|
||||
x86_ESP = 4,
|
||||
x86_Any8Bit = -3,
|
||||
x86_Any = -2,
|
||||
x86_Unknown = -1,
|
||||
|
||||
x86_AL = 0, x86_BL = 3, x86_CL = 1, x86_DL = 2,
|
||||
x86_AH = 4, x86_BH = 7, x86_CH = 5, x86_DH = 6
|
||||
};
|
||||
x86_AL = 0, x86_BL = 3, x86_CL = 1, x86_DL = 2,
|
||||
x86_AH = 4, x86_BH = 7, x86_CH = 5, x86_DH = 6
|
||||
};
|
||||
|
||||
enum x86FpuValues {
|
||||
x86_ST_Unknown = -1,
|
||||
x86_ST0 = 0,
|
||||
x86_ST1 = 1,
|
||||
x86_ST2 = 2,
|
||||
x86_ST3 = 3,
|
||||
x86_ST4 = 4,
|
||||
x86_ST5 = 5,
|
||||
x86_ST6 = 6,
|
||||
x86_ST7 = 7
|
||||
};
|
||||
enum x86FpuValues
|
||||
{
|
||||
x86_ST_Unknown = -1,
|
||||
x86_ST0 = 0,
|
||||
x86_ST1 = 1,
|
||||
x86_ST2 = 2,
|
||||
x86_ST3 = 3,
|
||||
x86_ST4 = 4,
|
||||
x86_ST5 = 5,
|
||||
x86_ST6 = 6,
|
||||
x86_ST7 = 7
|
||||
};
|
||||
|
||||
enum Multipler
|
||||
{
|
||||
Multip_x1 = 1,
|
||||
Multip_x2 = 2,
|
||||
Multip_x4 = 4,
|
||||
Multip_x8 = 8
|
||||
};
|
||||
enum Multipler
|
||||
{
|
||||
Multip_x1 = 1,
|
||||
Multip_x2 = 2,
|
||||
Multip_x4 = 4,
|
||||
Multip_x8 = 8
|
||||
};
|
||||
|
||||
static x86Reg x86_Registers[8];
|
||||
static const char * x86_Name ( x86Reg Reg );
|
||||
static const char * x86_ByteName ( x86Reg Reg );
|
||||
static const char * x86_HalfName ( x86Reg Reg );
|
||||
static const char * fpu_Name ( x86FpuValues Reg );
|
||||
static x86Reg x86_Registers[8];
|
||||
static const char * x86_Name ( x86Reg Reg );
|
||||
static const char * x86_ByteName ( x86Reg Reg );
|
||||
static const char * x86_HalfName ( x86Reg Reg );
|
||||
static const char * fpu_Name ( x86FpuValues Reg );
|
||||
|
||||
protected:
|
||||
//Logging Functions
|
||||
static void WriteX86Comment ( LPCSTR Comment );
|
||||
static void WriteX86Label ( LPCSTR Label );
|
||||
//Logging Functions
|
||||
static void WriteX86Comment ( const char * Comment );
|
||||
static void WriteX86Label ( const char * Label );
|
||||
|
||||
static void AdcX86regToVariable ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void AdcConstToVariable ( void *Variable, const char * VariableName, BYTE Constant );
|
||||
static void AdcConstToX86Reg ( x86Reg Reg, DWORD Const );
|
||||
static void AdcVariableToX86reg ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void AdcX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void AddConstToVariable ( DWORD Const, void *Variable, const char * VariableName );
|
||||
static void AddConstToX86Reg ( x86Reg Reg, DWORD Const );
|
||||
static void AddVariableToX86reg ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void AddX86regToVariable ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void AddX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void AndConstToVariable ( DWORD Const, void *Variable, const char * VariableName );
|
||||
static void AndConstToX86Reg ( x86Reg Reg, DWORD Const );
|
||||
static void AndVariableToX86Reg ( void * Variable, const char * VariableName, x86Reg Reg );
|
||||
static void AndVariableDispToX86Reg ( void * Variable, const char * VariableName, x86Reg Reg, x86Reg AddrReg, Multipler Multiply);
|
||||
static void AndX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void X86HardBreakPoint ();
|
||||
static void X86BreakPoint ( const wchar_t * FileName, int LineNumber );
|
||||
static void Call_Direct ( void * FunctAddress, const char * FunctName );
|
||||
static void Call_Indirect ( void * FunctAddress, const char * FunctName );
|
||||
static void CompConstToVariable ( DWORD Const, void * Variable, const char * VariableName );
|
||||
static void CompConstToX86reg ( x86Reg Reg, DWORD Const );
|
||||
static void CompConstToX86regPointer ( x86Reg Reg, DWORD Const );
|
||||
static void CompX86regToVariable ( x86Reg Reg, void * Variable, const char * VariableName );
|
||||
static void CompVariableToX86reg ( x86Reg Reg, void * Variable, const char * VariableName );
|
||||
static void CompX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void DecX86reg ( x86Reg Reg );
|
||||
static void DivX86reg ( x86Reg reg );
|
||||
static void idivX86reg ( x86Reg reg );
|
||||
static void imulX86reg ( x86Reg reg );
|
||||
static void IncX86reg ( x86Reg Reg );
|
||||
static void JaeLabel8 ( const char * Label, BYTE Value );
|
||||
static void JaeLabel32 ( const char * Label, DWORD Value );
|
||||
static void JaLabel8 ( const char * Label, BYTE Value );
|
||||
static void JaLabel32 ( const char * Label, DWORD Value );
|
||||
static void JbLabel8 ( const char * Label, BYTE Value );
|
||||
static void JbLabel32 ( const char * Label, DWORD Value );
|
||||
static void JecxzLabel8 ( const char * Label, BYTE Value );
|
||||
static void JeLabel8 ( const char * Label, BYTE Value );
|
||||
static void JeLabel32 ( const char * Label, DWORD Value );
|
||||
static void JgeLabel32 ( const char * Label, DWORD Value );
|
||||
static void JgLabel8 ( const char * Label, BYTE Value );
|
||||
static void JgLabel32 ( const char * Label, DWORD Value );
|
||||
static void JleLabel8 ( const char * Label, BYTE Value );
|
||||
static void JleLabel32 ( const char * Label, DWORD Value );
|
||||
static void JlLabel8 ( const char * Label, BYTE Value );
|
||||
static void JlLabel32 ( const char * Label, DWORD Value );
|
||||
static void JmpDirectReg ( x86Reg reg );
|
||||
static void JmpIndirectLabel32 ( const char * Label, DWORD location );
|
||||
static void JmpIndirectReg ( x86Reg reg );
|
||||
static void JmpLabel8 ( const char * Label, BYTE Value );
|
||||
static void JmpLabel32 ( const char * Label, DWORD Value );
|
||||
static void JneLabel8 ( const char * Label, BYTE Value );
|
||||
static void JneLabel32 ( const char * Label, DWORD Value );
|
||||
static void JnsLabel8 ( const char * Label, BYTE Value );
|
||||
static void JnsLabel32 ( const char * Label, DWORD Value );
|
||||
static void JnzLabel8 ( const char * Label, BYTE Value );
|
||||
static void JnzLabel32 ( const char * Label, DWORD Value );
|
||||
static void JsLabel32 ( const char * Label, DWORD Value );
|
||||
static void JzLabel8 ( const char * Label, BYTE Value );
|
||||
static void JzLabel32 ( const char * Label, DWORD Value );
|
||||
static void LeaRegReg ( x86Reg RegDest, x86Reg RegSrc, DWORD Const, Multipler multiplier );
|
||||
static void LeaRegReg2 ( x86Reg RegDest, x86Reg RegSrc, x86Reg RegSrc2, Multipler multiplier );
|
||||
static void LeaSourceAndOffset ( x86Reg x86DestReg, x86Reg x86SourceReg, int offset );
|
||||
static void MoveConstByteToN64Mem ( BYTE Const, x86Reg AddrReg );
|
||||
static void MoveConstHalfToN64Mem ( WORD Const, x86Reg AddrReg );
|
||||
static void MoveConstByteToVariable ( BYTE Const, void * Variable, const char * VariableName );
|
||||
static void MoveConstByteToX86regPointer ( BYTE Const, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveConstHalfToVariable ( WORD Const, void * Variable, const char * VariableName );
|
||||
static void MoveConstHalfToX86regPointer ( WORD Const, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveConstToMemoryDisp ( DWORD Const, x86Reg AddrReg, DWORD Disp );
|
||||
static void MoveConstToN64Mem ( DWORD Const, x86Reg AddrReg );
|
||||
static void MoveConstToN64MemDisp ( DWORD Const, x86Reg AddrReg, BYTE Disp );
|
||||
static void MoveConstToVariable ( DWORD Const, void * Variable, const char * VariableName );
|
||||
static void MoveConstToX86Pointer ( DWORD Const, x86Reg X86Pointer );
|
||||
static void MoveConstToX86reg ( DWORD Const, x86Reg reg );
|
||||
static void MoveConstToX86regPointer ( DWORD Const, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveN64MemDispToX86reg ( x86Reg reg, x86Reg AddrReg, BYTE Disp );
|
||||
static void MoveN64MemToX86reg ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveN64MemToX86regByte ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveN64MemToX86regHalf ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveSxByteX86regPointerToX86reg ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg );
|
||||
static void MoveSxHalfX86regPointerToX86reg ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg );
|
||||
static void MoveSxN64MemToX86regByte ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveSxN64MemToX86regHalf ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveSxVariableToX86regByte ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveSxVariableToX86regHalf ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveVariableDispToX86Reg ( void * Variable, const char * VariableName, x86Reg Reg, x86Reg AddrReg, int Multiplier );
|
||||
static void MoveVariableToX86reg ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveVariableToX86regByte ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveVariableToX86regHalf ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveX86PointerToX86reg ( x86Reg reg, x86Reg X86Pointer );
|
||||
static void MoveX86PointerToX86regDisp ( x86Reg reg, x86Reg X86Pointer, BYTE Disp );
|
||||
static void MoveX86regByteToN64Mem ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveX86regByteToVariable ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void MoveX86regByteToX86regPointer ( x86Reg reg, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveX86regHalfToN64Mem ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveX86regHalfToVariable ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void MoveX86regHalfToX86regPointer ( x86Reg reg, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveX86regPointerToX86reg ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg );
|
||||
static void MoveX86regPointerToX86regDisp8 ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg, BYTE offset );
|
||||
static void MoveX86regToMemory ( x86Reg reg, x86Reg AddrReg, DWORD Disp );
|
||||
static void MoveX86regToN64Mem ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveX86regToN64MemDisp ( x86Reg reg, x86Reg AddrReg, BYTE Disp );
|
||||
static void MoveX86regToVariable ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void MoveX86RegToX86Reg ( x86Reg Source, x86Reg Destination );
|
||||
static void MoveX86regToX86Pointer ( x86Reg reg, x86Reg X86Pointer );
|
||||
static void MoveX86regToX86regPointer ( x86Reg reg, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveZxByteX86regPointerToX86reg ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg );
|
||||
static void MoveZxHalfX86regPointerToX86reg ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg );
|
||||
static void MoveZxN64MemToX86regByte ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveZxN64MemToX86regHalf ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveZxVariableToX86regByte ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveZxVariableToX86regHalf ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MulX86reg ( x86Reg reg );
|
||||
static void NotX86Reg ( x86Reg Reg );
|
||||
static void OrConstToVariable ( DWORD Const, void * Variable, const char * VariableName );
|
||||
static void OrConstToX86Reg ( DWORD Const, x86Reg reg );
|
||||
static void OrVariableToX86Reg ( void * Variable, const char * VariableName, x86Reg Reg );
|
||||
static void OrX86RegToVariable ( void * Variable, const char * VariableName, x86Reg Reg );
|
||||
static void OrX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void Push ( x86Reg reg );
|
||||
static void Pushad ();
|
||||
static void PushImm32 ( DWORD Value );
|
||||
static void PushImm32 ( const char * String, DWORD Value );
|
||||
static void Pop ( x86Reg reg );
|
||||
static void Popad ();
|
||||
static void Ret ();
|
||||
static void Seta ( x86Reg reg );
|
||||
static void Setae ( x86Reg reg );
|
||||
static void SetaVariable ( void * Variable, const char * VariableName );
|
||||
static void Setb ( x86Reg reg );
|
||||
static void SetbVariable ( void * Variable, const char * VariableName );
|
||||
static void Setg ( x86Reg reg );
|
||||
static void SetgVariable ( void * Variable, const char * VariableName );
|
||||
static void Setl ( x86Reg reg );
|
||||
static void SetlVariable ( void * Variable, const char * VariableName );
|
||||
static void Setz ( x86Reg reg );
|
||||
static void Setnz ( x86Reg reg );
|
||||
static void ShiftLeftDouble ( x86Reg Destination, x86Reg Source );
|
||||
static void ShiftLeftDoubleImmed ( x86Reg Destination, x86Reg Source, BYTE Immediate );
|
||||
static void ShiftLeftSign ( x86Reg reg );
|
||||
static void ShiftLeftSignImmed ( x86Reg reg, BYTE Immediate );
|
||||
static void ShiftRightDouble ( x86Reg Destination, x86Reg Source );
|
||||
static void ShiftRightDoubleImmed ( x86Reg Destination, x86Reg Source, BYTE Immediate );
|
||||
static void ShiftRightSign ( x86Reg reg );
|
||||
static void ShiftRightSignImmed ( x86Reg reg, BYTE Immediate );
|
||||
static void ShiftRightUnsign ( x86Reg reg );
|
||||
static void ShiftRightUnsignImmed ( x86Reg reg, BYTE Immediate );
|
||||
static void SbbConstFromX86Reg ( x86Reg Reg, DWORD Const );
|
||||
static void SbbVariableFromX86reg ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void SbbX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void SubConstFromVariable ( DWORD Const, void * Variable, const char * VariableName );
|
||||
static void SubConstFromX86Reg ( x86Reg Reg, DWORD Const );
|
||||
static void SubVariableFromX86reg ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void SubX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void TestConstToX86Reg ( DWORD Const, x86Reg reg );
|
||||
static void TestVariable ( DWORD Const, void * Variable, const char * VariableName );
|
||||
static void TestX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void XorConstToX86Reg ( x86Reg Reg, DWORD Const );
|
||||
static void XorX86RegToX86Reg ( x86Reg Source, x86Reg Destination );
|
||||
static void XorVariableToX86reg ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void AdcX86regToVariable ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void AdcConstToVariable ( void *Variable, const char * VariableName, uint8_t Constant );
|
||||
static void AdcConstToX86Reg ( x86Reg Reg, uint32_t Const );
|
||||
static void AdcVariableToX86reg ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void AdcX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void AddConstToVariable ( uint32_t Const, void *Variable, const char * VariableName );
|
||||
static void AddConstToX86Reg ( x86Reg Reg, uint32_t Const );
|
||||
static void AddVariableToX86reg ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void AddX86regToVariable ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void AddX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void AndConstToVariable ( uint32_t Const, void *Variable, const char * VariableName );
|
||||
static void AndConstToX86Reg ( x86Reg Reg, uint32_t Const );
|
||||
static void AndVariableToX86Reg ( void * Variable, const char * VariableName, x86Reg Reg );
|
||||
static void AndVariableDispToX86Reg ( void * Variable, const char * VariableName, x86Reg Reg, x86Reg AddrReg, Multipler Multiply);
|
||||
static void AndX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void X86HardBreakPoint ();
|
||||
static void X86BreakPoint ( const wchar_t * FileName, int32_t LineNumber );
|
||||
static void Call_Direct ( void * FunctAddress, const char * FunctName );
|
||||
static void Call_Indirect ( void * FunctAddress, const char * FunctName );
|
||||
static void CompConstToVariable ( uint32_t Const, void * Variable, const char * VariableName );
|
||||
static void CompConstToX86reg ( x86Reg Reg, uint32_t Const );
|
||||
static void CompConstToX86regPointer ( x86Reg Reg, uint32_t Const );
|
||||
static void CompX86regToVariable ( x86Reg Reg, void * Variable, const char * VariableName );
|
||||
static void CompVariableToX86reg ( x86Reg Reg, void * Variable, const char * VariableName );
|
||||
static void CompX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void DecX86reg ( x86Reg Reg );
|
||||
static void DivX86reg ( x86Reg reg );
|
||||
static void idivX86reg ( x86Reg reg );
|
||||
static void imulX86reg ( x86Reg reg );
|
||||
static void IncX86reg ( x86Reg Reg );
|
||||
static void JaeLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JaeLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JaLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JaLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JbLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JbLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JecxzLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JeLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JeLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JgeLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JgLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JgLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JleLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JleLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JlLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JlLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JmpDirectReg ( x86Reg reg );
|
||||
static void JmpIndirectLabel32 ( const char * Label, uint32_t location );
|
||||
static void JmpIndirectReg ( x86Reg reg );
|
||||
static void JmpLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JmpLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JneLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JneLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JnsLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JnsLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JnzLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JnzLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JsLabel32 ( const char * Label, uint32_t Value );
|
||||
static void JzLabel8 ( const char * Label, uint8_t Value );
|
||||
static void JzLabel32 ( const char * Label, uint32_t Value );
|
||||
static void LeaRegReg ( x86Reg RegDest, x86Reg RegSrc, uint32_t Const, Multipler multiplier );
|
||||
static void LeaRegReg2 ( x86Reg RegDest, x86Reg RegSrc, x86Reg RegSrc2, Multipler multiplier );
|
||||
static void LeaSourceAndOffset ( x86Reg x86DestReg, x86Reg x86SourceReg, int32_t offset );
|
||||
static void MoveConstByteToN64Mem ( uint8_t Const, x86Reg AddrReg );
|
||||
static void MoveConstHalfToN64Mem ( uint16_t Const, x86Reg AddrReg );
|
||||
static void MoveConstByteToVariable ( uint8_t Const, void * Variable, const char * VariableName );
|
||||
static void MoveConstByteToX86regPointer ( uint8_t Const, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveConstHalfToVariable ( uint16_t Const, void * Variable, const char * VariableName );
|
||||
static void MoveConstHalfToX86regPointer ( uint16_t Const, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveConstToMemoryDisp ( uint32_t Const, x86Reg AddrReg, uint32_t Disp );
|
||||
static void MoveConstToN64Mem ( uint32_t Const, x86Reg AddrReg );
|
||||
static void MoveConstToN64MemDisp ( uint32_t Const, x86Reg AddrReg, uint8_t Disp );
|
||||
static void MoveConstToVariable ( uint32_t Const, void * Variable, const char * VariableName );
|
||||
static void MoveConstToX86Pointer ( uint32_t Const, x86Reg X86Pointer );
|
||||
static void MoveConstToX86reg ( uint32_t Const, x86Reg reg );
|
||||
static void MoveConstToX86regPointer ( uint32_t Const, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveN64MemDispToX86reg ( x86Reg reg, x86Reg AddrReg, uint8_t Disp );
|
||||
static void MoveN64MemToX86reg ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveN64MemToX86regByte ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveN64MemToX86regHalf ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveSxByteX86regPointerToX86reg ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg );
|
||||
static void MoveSxHalfX86regPointerToX86reg ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg );
|
||||
static void MoveSxN64MemToX86regByte ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveSxN64MemToX86regHalf ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveSxVariableToX86regByte ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveSxVariableToX86regHalf ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveVariableDispToX86Reg ( void * Variable, const char * VariableName, x86Reg Reg, x86Reg AddrReg, int32_t Multiplier );
|
||||
static void MoveVariableToX86reg ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveVariableToX86regByte ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveVariableToX86regHalf ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveX86PointerToX86reg ( x86Reg reg, x86Reg X86Pointer );
|
||||
static void MoveX86PointerToX86regDisp ( x86Reg reg, x86Reg X86Pointer, uint8_t Disp );
|
||||
static void MoveX86regByteToN64Mem ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveX86regByteToVariable ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void MoveX86regByteToX86regPointer ( x86Reg reg, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveX86regHalfToN64Mem ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveX86regHalfToVariable ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void MoveX86regHalfToX86regPointer ( x86Reg reg, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveX86regPointerToX86reg ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg );
|
||||
static void MoveX86regPointerToX86regDisp8 ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg, uint8_t offset );
|
||||
static void MoveX86regToMemory ( x86Reg reg, x86Reg AddrReg, uint32_t Disp );
|
||||
static void MoveX86regToN64Mem ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveX86regToN64MemDisp ( x86Reg reg, x86Reg AddrReg, uint8_t Disp );
|
||||
static void MoveX86regToVariable ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void MoveX86RegToX86Reg ( x86Reg Source, x86Reg Destination );
|
||||
static void MoveX86regToX86Pointer ( x86Reg reg, x86Reg X86Pointer );
|
||||
static void MoveX86regToX86regPointer ( x86Reg reg, x86Reg AddrReg1, x86Reg AddrReg2 );
|
||||
static void MoveZxByteX86regPointerToX86reg ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg );
|
||||
static void MoveZxHalfX86regPointerToX86reg ( x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg );
|
||||
static void MoveZxN64MemToX86regByte ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveZxN64MemToX86regHalf ( x86Reg reg, x86Reg AddrReg );
|
||||
static void MoveZxVariableToX86regByte ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MoveZxVariableToX86regHalf ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
static void MulX86reg ( x86Reg reg );
|
||||
static void NotX86Reg ( x86Reg Reg );
|
||||
static void OrConstToVariable ( uint32_t Const, void * Variable, const char * VariableName );
|
||||
static void OrConstToX86Reg ( uint32_t Const, x86Reg reg );
|
||||
static void OrVariableToX86Reg ( void * Variable, const char * VariableName, x86Reg Reg );
|
||||
static void OrX86RegToVariable ( void * Variable, const char * VariableName, x86Reg Reg );
|
||||
static void OrX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void Push ( x86Reg reg );
|
||||
static void Pushad ();
|
||||
static void PushImm32 ( uint32_t Value );
|
||||
static void PushImm32 ( const char * String, uint32_t Value );
|
||||
static void Pop ( x86Reg reg );
|
||||
static void Popad ();
|
||||
static void Ret ();
|
||||
static void Seta ( x86Reg reg );
|
||||
static void Setae ( x86Reg reg );
|
||||
static void SetaVariable ( void * Variable, const char * VariableName );
|
||||
static void Setb ( x86Reg reg );
|
||||
static void SetbVariable ( void * Variable, const char * VariableName );
|
||||
static void Setg ( x86Reg reg );
|
||||
static void SetgVariable ( void * Variable, const char * VariableName );
|
||||
static void Setl ( x86Reg reg );
|
||||
static void SetlVariable ( void * Variable, const char * VariableName );
|
||||
static void Setz ( x86Reg reg );
|
||||
static void Setnz ( x86Reg reg );
|
||||
static void ShiftLeftDouble ( x86Reg Destination, x86Reg Source );
|
||||
static void ShiftLeftDoubleImmed ( x86Reg Destination, x86Reg Source, uint8_t Immediate );
|
||||
static void ShiftLeftSign ( x86Reg reg );
|
||||
static void ShiftLeftSignImmed ( x86Reg reg, uint8_t Immediate );
|
||||
static void ShiftRightDouble ( x86Reg Destination, x86Reg Source );
|
||||
static void ShiftRightDoubleImmed ( x86Reg Destination, x86Reg Source, uint8_t Immediate );
|
||||
static void ShiftRightSign ( x86Reg reg );
|
||||
static void ShiftRightSignImmed ( x86Reg reg, uint8_t Immediate );
|
||||
static void ShiftRightUnsign ( x86Reg reg );
|
||||
static void ShiftRightUnsignImmed ( x86Reg reg, uint8_t Immediate );
|
||||
static void SbbConstFromX86Reg ( x86Reg Reg, uint32_t Const );
|
||||
static void SbbVariableFromX86reg ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void SbbX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void SubConstFromVariable ( uint32_t Const, void * Variable, const char * VariableName );
|
||||
static void SubConstFromX86Reg ( x86Reg Reg, uint32_t Const );
|
||||
static void SubVariableFromX86reg ( x86Reg reg, void * Variable, const char * VariableName );
|
||||
static void SubX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void TestConstToX86Reg ( uint32_t Const, x86Reg reg );
|
||||
static void TestVariable ( uint32_t Const, void * Variable, const char * VariableName );
|
||||
static void TestX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void XorConstToX86Reg ( x86Reg Reg, uint32_t Const );
|
||||
static void XorX86RegToX86Reg ( x86Reg Source, x86Reg Destination );
|
||||
static void XorVariableToX86reg ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
|
||||
static void fpuAbs ();
|
||||
static void fpuAddDword ( void * Variable, const char * VariableName );
|
||||
static void fpuAddDwordRegPointer ( x86Reg x86Pointer );
|
||||
static void fpuAddQword ( void * Variable, const char * VariableName );
|
||||
static void fpuAddQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuAddReg ( x86FpuValues reg );
|
||||
static void fpuAddRegPop ( int32_t * StackPos, x86FpuValues reg );
|
||||
static void fpuComDword ( void * Variable, const char * VariableName, bool Pop );
|
||||
static void fpuComDwordRegPointer ( x86Reg X86Pointer, bool Pop );
|
||||
static void fpuComQword ( void * Variable, const char * VariableName, bool Pop );
|
||||
static void fpuComQwordRegPointer ( x86Reg X86Pointer, bool Pop );
|
||||
static void fpuComReg ( x86FpuValues reg, bool Pop );
|
||||
static void fpuDivDword ( void * Variable, const char * VariableName );
|
||||
static void fpuDivDwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuDivQword ( void * Variable, const char * VariableName );
|
||||
static void fpuDivQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuDivReg ( x86FpuValues Reg );
|
||||
static void fpuDivRegPop ( x86FpuValues reg );
|
||||
static void fpuExchange ( x86FpuValues Reg );
|
||||
static void fpuFree ( x86FpuValues Reg );
|
||||
static void fpuDecStack ( int32_t * StackPos );
|
||||
static void fpuIncStack ( int32_t * StackPos );
|
||||
static void fpuLoadControl ( void * Variable, const char * VariableName );
|
||||
static void fpuLoadDword ( int32_t * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadDwordFromX86Reg ( int32_t * StackPos, x86Reg reg );
|
||||
static void fpuLoadDwordFromN64Mem ( int32_t * StackPos, x86Reg reg );
|
||||
static void fpuLoadInt32bFromN64Mem ( int32_t * StackPos, x86Reg reg );
|
||||
static void fpuLoadIntegerDword ( int32_t * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadIntegerDwordFromX86Reg ( int32_t * StackPos,x86Reg Reg );
|
||||
static void fpuLoadIntegerQword ( int32_t * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadIntegerQwordFromX86Reg ( int32_t * StackPos,x86Reg Reg );
|
||||
static void fpuLoadQword ( int32_t * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadQwordFromX86Reg ( int32_t * StackPos, x86Reg Reg );
|
||||
static void fpuLoadQwordFromN64Mem ( int32_t * StackPos, x86Reg reg );
|
||||
static void fpuLoadReg ( int32_t * StackPos, x86FpuValues Reg );
|
||||
static void fpuMulDword ( void * Variable, const char * VariableName);
|
||||
static void fpuMulDwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuMulQword ( void * Variable, const char * VariableName);
|
||||
static void fpuMulQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuMulReg ( x86FpuValues reg );
|
||||
static void fpuMulRegPop ( x86FpuValues reg );
|
||||
static void fpuNeg ();
|
||||
static void fpuRound ();
|
||||
static void fpuSqrt ();
|
||||
static void fpuStoreControl ( void * Variable, const char * VariableName );
|
||||
static void fpuStoreDword ( int32_t * StackPos, void * Variable, const char * VariableName, bool pop );
|
||||
static void fpuStoreDwordFromX86Reg ( int32_t * StackPos,x86Reg Reg, bool pop );
|
||||
static void fpuStoreDwordToN64Mem ( int32_t * StackPos, x86Reg reg, bool Pop );
|
||||
static void fpuStoreIntegerDword ( int32_t * StackPos, void * Variable, const char * VariableName, bool pop );
|
||||
static void fpuStoreIntegerDwordFromX86Reg ( int32_t * StackPos,x86Reg Reg, bool pop );
|
||||
static void fpuStoreIntegerQword ( int32_t * StackPos, void * Variable, const char * VariableName, bool pop );
|
||||
static void fpuStoreIntegerQwordFromX86Reg ( int32_t * StackPos, x86Reg Reg, bool pop );
|
||||
static void fpuStoreQwordFromX86Reg ( int32_t * StackPos, x86Reg Reg, bool pop );
|
||||
static void fpuStoreStatus ();
|
||||
static void fpuSubDword ( void * Variable, const char * VariableName );
|
||||
static void fpuSubDwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuSubDwordReverse ( void * Variable, const char * VariableName );
|
||||
static void fpuSubQword ( void * Variable, const char * VariableName );
|
||||
static void fpuSubQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuSubQwordReverse ( void * Variable, const char * VariableName );
|
||||
static void fpuSubReg ( x86FpuValues reg );
|
||||
static void fpuSubRegPop ( x86FpuValues reg );
|
||||
|
||||
static void fpuAbs ();
|
||||
static void fpuAddDword ( void * Variable, const char * VariableName );
|
||||
static void fpuAddDwordRegPointer ( x86Reg x86Pointer );
|
||||
static void fpuAddQword ( void * Variable, const char * VariableName );
|
||||
static void fpuAddQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuAddReg ( x86FpuValues reg );
|
||||
static void fpuAddRegPop ( int * StackPos, x86FpuValues reg );
|
||||
static void fpuComDword ( void * Variable, const char * VariableName, bool Pop );
|
||||
static void fpuComDwordRegPointer ( x86Reg X86Pointer, bool Pop );
|
||||
static void fpuComQword ( void * Variable, const char * VariableName, bool Pop );
|
||||
static void fpuComQwordRegPointer ( x86Reg X86Pointer, bool Pop );
|
||||
static void fpuComReg ( x86FpuValues reg, bool Pop );
|
||||
static void fpuDivDword ( void * Variable, const char * VariableName );
|
||||
static void fpuDivDwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuDivQword ( void * Variable, const char * VariableName );
|
||||
static void fpuDivQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuDivReg ( x86FpuValues Reg );
|
||||
static void fpuDivRegPop ( x86FpuValues reg );
|
||||
static void fpuExchange ( x86FpuValues Reg );
|
||||
static void fpuFree ( x86FpuValues Reg );
|
||||
static void fpuDecStack ( int * StackPos );
|
||||
static void fpuIncStack ( int * StackPos );
|
||||
static void fpuLoadControl ( void * Variable, const char * VariableName );
|
||||
static void fpuLoadDword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadDwordFromX86Reg ( int * StackPos, x86Reg reg );
|
||||
static void fpuLoadDwordFromN64Mem ( int * StackPos, x86Reg reg );
|
||||
static void fpuLoadInt32bFromN64Mem ( int * StackPos, x86Reg reg );
|
||||
static void fpuLoadIntegerDword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadIntegerDwordFromX86Reg ( int * StackPos,x86Reg Reg );
|
||||
static void fpuLoadIntegerQword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadIntegerQwordFromX86Reg ( int * StackPos,x86Reg Reg );
|
||||
static void fpuLoadQword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadQwordFromX86Reg ( int * StackPos, x86Reg Reg );
|
||||
static void fpuLoadQwordFromN64Mem ( int * StackPos, x86Reg reg );
|
||||
static void fpuLoadReg ( int * StackPos, x86FpuValues Reg );
|
||||
static void fpuMulDword ( void * Variable, const char * VariableName);
|
||||
static void fpuMulDwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuMulQword ( void * Variable, const char * VariableName);
|
||||
static void fpuMulQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuMulReg ( x86FpuValues reg );
|
||||
static void fpuMulRegPop ( x86FpuValues reg );
|
||||
static void fpuNeg ();
|
||||
static void fpuRound ();
|
||||
static void fpuSqrt ();
|
||||
static void fpuStoreControl ( void * Variable, const char * VariableName );
|
||||
static void fpuStoreDword ( int * StackPos, void * Variable, const char * VariableName, bool pop );
|
||||
static void fpuStoreDwordFromX86Reg ( int * StackPos,x86Reg Reg, bool pop );
|
||||
static void fpuStoreDwordToN64Mem ( int * StackPos, x86Reg reg, bool Pop );
|
||||
static void fpuStoreIntegerDword ( int * StackPos, void * Variable, const char * VariableName, bool pop );
|
||||
static void fpuStoreIntegerDwordFromX86Reg ( int * StackPos,x86Reg Reg, bool pop );
|
||||
static void fpuStoreIntegerQword ( int * StackPos, void * Variable, const char * VariableName, bool pop );
|
||||
static void fpuStoreIntegerQwordFromX86Reg ( int * StackPos, x86Reg Reg, bool pop );
|
||||
static void fpuStoreQwordFromX86Reg ( int * StackPos, x86Reg Reg, bool pop );
|
||||
static void fpuStoreStatus ();
|
||||
static void fpuSubDword ( void * Variable, const char * VariableName );
|
||||
static void fpuSubDwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuSubDwordReverse ( void * Variable, const char * VariableName );
|
||||
static void fpuSubQword ( void * Variable, const char * VariableName );
|
||||
static void fpuSubQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuSubQwordReverse ( void * Variable, const char * VariableName );
|
||||
static void fpuSubReg ( x86FpuValues reg );
|
||||
static void fpuSubRegPop ( x86FpuValues reg );
|
||||
static bool Is8BitReg ( x86Reg Reg );
|
||||
static uint8_t CalcMultiplyCode ( Multipler Multiply );
|
||||
static uint8_t * m_RecompPos;
|
||||
|
||||
static bool Is8BitReg ( x86Reg Reg );
|
||||
static BYTE CalcMultiplyCode ( Multipler Multiply );
|
||||
static BYTE * m_RecompPos;
|
||||
|
||||
static void * GetAddressOf(int value, ...);
|
||||
static void SetJump32(DWORD * Loc, DWORD * JumpLoc );
|
||||
static void SetJump8(BYTE * Loc, BYTE * JumpLoc);
|
||||
static void * GetAddressOf(int32_t value, ...);
|
||||
static void SetJump32(uint32_t * Loc, uint32_t * JumpLoc );
|
||||
static void SetJump8(uint8_t * Loc, uint8_t * JumpLoc);
|
||||
|
||||
private:
|
||||
static void BreakPointNotification (const wchar_t * const FileName, const int LineNumber);
|
||||
static char m_fpupop[2][2];
|
||||
static void BreakPointNotification (const wchar_t * const FileName, const int32_t LineNumber);
|
||||
static char m_fpupop[2][2];
|
||||
};
|
||||
|
||||
#define AddressOf(Addr) CX86Ops::GetAddressOf(5,(Addr))
|
||||
|
|
Loading…
Reference in New Issue