Core: remove x86 functions referencing n64mem

This commit is contained in:
zilmar 2022-11-07 11:30:51 +10:30
parent 40456f12db
commit eb0aa05a48
2 changed files with 0 additions and 367 deletions

View File

@ -918,145 +918,6 @@ void CX86Ops::MoveConstToX86regPointer(uint32_t Const, x86Reg AddrReg1, x86Reg A
AddCode32(Const);
}
void CX86Ops::MoveN64MemDispToX86reg(x86Reg Reg, x86Reg AddrReg, uint8_t Disp)
{
uint16_t x86Command = 0;
CodeLog(" mov %s, dword ptr [%s+N64mem+%Xh]", x86_Name(Reg), x86_Name(AddrReg), Disp);
switch (AddrReg)
{
case x86_EAX: x86Command = 0x008B; break;
case x86_EBX: x86Command = 0x038B; break;
case x86_ECX: x86Command = 0x018B; break;
case x86_EDX: x86Command = 0x028B; break;
case x86_ESI: x86Command = 0x068B; break;
case x86_EDI: x86Command = 0x078B; break;
case x86_ESP: x86Command = 0x048B; break;
case x86_EBP: x86Command = 0x058B; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
switch (Reg)
{
case x86_EAX: x86Command += 0x8000; break;
case x86_EBX: x86Command += 0x9800; break;
case x86_ECX: x86Command += 0x8800; break;
case x86_EDX: x86Command += 0x9000; break;
case x86_ESI: x86Command += 0xB000; break;
case x86_EDI: x86Command += 0xB800; break;
case x86_ESP: x86Command += 0xA000; break;
case x86_EBP: x86Command += 0xA800; break;
}
AddCode16(x86Command);
AddCode32((uint32_t)(g_MMU->Rdram() + Disp));
}
void CX86Ops::MoveN64MemToX86reg(x86Reg Reg, x86Reg AddrReg)
{
uint16_t x86Command = 0;
CodeLog(" mov %s, dword ptr [%s+N64mem]", x86_Name(Reg), x86_Name(AddrReg));
switch (AddrReg)
{
case x86_EAX: x86Command = 0x008B; break;
case x86_EBX: x86Command = 0x038B; break;
case x86_ECX: x86Command = 0x018B; break;
case x86_EDX: x86Command = 0x028B; break;
case x86_ESI: x86Command = 0x068B; break;
case x86_EDI: x86Command = 0x078B; break;
case x86_ESP: x86Command = 0x048B; break;
case x86_EBP: x86Command = 0x058B; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
switch (Reg)
{
case x86_EAX: x86Command += 0x8000; break;
case x86_EBX: x86Command += 0x9800; break;
case x86_ECX: x86Command += 0x8800; break;
case x86_EDX: x86Command += 0x9000; break;
case x86_ESI: x86Command += 0xB000; break;
case x86_EDI: x86Command += 0xB800; break;
case x86_ESP: x86Command += 0xA000; break;
case x86_EBP: x86Command += 0xA800; break;
}
AddCode16(x86Command);
AddCode32((uint32_t)g_MMU->Rdram());
}
void CX86Ops::MoveN64MemToX86regByte(x86Reg Reg, x86Reg AddrReg)
{
uint16_t x86Command = 0;
CodeLog(" mov %s, byte ptr [%s+N64mem]", x86_ByteName(Reg), x86_Name(AddrReg));
switch (AddrReg)
{
case x86_EAX: x86Command = 0x008A; break;
case x86_EBX: x86Command = 0x038A; break;
case x86_ECX: x86Command = 0x018A; break;
case x86_EDX: x86Command = 0x028A; break;
case x86_ESI: x86Command = 0x068A; break;
case x86_EDI: x86Command = 0x078A; break;
case x86_ESP: x86Command = 0x048A; break;
case x86_EBP: x86Command = 0x058A; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
switch (Reg)
{
case x86_EAX: x86Command += 0x8000; break;
case x86_EBX: x86Command += 0x9800; break;
case x86_ECX: x86Command += 0x8800; break;
case x86_EDX:
x86Command += 0x9000;
break;
// case x86_ESI: x86Command += 0xB000; break;
// case x86_EDI: x86Command += 0xB800; break;
// case x86_ESP: case x86_EBP:
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
break;
}
AddCode16(x86Command);
AddCode32((uint32_t)g_MMU->Rdram());
}
void CX86Ops::MoveN64MemToX86regHalf(x86Reg Reg, x86Reg AddrReg)
{
uint16_t x86Command = 0;
CodeLog(" mov %s, word ptr [%s+N64mem]", x86_HalfName(Reg), x86_Name(AddrReg));
AddCode8(0x66);
switch (AddrReg)
{
case x86_EAX: x86Command = 0x008B; break;
case x86_EBX: x86Command = 0x038B; break;
case x86_ECX: x86Command = 0x018B; break;
case x86_EDX: x86Command = 0x028B; break;
case x86_ESI: x86Command = 0x068B; break;
case x86_EDI: x86Command = 0x078B; break;
case x86_ESP: x86Command = 0x048B; break;
case x86_EBP: x86Command = 0x058B; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
switch (Reg)
{
case x86_EAX: x86Command += 0x8000; break;
case x86_EBX: x86Command += 0x9800; break;
case x86_ECX: x86Command += 0x8800; break;
case x86_EDX: x86Command += 0x9000; break;
case x86_ESI: x86Command += 0xB000; break;
case x86_EDI: x86Command += 0xB800; break;
case x86_ESP: x86Command += 0xA000; break;
case x86_EBP: x86Command += 0xA800; break;
}
AddCode16(x86Command);
AddCode32((uint32_t)g_MMU->Rdram());
}
void CX86Ops::MoveSxByteX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg Reg)
{
uint8_t Param = 0;
@ -1155,79 +1016,6 @@ void CX86Ops::MoveSxHalfX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2,
AddCode8(Param);
}
void CX86Ops::MoveSxN64MemToX86regByte(x86Reg Reg, x86Reg AddrReg)
{
uint16_t x86Command = 0;
CodeLog(" movsx %s, byte ptr [%s+Dmem]", x86_Name(Reg), x86_Name(AddrReg));
switch (AddrReg)
{
case x86_EAX: x86Command = 0x00BE; break;
case x86_EBX: x86Command = 0x03BE; break;
case x86_ECX: x86Command = 0x01BE; break;
case x86_EDX: x86Command = 0x02BE; break;
case x86_ESI: x86Command = 0x06BE; break;
case x86_EDI: x86Command = 0x07BE; break;
case x86_ESP: x86Command = 0x04BE; break;
case x86_EBP: x86Command = 0x05BE; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
switch (Reg)
{
case x86_EAX: x86Command += 0x8000; break;
case x86_EBX: x86Command += 0x9800; break;
case x86_ECX: x86Command += 0x8800; break;
case x86_EDX: x86Command += 0x9000; break;
case x86_ESI: x86Command += 0xB000; break;
case x86_EDI: x86Command += 0xB800; break;
case x86_ESP: x86Command += 0xA000; break;
case x86_EBP: x86Command += 0xA800; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
break;
}
AddCode8(0x0f);
AddCode16(x86Command);
AddCode32((uint32_t)g_MMU->Rdram());
}
void CX86Ops::MoveSxN64MemToX86regHalf(x86Reg Reg, x86Reg AddrReg)
{
uint16_t x86Command = 0;
CodeLog(" movsx %s, word ptr [%s+Dmem]", x86_Name(Reg), x86_Name(AddrReg));
switch (AddrReg)
{
case x86_EAX: x86Command = 0x00BF; break;
case x86_EBX: x86Command = 0x03BF; break;
case x86_ECX: x86Command = 0x01BF; break;
case x86_EDX: x86Command = 0x02BF; break;
case x86_ESI: x86Command = 0x06BF; break;
case x86_EDI: x86Command = 0x07BF; break;
case x86_ESP: x86Command = 0x04BF; break;
case x86_EBP: x86Command = 0x05BF; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
switch (Reg)
{
case x86_EAX: x86Command += 0x8000; break;
case x86_EBX: x86Command += 0x9800; break;
case x86_ECX: x86Command += 0x8800; break;
case x86_EDX: x86Command += 0x9000; break;
case x86_ESI: x86Command += 0xB000; break;
case x86_EDI: x86Command += 0xB800; break;
case x86_ESP: x86Command += 0xA000; break;
case x86_EBP: x86Command += 0xA800; break;
}
AddCode8(0x0f);
AddCode16(x86Command);
AddCode32((uint32_t)g_MMU->Rdram());
}
void CX86Ops::MoveSxVariableToX86regByte(void * Variable, const char * VariableName, x86Reg Reg)
{
CodeLog(" movsx %s, byte ptr [%s]", x86_Name(Reg), VariableName);
@ -1780,76 +1568,6 @@ void CX86Ops::MoveX86regToMemory(x86Reg Reg, x86Reg AddrReg, uint32_t Disp)
AddCode32(Disp);
}
void CX86Ops::MoveX86regToN64Mem(x86Reg Reg, x86Reg AddrReg)
{
uint16_t x86Command = 0;
CodeLog(" mov dword ptr [%s+N64mem], %s", x86_Name(AddrReg), x86_Name(Reg));
switch (AddrReg)
{
case x86_EAX: x86Command = 0x0089; break;
case x86_EBX: x86Command = 0x0389; break;
case x86_ECX: x86Command = 0x0189; break;
case x86_EDX: x86Command = 0x0289; break;
case x86_ESI: x86Command = 0x0689; break;
case x86_EDI: x86Command = 0x0789; break;
case x86_ESP: x86Command = 0x0489; break;
case x86_EBP: x86Command = 0x0589; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
switch (Reg)
{
case x86_EAX: x86Command += 0x8000; break;
case x86_EBX: x86Command += 0x9800; break;
case x86_ECX: x86Command += 0x8800; break;
case x86_EDX: x86Command += 0x9000; break;
case x86_ESI: x86Command += 0xB000; break;
case x86_EDI: x86Command += 0xB800; break;
case x86_ESP: x86Command += 0xA000; break;
case x86_EBP: x86Command += 0xA800; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
AddCode16(x86Command);
AddCode32((uint32_t)g_MMU->Rdram());
}
void CX86Ops::MoveX86regToN64MemDisp(x86Reg Reg, x86Reg AddrReg, uint8_t Disp)
{
CodeLog(" mov dword ptr [%s+N64mem+%d], %s", x86_Name(AddrReg), Disp, x86_Name(Reg));
uint16_t x86Command = 0;
switch (AddrReg)
{
case x86_EAX: x86Command = 0x0089; break;
case x86_EBX: x86Command = 0x0389; break;
case x86_ECX: x86Command = 0x0189; break;
case x86_EDX: x86Command = 0x0289; break;
case x86_ESI: x86Command = 0x0689; break;
case x86_EDI: x86Command = 0x0789; break;
case x86_ESP: x86Command = 0x0489; break;
case x86_EBP: x86Command = 0x0589; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
switch (Reg)
{
case x86_EAX: x86Command += 0x8000; break;
case x86_EBX: x86Command += 0x9800; break;
case x86_ECX: x86Command += 0x8800; break;
case x86_EDX: x86Command += 0x9000; break;
case x86_ESI: x86Command += 0xB000; break;
case x86_EDI: x86Command += 0xB800; break;
case x86_ESP: x86Command += 0xA000; break;
case x86_EBP: x86Command += 0xA800; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
AddCode16(x86Command);
AddCode32((uint32_t)(g_MMU->Rdram() + Disp));
}
void CX86Ops::MoveX86regToVariable(x86Reg Reg, void * Variable, const char * VariableName)
{
CodeLog(" mov dword ptr [%s], %s", VariableName, x86_Name(Reg));
@ -2089,81 +1807,6 @@ void CX86Ops::MoveZxHalfX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2,
AddCode8(Param);
}
void CX86Ops::MoveZxN64MemToX86regByte(x86Reg Reg, x86Reg AddrReg)
{
uint16_t x86Command = 0;
CodeLog(" movzx %s, byte ptr [%s+g_MMU->Rdram()]", x86_Name(Reg), x86_Name(AddrReg));
switch (AddrReg)
{
case x86_EAX: x86Command = 0x00B6; break;
case x86_EBX: x86Command = 0x03B6; break;
case x86_ECX: x86Command = 0x01B6; break;
case x86_EDX: x86Command = 0x02B6; break;
case x86_ESI: x86Command = 0x06B6; break;
case x86_EDI: x86Command = 0x07B6; break;
case x86_ESP: x86Command = 0x04B6; break;
case x86_EBP: x86Command = 0x05B6; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
switch (Reg)
{
case x86_EAX: x86Command += 0x8000; break;
case x86_EBX: x86Command += 0x9800; break;
case x86_ECX: x86Command += 0x8800; break;
case x86_EDX: x86Command += 0x9000; break;
case x86_ESI: x86Command += 0xB000; break;
case x86_EDI: x86Command += 0xB800; break;
case x86_ESP: x86Command += 0xA000; break;
case x86_EBP: x86Command += 0xA800; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
break;
}
AddCode8(0x0f);
AddCode16(x86Command);
AddCode32((uint32_t)(g_MMU->Rdram()));
}
void CX86Ops::MoveZxN64MemToX86regHalf(x86Reg Reg, x86Reg AddrReg)
{
uint16_t x86Command = 0;
CodeLog(" movzx %s, word ptr [%s+g_MMU->Rdram()]", x86_Name(Reg), x86_Name(AddrReg));
switch (AddrReg)
{
case x86_EAX: x86Command = 0x00B7; break;
case x86_EBX: x86Command = 0x03B7; break;
case x86_ECX: x86Command = 0x01B7; break;
case x86_EDX: x86Command = 0x02B7; break;
case x86_ESI: x86Command = 0x06B7; break;
case x86_EDI: x86Command = 0x07B7; break;
case x86_ESP: x86Command = 0x04B7; break;
case x86_EBP: x86Command = 0x05B7; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
switch (Reg)
{
case x86_EAX: x86Command += 0x8000; break;
case x86_EBX: x86Command += 0x9800; break;
case x86_ECX: x86Command += 0x8800; break;
case x86_EDX: x86Command += 0x9000; break;
case x86_ESI: x86Command += 0xB000; break;
case x86_EDI: x86Command += 0xB800; break;
case x86_ESP: x86Command += 0xA000; break;
case x86_EBP: x86Command += 0xA800; break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
AddCode8(0x0f);
AddCode16(x86Command);
AddCode32((uint32_t)(g_MMU->Rdram()));
}
void CX86Ops::MoveZxVariableToX86regByte(void * Variable, const char * VariableName, x86Reg Reg)
{
CodeLog(" movzx %s, byte ptr [%s]", x86_Name(Reg), VariableName);

View File

@ -136,14 +136,8 @@ public:
void MoveConstToX86Pointer(x86Reg X86Pointer, uint32_t Const);
void MoveConstToX86reg(x86Reg Reg, uint32_t Const);
void MoveConstToX86regPointer(uint32_t Const, x86Reg AddrReg1, x86Reg AddrReg2);
void MoveN64MemDispToX86reg(x86Reg Reg, x86Reg AddrReg, uint8_t Disp);
void MoveN64MemToX86reg(x86Reg Reg, x86Reg AddrReg);
void MoveN64MemToX86regByte(x86Reg Reg, x86Reg AddrReg);
void MoveN64MemToX86regHalf(x86Reg Reg, x86Reg AddrReg);
void MoveSxByteX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg Reg);
void MoveSxHalfX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg Reg);
void MoveSxN64MemToX86regByte(x86Reg Reg, x86Reg AddrReg);
void MoveSxN64MemToX86regHalf(x86Reg Reg, x86Reg AddrReg);
void MoveSxVariableToX86regByte(void * Variable, const char * VariableName, x86Reg Reg);
void MoveSxVariableToX86regHalf(void * Variable, const char * VariableName, x86Reg Reg);
void MoveVariableDispToX86Reg(void * Variable, const char * VariableName, x86Reg Reg, x86Reg AddrReg, int32_t Multiplier);
@ -161,16 +155,12 @@ public:
void MoveX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg Reg);
void MoveX86regPointerToX86regDisp8(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg Reg, uint8_t offset);
void MoveX86regToMemory(x86Reg Reg, x86Reg AddrReg, uint32_t Disp);
void MoveX86regToN64Mem(x86Reg Reg, x86Reg AddrReg);
void MoveX86regToN64MemDisp(x86Reg Reg, x86Reg AddrReg, uint8_t Disp);
void MoveX86regToVariable(x86Reg Reg, void * Variable, const char * VariableName);
void MoveX86RegToX86Reg(x86Reg Destination, x86Reg Source);
void MoveX86regToX86Pointer(x86Reg X86Pointer, x86Reg Reg);
void MoveX86regToX86regPointer(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg Reg);
void MoveZxByteX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg Reg);
void MoveZxHalfX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg Reg);
void MoveZxN64MemToX86regByte(x86Reg Reg, x86Reg AddrReg);
void MoveZxN64MemToX86regHalf(x86Reg Reg, x86Reg AddrReg);
void MoveZxVariableToX86regByte(void * Variable, const char * VariableName, x86Reg Reg);
void MoveZxVariableToX86regHalf(void * Variable, const char * VariableName, x86Reg Reg);
void MulX86reg(x86Reg Reg);