From 9818ea1f8bcdd21da0c99be48ab513b7ad59a274 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 25 Oct 2012 19:35:04 +1100 Subject: [PATCH] Cleaned up warnings on warning level 4 --- .../N64 System/Recompiler/X86ops.cpp | 423 ++++++++++++------ 1 file changed, 285 insertions(+), 138 deletions(-) diff --git a/Source/Project64/N64 System/Recompiler/X86ops.cpp b/Source/Project64/N64 System/Recompiler/X86ops.cpp index 29dd6743f..a607f419b 100644 --- a/Source/Project64/N64 System/Recompiler/X86ops.cpp +++ b/Source/Project64/N64 System/Recompiler/X86ops.cpp @@ -238,7 +238,7 @@ void CX86Ops::CompVariableToX86reg(x86Reg reg, void * Variable, const char * Var } void CX86Ops::CompX86RegToX86Reg(x86Reg Destination, x86Reg Source) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" cmp %s, %s",x86_Name(Destination),x86_Name(Source)); @@ -251,6 +251,8 @@ void CX86Ops::CompX86RegToX86Reg(x86Reg Destination, x86Reg Source) { case x86_EDI: x86Command = 0x073B; break; case x86_ESP: x86Command = 0x043B; break; case x86_EBP: x86Command = 0x053B; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (Destination) { case x86_EAX: x86Command += 0xC000; break; @@ -278,7 +280,7 @@ void CX86Ops::DecX86reg(x86Reg reg) { case x86_ESP: PUTDST8 (m_RecompPos,0x4C); break; case x86_EBP: PUTDST8 (m_RecompPos,0x4D); break; default: - _Notify->DisplayError("DecX86reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -293,7 +295,7 @@ void CX86Ops::DivX86reg(x86Reg reg) { case x86_ESP: PUTDST16(m_RecompPos,0xf4F7); break; case x86_EBP: PUTDST16(m_RecompPos,0xf5F7); break; default: - _Notify->DisplayError("divX86reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -308,7 +310,7 @@ void CX86Ops::idivX86reg(x86Reg reg) { case x86_ESP: PUTDST16(m_RecompPos,0xfcF7); break; case x86_EBP: PUTDST16(m_RecompPos,0xfdF7); break; default: - _Notify->DisplayError("idivX86reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -324,7 +326,7 @@ void CX86Ops::imulX86reg(x86Reg reg) { case x86_ESP: PUTDST16(m_RecompPos,0xECF7); break; case x86_EBP: PUTDST16(m_RecompPos,0xEDF7); break; default: - _Notify->DisplayError("imulX86reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -340,7 +342,7 @@ void CX86Ops::IncX86reg(x86Reg reg) { case x86_ESP: PUTDST8 (m_RecompPos,0x44); break; case x86_EBP: PUTDST8 (m_RecompPos,0x45); break; default: - _Notify->DisplayError("IncX86reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -451,8 +453,7 @@ void CX86Ops::JmpDirectReg( x86Reg reg ) { case x86_ESI: PUTDST16(m_RecompPos,0xE6ff); break; case x86_EDI: PUTDST16(m_RecompPos,0xE7ff); break; default: - _Notify->DisplayError("JmpDirectReg\nUnknown x86 Register"); - break; + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -574,7 +575,7 @@ void CX86Ops::LeaRegReg2(x86Reg RegDest, x86Reg RegSrc, x86Reg RegSrc2, Multiple if (RegSrc2 == x86_ESP || RegSrc2 == x86_EBP) { - _Notify->DisplayError("CX86Ops::LeaRegReg2: %s is invalid for RegSrc2",x86_Name(RegSrc2)); + _Notify->BreakPoint(__FILE__,__LINE__); return; } PUTDST8(m_RecompPos,0x8D); @@ -583,7 +584,7 @@ void CX86Ops::LeaRegReg2(x86Reg RegDest, x86Reg RegSrc, x86Reg RegSrc2, Multiple } void CX86Ops::LeaSourceAndOffset(x86Reg x86DestReg, x86Reg x86SourceReg, int offset) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" lea %s, [%s + %0Xh]",x86_Name(x86DestReg),x86_Name(x86SourceReg),offset); @@ -599,7 +600,7 @@ void CX86Ops::LeaSourceAndOffset(x86Reg x86DestReg, x86Reg x86SourceReg, int off case x86_ESP: x86Command = 0xA08D; break; case x86_EBP: x86Command = 0xA88D; break; default: - _Notify->DisplayError("LeaSourceAndOffset\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (x86SourceReg) { case x86_EAX: x86Command += 0x0000; break; @@ -611,7 +612,7 @@ void CX86Ops::LeaSourceAndOffset(x86Reg x86DestReg, x86Reg x86SourceReg, int off case x86_ESP: x86Command += 0x0400; break; case x86_EBP: x86Command += 0x0500; break; default: - _Notify->DisplayError("LeaSourceAndOffset\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); PUTDST32(m_RecompPos,offset); @@ -626,7 +627,7 @@ void CX86Ops::LeaSourceAndOffset(x86Reg x86DestReg, x86Reg x86SourceReg, int off case x86_ESP: x86Command = 0x608D; break; case x86_EBP: x86Command = 0x688D; break; default: - _Notify->DisplayError("LeaSourceAndOffset\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (x86SourceReg) { case x86_EAX: x86Command += 0x0000; break; @@ -638,7 +639,7 @@ void CX86Ops::LeaSourceAndOffset(x86Reg x86DestReg, x86Reg x86SourceReg, int off case x86_ESP: x86Command += 0x0400; break; case x86_EBP: x86Command += 0x0500; break; default: - _Notify->DisplayError("LeaSourceAndOffset\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); PUTDST8(m_RecompPos,offset); @@ -657,7 +658,7 @@ void CX86Ops::MoveConstByteToN64Mem(BYTE Const, x86Reg AddrReg) { case x86_ESP: PUTDST16(m_RecompPos,0x84C6); break; case x86_EBP: PUTDST16(m_RecompPos,0x85C6); break; default: - _Notify->DisplayError("MoveConstByteToN64Mem\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,_MMU->Rdram()); PUTDST8(m_RecompPos,Const); @@ -683,7 +684,7 @@ void CX86Ops::MoveConstHalfToN64Mem(WORD Const, x86Reg AddrReg) { case x86_ESP: PUTDST16(m_RecompPos,0x84C7); break; case x86_EBP: PUTDST16(m_RecompPos,0x85C7); break; default: - _Notify->DisplayError("MoveConstToN64Mem\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,_MMU->Rdram()); PUTDST16(m_RecompPos,Const); @@ -698,7 +699,7 @@ void CX86Ops::MoveConstHalfToVariable (WORD Const,void *Variable, const char * V } void CX86Ops::MoveConstHalfToX86regPointer(WORD Const, x86Reg AddrReg1, x86Reg AddrReg2) { - BYTE Param; + BYTE Param = 0; CPU_Message(" mov word ptr [%s+%s],%Xh",x86_Name(AddrReg1), x86_Name(AddrReg2), Const); @@ -713,7 +714,7 @@ void CX86Ops::MoveConstHalfToX86regPointer(WORD Const, x86Reg AddrReg1, x86Reg A case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveConstToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -726,7 +727,7 @@ void CX86Ops::MoveConstHalfToX86regPointer(WORD Const, x86Reg AddrReg1, x86Reg A case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveConstToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); PUTDST16(m_RecompPos,Const); @@ -744,7 +745,7 @@ void CX86Ops::MoveConstToMemoryDisp (DWORD Const, x86Reg AddrReg, DWORD Disp) { case x86_ESP: PUTDST16(m_RecompPos,0x84C7); break; case x86_EBP: PUTDST16(m_RecompPos,0x85C7); break; default: - _Notify->DisplayError("MoveConstToN64Mem\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Disp); PUTDST32(m_RecompPos,Const); @@ -762,7 +763,7 @@ void CX86Ops::MoveConstToN64Mem(DWORD Const, x86Reg AddrReg) { case x86_ESP: PUTDST16(m_RecompPos,0x84C7); break; case x86_EBP: PUTDST16(m_RecompPos,0x85C7); break; default: - _Notify->DisplayError("MoveConstToN64Mem\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,_MMU->Rdram()); PUTDST32(m_RecompPos,Const); @@ -780,7 +781,7 @@ void CX86Ops::MoveConstToN64MemDisp (DWORD Const, x86Reg AddrReg, BYTE Disp) { case x86_ESP: PUTDST16(m_RecompPos,0x84C7); break; case x86_EBP: PUTDST16(m_RecompPos,0x85C7); break; default: - _Notify->DisplayError("MoveConstToN64Mem\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,_MMU->Rdram() + Disp); PUTDST32(m_RecompPos,Const); @@ -813,7 +814,7 @@ void CX86Ops::MoveConstToX86reg(DWORD Const, x86Reg reg) { } void CX86Ops::MoveConstByteToX86regPointer(BYTE Const, x86Reg AddrReg1, x86Reg AddrReg2) { - BYTE Param; + BYTE Param = 0; CPU_Message(" mov byte ptr [%s+%s],%Xh",x86_Name(AddrReg1), x86_Name(AddrReg2), Const); @@ -827,7 +828,7 @@ void CX86Ops::MoveConstByteToX86regPointer(BYTE Const, x86Reg AddrReg1, x86Reg A case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveConstByteToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -840,14 +841,14 @@ void CX86Ops::MoveConstByteToX86regPointer(BYTE Const, x86Reg AddrReg1, x86Reg A case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveConstByteToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); PUTDST8(m_RecompPos,Const); } void CX86Ops::MoveConstToX86regPointer(DWORD Const, x86Reg AddrReg1, x86Reg AddrReg2) { - BYTE Param; + BYTE Param = 0; CPU_Message(" mov dword ptr [%s+%s],%Xh",x86_Name(AddrReg1), x86_Name(AddrReg2), Const); @@ -861,7 +862,7 @@ void CX86Ops::MoveConstToX86regPointer(DWORD Const, x86Reg AddrReg1, x86Reg Addr case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveConstToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -874,14 +875,14 @@ void CX86Ops::MoveConstToX86regPointer(DWORD Const, x86Reg AddrReg1, x86Reg Addr case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveConstToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); PUTDST32(m_RecompPos,Const); } void CX86Ops::MoveN64MemDispToX86reg(x86Reg reg, x86Reg AddrReg, BYTE Disp) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" mov %s, dword ptr [%s+N64mem+%Xh]",x86_Name(reg),x86_Name(AddrReg),Disp); switch (AddrReg) { @@ -893,6 +894,8 @@ void CX86Ops::MoveN64MemDispToX86reg(x86Reg reg, x86Reg AddrReg, BYTE Disp) { case x86_EDI: x86Command = 0x078B; break; case x86_ESP: x86Command = 0x048B; break; case x86_EBP: x86Command = 0x058B; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -909,7 +912,7 @@ void CX86Ops::MoveN64MemDispToX86reg(x86Reg reg, x86Reg AddrReg, BYTE Disp) { } void CX86Ops::MoveN64MemToX86reg(x86Reg reg, x86Reg AddrReg) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" mov %s, dword ptr [%s+N64mem]",x86_Name(reg),x86_Name(AddrReg)); @@ -922,6 +925,8 @@ void CX86Ops::MoveN64MemToX86reg(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command = 0x078B; break; case x86_ESP: x86Command = 0x048B; break; case x86_EBP: x86Command = 0x058B; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -938,7 +943,7 @@ void CX86Ops::MoveN64MemToX86reg(x86Reg reg, x86Reg AddrReg) { } void CX86Ops::MoveN64MemToX86regByte(x86Reg reg, x86Reg AddrReg) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" mov %s, byte ptr [%s+N64mem]",x86_ByteName(reg),x86_Name(AddrReg)); switch (AddrReg) { @@ -950,6 +955,8 @@ void CX86Ops::MoveN64MemToX86regByte(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command = 0x078A; break; case x86_ESP: x86Command = 0x048A; break; case x86_EBP: x86Command = 0x058A; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -960,7 +967,7 @@ void CX86Ops::MoveN64MemToX86regByte(x86Reg reg, x86Reg AddrReg) { /* case x86_EDI: x86Command += 0xB800; break; */ /* case x86_ESP: case x86_EBP: */ default: - _Notify->DisplayError("MoveN64MemToX86regByte\nInvalid x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } PUTDST16(m_RecompPos,x86Command); @@ -968,7 +975,7 @@ void CX86Ops::MoveN64MemToX86regByte(x86Reg reg, x86Reg AddrReg) { } void CX86Ops::MoveN64MemToX86regHalf(x86Reg reg, x86Reg AddrReg) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" mov %s, word ptr [%s+N64mem]",x86_HalfName(reg),x86_Name(AddrReg)); @@ -982,6 +989,8 @@ void CX86Ops::MoveN64MemToX86regHalf(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command = 0x078B; break; case x86_ESP: x86Command = 0x048B; break; case x86_EBP: x86Command = 0x058B; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -998,7 +1007,7 @@ void CX86Ops::MoveN64MemToX86regHalf(x86Reg reg, x86Reg AddrReg) { } void CX86Ops::MoveSxByteX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg) { - BYTE Param; + BYTE Param = 0; CPU_Message(" movsx %s, byte ptr [%s+%s]",x86_Name(reg),x86_Name(AddrReg1), x86_Name(AddrReg2)); @@ -1013,7 +1022,7 @@ void CX86Ops::MoveSxByteX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESP: PUTDST8(m_RecompPos,0x24); break; case x86_EBP: PUTDST8(m_RecompPos,0x2C); break; default: - _Notify->DisplayError("MoveZxByteX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg1) { @@ -1024,7 +1033,7 @@ void CX86Ops::MoveSxByteX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveZxByteX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -1037,13 +1046,13 @@ void CX86Ops::MoveSxByteX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveZxByteX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); } void CX86Ops::MoveSxHalfX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg) { - BYTE Param; + BYTE Param = 0; CPU_Message(" movsx %s, word ptr [%s+%s]",x86_Name(reg),x86_Name(AddrReg1), x86_Name(AddrReg2)); @@ -1058,7 +1067,7 @@ void CX86Ops::MoveSxHalfX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESP: PUTDST8(m_RecompPos,0x24); break; case x86_EBP: PUTDST8(m_RecompPos,0x2C); break; default: - _Notify->DisplayError("MoveZxHalfX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg1) { @@ -1069,7 +1078,7 @@ void CX86Ops::MoveSxHalfX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveZxHalfX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -1082,13 +1091,13 @@ void CX86Ops::MoveSxHalfX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveZxHalfX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); } void CX86Ops::MoveSxN64MemToX86regByte(x86Reg reg, x86Reg AddrReg) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" movsx %s, byte ptr [%s+Dmem]",x86_Name(reg),x86_Name(AddrReg)); switch (AddrReg) { @@ -1100,6 +1109,8 @@ void CX86Ops::MoveSxN64MemToX86regByte(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command = 0x07BE; break; case x86_ESP: x86Command = 0x04BE; break; case x86_EBP: x86Command = 0x05BE; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -1111,7 +1122,7 @@ void CX86Ops::MoveSxN64MemToX86regByte(x86Reg reg, x86Reg AddrReg) { case x86_ESP: x86Command += 0xA000; break; case x86_EBP: x86Command += 0xA800; break; default: - _Notify->DisplayError("MoveSxN64MemToX86regByte\nInvalid x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } PUTDST8(m_RecompPos,0x0f); @@ -1120,7 +1131,7 @@ void CX86Ops::MoveSxN64MemToX86regByte(x86Reg reg, x86Reg AddrReg) { } void CX86Ops::MoveSxN64MemToX86regHalf(x86Reg reg, x86Reg AddrReg) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" movsx %s, word ptr [%s+Dmem]",x86_Name(reg),x86_Name(AddrReg)); @@ -1133,6 +1144,8 @@ void CX86Ops::MoveSxN64MemToX86regHalf(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command = 0x07BF; break; case x86_ESP: x86Command = 0x04BF; break; case x86_EBP: x86Command = 0x05BF; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -1164,7 +1177,8 @@ void CX86Ops::MoveSxVariableToX86regByte(void *Variable, const char * VariableNa case x86_EDI: PUTDST8(m_RecompPos,0x3D); break; case x86_ESP: PUTDST8(m_RecompPos,0x25); break; case x86_EBP: PUTDST8(m_RecompPos,0x2D); break; - default: _Notify->DisplayError("MoveSxVariableToX86regHalf\nUnknown x86 Register"); + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } @@ -1183,7 +1197,8 @@ void CX86Ops::MoveSxVariableToX86regHalf(void *Variable, const char * VariableNa case x86_EDI: PUTDST8(m_RecompPos,0x3D); break; case x86_ESP: PUTDST8(m_RecompPos,0x25); break; case x86_EBP: PUTDST8(m_RecompPos,0x2D); break; - default: _Notify->DisplayError("MoveSxVariableToX86regHalf\nUnknown x86 Register"); + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } @@ -1199,13 +1214,14 @@ void CX86Ops::MoveVariableToX86reg(void *Variable, const char * VariableName, x8 case x86_EDI: PUTDST16(m_RecompPos,0x3D8B); break; case x86_ESP: PUTDST16(m_RecompPos,0x258B); break; case x86_EBP: PUTDST16(m_RecompPos,0x2D8B); break; - default: _Notify->DisplayError("MoveVariableToX86reg\nUnknown x86 Register"); + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } void CX86Ops::MoveVariableDispToX86Reg(void *Variable, const char * VariableName, x86Reg reg, x86Reg AddrReg, int Multiplier) { - int x; + int x = 0; CPU_Message(" mov %s, dword ptr [%s+%s*%i]",x86_Name(reg),VariableName, x86_Name(AddrReg), Multiplier); PUTDST8(m_RecompPos,0x8B); @@ -1227,7 +1243,8 @@ void CX86Ops::MoveVariableDispToX86Reg(void *Variable, const char * VariableName case 2: x = 0x40; break; case 4: x = 0x80; break; case 8: x = 0xC0; break; - default: _Notify->DisplayError("Move\nInvalid x86 multiplier"); + default: + _Notify->BreakPoint(__FILE__,__LINE__); } /* format xx|000000 */ @@ -1252,7 +1269,8 @@ void CX86Ops::MoveVariableToX86regByte(void *Variable, const char * VariableName case x86_EBX: PUTDST16(m_RecompPos,0x1D8A); break; case x86_ECX: PUTDST16(m_RecompPos,0x0D8A); break; case x86_EDX: PUTDST16(m_RecompPos,0x158A); break; - default: _Notify->DisplayError("MoveVariableToX86regByte\nUnknown x86 Register"); + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } @@ -1269,13 +1287,14 @@ void CX86Ops::MoveVariableToX86regHalf(void *Variable, const char * VariableName case x86_EDI: PUTDST16(m_RecompPos,0x3D8B); break; case x86_ESP: PUTDST16(m_RecompPos,0x258B); break; case x86_EBP: PUTDST16(m_RecompPos,0x2D8B); break; - default: _Notify->DisplayError("MoveVariableToX86reg\nUnknown x86 Register"); + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } void CX86Ops::MoveX86regByteToN64Mem(x86Reg reg, x86Reg AddrReg) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" mov byte ptr [%s+N64mem], %s",x86_Name(AddrReg),x86_ByteName(reg)); @@ -1286,12 +1305,16 @@ void CX86Ops::MoveX86regByteToN64Mem(x86Reg reg, x86Reg AddrReg) { case x86_EDX: x86Command = 0x0288; break; case x86_ESI: x86Command = 0x0688; break; case x86_EDI: x86Command = 0x0788; break; + default: + _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; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); PUTDST32(m_RecompPos,_MMU->Rdram()); @@ -1305,13 +1328,13 @@ void CX86Ops::MoveX86regByteToVariable(x86Reg reg, void * Variable, const char * case x86_ECX: PUTDST16(m_RecompPos,0x0D88); break; case x86_EDX: PUTDST16(m_RecompPos,0x1588); break; default: - _Notify->DisplayError("MoveX86regByteToVariable\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } void CX86Ops::MoveX86regByteToX86regPointer(x86Reg reg, x86Reg AddrReg1, x86Reg AddrReg2) { - BYTE Param; + BYTE Param = 0; CPU_Message(" mov byte ptr [%s+%s],%s",x86_Name(AddrReg1), x86_Name(AddrReg2), x86_ByteName(reg)); @@ -1325,7 +1348,7 @@ void CX86Ops::MoveX86regByteToX86regPointer(x86Reg reg, x86Reg AddrReg1, x86Reg case x86_ESP: PUTDST16(m_RecompPos,0x2488); break; case x86_EBP: PUTDST16(m_RecompPos,0x2C88); break; default: - _Notify->DisplayError("MoveX86regToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg1) { @@ -1336,7 +1359,7 @@ void CX86Ops::MoveX86regByteToX86regPointer(x86Reg reg, x86Reg AddrReg1, x86Reg case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveX86regToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -1349,13 +1372,13 @@ void CX86Ops::MoveX86regByteToX86regPointer(x86Reg reg, x86Reg AddrReg1, x86Reg case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveX86regByteToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); } void CX86Ops::MoveX86regHalfToN64Mem(x86Reg reg, x86Reg AddrReg) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" mov word ptr [%s+N64mem], %s",x86_Name(AddrReg),x86_HalfName(reg)); @@ -1369,6 +1392,8 @@ void CX86Ops::MoveX86regHalfToN64Mem(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command = 0x0789; break; case x86_ESP: x86Command = 0x0489; break; case x86_EBP: x86Command = 0x0589; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -1379,6 +1404,8 @@ void CX86Ops::MoveX86regHalfToN64Mem(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command += 0xB800; break; case x86_ESP: x86Command += 0xA000; break; case x86_EBP: x86Command += 0xA800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); PUTDST32(m_RecompPos,_MMU->Rdram()); @@ -1397,7 +1424,7 @@ void CX86Ops::MoveX86regHalfToVariable(x86Reg reg, void * Variable, const char * case x86_ESP: PUTDST16(m_RecompPos,0x2589); break; case x86_EBP: PUTDST16(m_RecompPos,0x2D89); break; default: - _Notify->DisplayError("MoveX86regToVariable\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } @@ -1418,7 +1445,7 @@ void CX86Ops::MoveX86regHalfToX86regPointer(x86Reg reg, x86Reg AddrReg1, x86Reg case x86_ESP: PUTDST16(m_RecompPos,0x2489); break; case x86_EBP: PUTDST16(m_RecompPos,0x2C89); break; default: - _Notify->DisplayError("MoveX86regHalfToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg1) { @@ -1429,7 +1456,7 @@ void CX86Ops::MoveX86regHalfToX86regPointer(x86Reg reg, x86Reg AddrReg1, x86Reg case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveX86regHalfToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -1442,7 +1469,7 @@ void CX86Ops::MoveX86regHalfToX86regPointer(x86Reg reg, x86Reg AddrReg1, x86Reg case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveX86regHalfToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); } @@ -1459,6 +1486,8 @@ void CX86Ops::MoveX86PointerToX86reg(x86Reg reg, x86Reg X86Pointer) { case x86_EDX: x86Command = 0x028B; break; case x86_ESI: x86Command = 0x068B; break; case x86_EDI: x86Command = 0x078B; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { @@ -1470,6 +1499,8 @@ void CX86Ops::MoveX86PointerToX86reg(x86Reg reg, x86Reg X86Pointer) { case x86_EDI: x86Command += 0x3800; break; case x86_ESP: x86Command += 0x2000; break; case x86_EBP: x86Command += 0x2800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); } @@ -1486,6 +1517,8 @@ void CX86Ops::MoveX86PointerToX86regDisp(x86Reg reg, x86Reg X86Pointer, BYTE Dis case x86_EDX: x86Command = 0x428B; break; case x86_ESI: x86Command = 0x468B; break; case x86_EDI: x86Command = 0x478B; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { @@ -1497,13 +1530,15 @@ void CX86Ops::MoveX86PointerToX86regDisp(x86Reg reg, x86Reg X86Pointer, BYTE Dis case x86_EDI: x86Command += 0x3800; break; case x86_ESP: x86Command += 0x2000; break; case x86_EBP: x86Command += 0x2800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); PUTDST8(m_RecompPos,Disp); } void CX86Ops::MoveX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg reg) { - BYTE Param; + BYTE Param = 0; CPU_Message(" mov %s, dword ptr [%s+%s]",x86_Name(reg),x86_Name(AddrReg1), x86_Name(AddrReg2)); @@ -1517,7 +1552,7 @@ void CX86Ops::MoveX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg case x86_ESP: PUTDST16(m_RecompPos,0x248B); break; case x86_EBP: PUTDST16(m_RecompPos,0x2C8B); break; default: - _Notify->DisplayError("MoveX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg1) { @@ -1528,7 +1563,7 @@ void CX86Ops::MoveX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -1541,7 +1576,7 @@ void CX86Ops::MoveX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, x86Reg case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); } @@ -1561,7 +1596,7 @@ void CX86Ops::MoveX86regPointerToX86regDisp8(x86Reg AddrReg1, x86Reg AddrReg2, x case x86_ESP: PUTDST16(m_RecompPos,0x648B); break; case x86_EBP: PUTDST16(m_RecompPos,0x6C8B); break; default: - _Notify->DisplayError("MoveX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg1) { @@ -1572,7 +1607,7 @@ void CX86Ops::MoveX86regPointerToX86regDisp8(x86Reg AddrReg1, x86Reg AddrReg2, x case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -1585,7 +1620,7 @@ void CX86Ops::MoveX86regPointerToX86regDisp8(x86Reg AddrReg1, x86Reg AddrReg2, x case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); PUTDST8(m_RecompPos,offset); @@ -1604,6 +1639,8 @@ void CX86Ops::MoveX86regToMemory(x86Reg reg, x86Reg AddrReg, DWORD Disp) { case x86_EDI: x86Command = 0x0789; break; case x86_ESP: x86Command = 0x0489; break; case x86_EBP: x86Command = 0x0589; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -1614,6 +1651,8 @@ void CX86Ops::MoveX86regToMemory(x86Reg reg, x86Reg AddrReg, DWORD Disp) { case x86_EDI: x86Command += 0xB800; break; case x86_ESP: x86Command += 0xA000; break; case x86_EBP: x86Command += 0xA800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); PUTDST32(m_RecompPos,Disp); @@ -1632,6 +1671,8 @@ void CX86Ops::MoveX86regToN64Mem(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command = 0x0789; break; case x86_ESP: x86Command = 0x0489; break; case x86_EBP: x86Command = 0x0589; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -1642,6 +1683,8 @@ void CX86Ops::MoveX86regToN64Mem(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command += 0xB800; break; case x86_ESP: x86Command += 0xA000; break; case x86_EBP: x86Command += 0xA800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); PUTDST32(m_RecompPos,_MMU->Rdram()); @@ -1660,6 +1703,8 @@ void CX86Ops::MoveX86regToN64MemDisp(x86Reg reg, x86Reg AddrReg, BYTE Disp) { case x86_EDI: x86Command = 0x0789; break; case x86_ESP: x86Command = 0x0489; break; case x86_EBP: x86Command = 0x0589; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -1670,6 +1715,8 @@ void CX86Ops::MoveX86regToN64MemDisp(x86Reg reg, x86Reg AddrReg, BYTE Disp) { case x86_EDI: x86Command += 0xB800; break; case x86_ESP: x86Command += 0xA000; break; case x86_EBP: x86Command += 0xA800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); PUTDST32(m_RecompPos,_MMU->Rdram()+Disp); @@ -1687,7 +1734,7 @@ void CX86Ops::MoveX86regToVariable(x86Reg reg, void * Variable, const char * Var case x86_ESP: PUTDST16(m_RecompPos,0x2589); break; case x86_EBP: PUTDST16(m_RecompPos,0x2D89); break; default: - _Notify->DisplayError("MoveX86regToVariable\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } @@ -1710,6 +1757,8 @@ void CX86Ops::MoveX86RegToX86Reg(x86Reg Source, x86Reg Destination) { case x86_EDI: x86Command = 0x0789; break; case x86_ESP: x86Command = 0x0489; break; case x86_EBP: x86Command = 0x0589; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (Source) { @@ -1721,6 +1770,8 @@ void CX86Ops::MoveX86RegToX86Reg(x86Reg Source, x86Reg Destination) { case x86_EDI: x86Command += 0xF800; break; case x86_ESP: x86Command += 0xE000; break; case x86_EBP: x86Command += 0xE800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); } @@ -1737,6 +1788,8 @@ void CX86Ops::MoveX86regToX86Pointer(x86Reg reg, x86Reg X86Pointer) { case x86_EDX: x86Command = 0x0289; break; case x86_ESI: x86Command = 0x0689; break; case x86_EDI: x86Command = 0x0789; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { @@ -1748,6 +1801,8 @@ void CX86Ops::MoveX86regToX86Pointer(x86Reg reg, x86Reg X86Pointer) { case x86_EDI: x86Command += 0x3800; break; case x86_ESP: x86Command += 0x2000; break; case x86_EBP: x86Command += 0x2800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); } @@ -1767,7 +1822,7 @@ void CX86Ops::MoveX86regToX86regPointer(x86Reg reg, x86Reg AddrReg1, x86Reg Addr case x86_ESP: PUTDST16(m_RecompPos,0x2489); break; case x86_EBP: PUTDST16(m_RecompPos,0x2C89); break; default: - _Notify->DisplayError("MoveX86regToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg1) { @@ -1778,7 +1833,7 @@ void CX86Ops::MoveX86regToX86regPointer(x86Reg reg, x86Reg AddrReg1, x86Reg Addr case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveX86regToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -1791,7 +1846,7 @@ void CX86Ops::MoveX86regToX86regPointer(x86Reg reg, x86Reg AddrReg1, x86Reg Addr case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveX86regToX86regPointer\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); } @@ -1812,7 +1867,7 @@ void CX86Ops::MoveZxByteX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESP: PUTDST8(m_RecompPos,0x24); break; case x86_EBP: PUTDST8(m_RecompPos,0x2C); break; default: - _Notify->DisplayError("MoveZxByteX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg1) { @@ -1823,7 +1878,7 @@ void CX86Ops::MoveZxByteX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveZxByteX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -1836,7 +1891,7 @@ void CX86Ops::MoveZxByteX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveZxByteX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); } @@ -1857,7 +1912,7 @@ void CX86Ops::MoveZxHalfX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESP: PUTDST8(m_RecompPos,0x24); break; case x86_EBP: PUTDST8(m_RecompPos,0x2C); break; default: - _Notify->DisplayError("MoveZxHalfX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg1) { @@ -1868,7 +1923,7 @@ void CX86Ops::MoveZxHalfX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESI: Param = 0x06; break; case x86_EDI: Param = 0x07; break; default: - _Notify->DisplayError("MoveZxHalfX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } switch (AddrReg2) { @@ -1881,13 +1936,13 @@ void CX86Ops::MoveZxHalfX86regPointerToX86reg(x86Reg AddrReg1, x86Reg AddrReg2, case x86_ESP: Param += 0x20; break; case x86_EBP: Param += 0x28; break; default: - _Notify->DisplayError("MoveZxHalfX86regPointerToX86reg\nUnhandled x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Param); } void CX86Ops::MoveZxN64MemToX86regByte(x86Reg reg, x86Reg AddrReg) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" movzx %s, byte ptr [%s+_MMU->Rdram()]",x86_Name(reg),x86_Name(AddrReg)); switch (AddrReg) { @@ -1899,6 +1954,8 @@ void CX86Ops::MoveZxN64MemToX86regByte(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command = 0x07B6; break; case x86_ESP: x86Command = 0x04B6; break; case x86_EBP: x86Command = 0x05B6; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -1910,7 +1967,7 @@ void CX86Ops::MoveZxN64MemToX86regByte(x86Reg reg, x86Reg AddrReg) { case x86_ESP: x86Command += 0xA000; break; case x86_EBP: x86Command += 0xA800; break; default: - _Notify->DisplayError("MoveZxN64MemToX86regByte\nInvalid x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } PUTDST8(m_RecompPos,0x0f); @@ -1932,6 +1989,8 @@ void CX86Ops::MoveZxN64MemToX86regHalf(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command = 0x07B7; break; case x86_ESP: x86Command = 0x04B7; break; case x86_EBP: x86Command = 0x05B7; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (reg) { case x86_EAX: x86Command += 0x8000; break; @@ -1942,6 +2001,8 @@ void CX86Ops::MoveZxN64MemToX86regHalf(x86Reg reg, x86Reg AddrReg) { case x86_EDI: x86Command += 0xB800; break; case x86_ESP: x86Command += 0xA000; break; case x86_EBP: x86Command += 0xA800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos, 0x0f); @@ -1963,7 +2024,8 @@ void CX86Ops::MoveZxVariableToX86regByte(void *Variable, const char * VariableNa case x86_EDI: PUTDST8(m_RecompPos,0x3D); break; case x86_ESP: PUTDST8(m_RecompPos,0x25); break; case x86_EBP: PUTDST8(m_RecompPos,0x2D); break; - default: _Notify->DisplayError("MoveZxVariableToX86regHalf\nUnknown x86 Register"); + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } @@ -1982,7 +2044,8 @@ void CX86Ops::MoveZxVariableToX86regHalf(void *Variable, const char * VariableNa case x86_EDI: PUTDST8(m_RecompPos,0x3D); break; case x86_ESP: PUTDST8(m_RecompPos,0x25); break; case x86_EBP: PUTDST8(m_RecompPos,0x2D); break; - default: _Notify->DisplayError("MoveZxVariableToX86regHalf\nUnknown x86 Register"); + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } @@ -1999,7 +2062,7 @@ void CX86Ops::MulX86reg(x86Reg reg) { case x86_ESP: PUTDST16(m_RecompPos,0xE4F7); break; case x86_EBP: PUTDST16(m_RecompPos,0xE5F7); break; default: - _Notify->DisplayError("MulX86reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2014,6 +2077,8 @@ void CX86Ops::NotX86Reg(x86Reg reg) { case x86_EDI: PUTDST16(m_RecompPos,0xD7F7); break; case x86_ESP: PUTDST16(m_RecompPos,0xD4F7); break; case x86_EBP: PUTDST16(m_RecompPos,0xD5F7); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2036,6 +2101,8 @@ void CX86Ops::OrConstToX86Reg(DWORD Const, x86Reg reg) { case x86_EDI: PUTDST16(m_RecompPos,0xCF81); break; case x86_ESP: PUTDST16(m_RecompPos,0xCC81); break; case x86_EBP: PUTDST16(m_RecompPos,0xCD81); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos, Const); } else { @@ -2048,6 +2115,8 @@ void CX86Ops::OrConstToX86Reg(DWORD Const, x86Reg reg) { case x86_EDI: PUTDST16(m_RecompPos,0xCF83); break; case x86_ESP: PUTDST16(m_RecompPos,0xCC83); break; case x86_EBP: PUTDST16(m_RecompPos,0xCD83); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos, Const); } @@ -2064,6 +2133,8 @@ void CX86Ops::OrVariableToX86Reg(void * Variable, const char * VariableName, x86 case x86_EDI: PUTDST16(m_RecompPos,0x3D0B); break; case x86_ESP: PUTDST16(m_RecompPos,0x250B); break; case x86_EBP: PUTDST16(m_RecompPos,0x2D0B); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } @@ -2079,12 +2150,14 @@ void CX86Ops::OrX86RegToVariable(void * Variable, const char * VariableName, x86 case x86_EDI: PUTDST16(m_RecompPos,0x3D09); break; case x86_ESP: PUTDST16(m_RecompPos,0x2509); break; case x86_EBP: PUTDST16(m_RecompPos,0x2D09); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } void CX86Ops::OrX86RegToX86Reg(x86Reg Destination, x86Reg Source) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" or %s, %s",x86_Name(Destination),x86_Name(Source)); switch (Source) { @@ -2096,6 +2169,8 @@ void CX86Ops::OrX86RegToX86Reg(x86Reg Destination, x86Reg Source) { case x86_EDI: x86Command = 0x070B; break; case x86_ESP: x86Command = 0x040B; break; case x86_EBP: x86Command = 0x050B; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (Destination) { case x86_EAX: x86Command += 0xC000; break; @@ -2106,6 +2181,8 @@ void CX86Ops::OrX86RegToX86Reg(x86Reg Destination, x86Reg Source) { case x86_EDI: x86Command += 0xF800; break; case x86_ESP: x86Command += 0xE000; break; case x86_EBP: x86Command += 0xE800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); } @@ -2132,6 +2209,8 @@ void CX86Ops::Push(x86Reg reg) { case x86_EDI: PUTDST8(m_RecompPos, 0x57); break; case x86_ESP: PUTDST8(m_RecompPos, 0x54); break; case x86_EBP: PUTDST8(m_RecompPos, 0x55); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2147,6 +2226,8 @@ void CX86Ops::Pop(x86Reg reg) { case x86_EDI: PUTDST8(m_RecompPos, 0x5F); break; case x86_ESP: PUTDST8(m_RecompPos, 0x5C); break; case x86_EBP: PUTDST8(m_RecompPos, 0x5D); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2175,7 +2256,7 @@ void CX86Ops::Seta(x86Reg reg) { case x86_ECX: PUTDST8(m_RecompPos,0xC1); break; case x86_EDX: PUTDST8(m_RecompPos,0xC2); break; default: - _Notify->DisplayError("Seta\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2195,7 +2276,7 @@ void CX86Ops::Setae(x86Reg reg) { case x86_ECX: PUTDST8(m_RecompPos,0xC1); break; case x86_EDX: PUTDST8(m_RecompPos,0xC2); break; default: - _Notify->DisplayError("Seta\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2208,7 +2289,7 @@ void CX86Ops::Setb(x86Reg reg) { case x86_ECX: PUTDST8(m_RecompPos,0xC1); break; case x86_EDX: PUTDST8(m_RecompPos,0xC2); break; default: - _Notify->DisplayError("Setb\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2228,7 +2309,7 @@ void CX86Ops::Setg(x86Reg reg) { case x86_ECX: PUTDST8(m_RecompPos,0xC1); break; case x86_EDX: PUTDST8(m_RecompPos,0xC2); break; default: - _Notify->DisplayError("Setg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2248,7 +2329,7 @@ void CX86Ops::Setl(x86Reg reg) { case x86_ECX: PUTDST8(m_RecompPos,0xC1); break; case x86_EDX: PUTDST8(m_RecompPos,0xC2); break; default: - _Notify->DisplayError("Setl\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2269,7 +2350,7 @@ void CX86Ops::Setz(x86Reg reg) { case x86_ECX: PUTDST8(m_RecompPos,0xC1); break; case x86_EDX: PUTDST8(m_RecompPos,0xC2); break; default: - _Notify->DisplayError("Setz\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2282,7 +2363,7 @@ void CX86Ops::Setnz(x86Reg reg) { case x86_ECX: PUTDST8(m_RecompPos,0xC1); break; case x86_EDX: PUTDST8(m_RecompPos,0xC2); break; default: - _Notify->DisplayError("Setnz\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2301,6 +2382,8 @@ void CX86Ops::ShiftLeftDouble(x86Reg Destination, x86Reg Source) { case x86_EDI: s |= 0x07; break; case x86_ESP: s |= 0x04; break; case x86_EBP: s |= 0x05; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (Source) { @@ -2312,6 +2395,8 @@ void CX86Ops::ShiftLeftDouble(x86Reg Destination, x86Reg Source) { case x86_EDI: s |= 0x07 << 3; break; case x86_ESP: s |= 0x04 << 3; break; case x86_EBP: s |= 0x05 << 3; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,s); @@ -2332,6 +2417,8 @@ void CX86Ops::ShiftLeftDoubleImmed(x86Reg Destination, x86Reg Source, BYTE Immed case x86_EDI: s |= 0x07; break; case x86_ESP: s |= 0x04; break; case x86_EBP: s |= 0x05; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (Source) { @@ -2343,6 +2430,8 @@ void CX86Ops::ShiftLeftDoubleImmed(x86Reg Destination, x86Reg Source, BYTE Immed case x86_EDI: s |= 0x07 << 3; break; case x86_ESP: s |= 0x04 << 3; break; case x86_EBP: s |= 0x05 << 3; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,s); @@ -2360,6 +2449,8 @@ void CX86Ops::ShiftLeftSign(x86Reg reg) { case x86_EDI: PUTDST16(m_RecompPos,0xE7D3); break; case x86_ESP: PUTDST16(m_RecompPos,0xE4D3); break; case x86_EBP: PUTDST16(m_RecompPos,0xE5D3); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2374,6 +2465,8 @@ void CX86Ops::ShiftLeftSignImmed(x86Reg reg, BYTE Immediate) { case x86_EDI: PUTDST16(m_RecompPos,0xE7C1); break; case x86_ESP: PUTDST16(m_RecompPos,0xE4C1); break; case x86_EBP: PUTDST16(m_RecompPos,0xE5C1); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Immediate); } @@ -2389,6 +2482,8 @@ void CX86Ops::ShiftRightSign(x86Reg reg) { case x86_EDI: PUTDST16(m_RecompPos,0xFFD3); break; case x86_ESP: PUTDST16(m_RecompPos,0xFCD3); break; case x86_EBP: PUTDST16(m_RecompPos,0xFDD3); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2404,7 +2499,7 @@ void CX86Ops::ShiftRightSignImmed(x86Reg reg, BYTE Immediate) { case x86_ESP: PUTDST16(m_RecompPos,0xFCC1); break; case x86_EBP: PUTDST16(m_RecompPos,0xFDC1); break; default: - _Notify->DisplayError("ShiftRightSignImmed\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Immediate); } @@ -2420,6 +2515,8 @@ void CX86Ops::ShiftRightUnsign(x86Reg reg) { case x86_EDI: PUTDST16(m_RecompPos,0xEFD3); break; case x86_ESP: PUTDST16(m_RecompPos,0xECD3); break; case x86_EBP: PUTDST16(m_RecompPos,0xEDD3); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -2438,6 +2535,8 @@ void CX86Ops::ShiftRightDouble(x86Reg Destination, x86Reg Source) { case x86_EDI: s |= 0x07; break; case x86_ESP: s |= 0x04; break; case x86_EBP: s |= 0x05; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (Source) { @@ -2449,6 +2548,8 @@ void CX86Ops::ShiftRightDouble(x86Reg Destination, x86Reg Source) { case x86_EDI: s |= 0x07 << 3; break; case x86_ESP: s |= 0x04 << 3; break; case x86_EBP: s |= 0x05 << 3; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,s); @@ -2469,6 +2570,8 @@ void CX86Ops::ShiftRightDoubleImmed(x86Reg Destination, x86Reg Source, BYTE Imme case x86_EDI: s |= 0x07; break; case x86_ESP: s |= 0x04; break; case x86_EBP: s |= 0x05; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (Source) { @@ -2480,6 +2583,8 @@ void CX86Ops::ShiftRightDoubleImmed(x86Reg Destination, x86Reg Source, BYTE Imme case x86_EDI: s |= 0x07 << 3; break; case x86_ESP: s |= 0x04 << 3; break; case x86_EBP: s |= 0x05 << 3; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,s); @@ -2497,6 +2602,8 @@ void CX86Ops::ShiftRightUnsignImmed(x86Reg reg, BYTE Immediate) { case x86_EDI: PUTDST16(m_RecompPos,0xEFC1); break; case x86_ESP: PUTDST16(m_RecompPos,0xECC1); break; case x86_EBP: PUTDST16(m_RecompPos,0xEDC1); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos,Immediate); } @@ -2513,6 +2620,8 @@ void CX86Ops::SbbConstFromX86Reg (x86Reg reg, DWORD Const) { case x86_EDI: PUTDST16(m_RecompPos,0xDF81); break; case x86_ESP: PUTDST16(m_RecompPos,0xDC81); break; case x86_EBP: PUTDST16(m_RecompPos,0xDD81); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos, Const); } else { @@ -2525,6 +2634,8 @@ void CX86Ops::SbbConstFromX86Reg (x86Reg reg, DWORD Const) { case x86_EDI: PUTDST16(m_RecompPos,0xDF83); break; case x86_ESP: PUTDST16(m_RecompPos,0xDC83); break; case x86_EBP: PUTDST16(m_RecompPos,0xDD83); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos, Const); } @@ -2542,13 +2653,13 @@ void CX86Ops::SbbVariableFromX86reg(x86Reg reg, void * Variable, const char * Va case x86_ESP: PUTDST16(m_RecompPos,0x251B); break; case x86_EBP: PUTDST16(m_RecompPos,0x2D1B); break; default: - _Notify->DisplayError("SbbVariableFromX86reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } void CX86Ops::SbbX86RegToX86Reg(x86Reg Destination, x86Reg Source) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" sbb %s, %s",x86_Name(Destination),x86_Name(Source)); switch (Source) { case x86_EAX: x86Command = 0x001B; break; @@ -2559,6 +2670,8 @@ void CX86Ops::SbbX86RegToX86Reg(x86Reg Destination, x86Reg Source) { case x86_EDI: x86Command = 0x071B; break; case x86_ESP: x86Command = 0x041B; break; case x86_EBP: x86Command = 0x051B; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (Destination) { case x86_EAX: x86Command += 0xC000; break; @@ -2569,6 +2682,8 @@ void CX86Ops::SbbX86RegToX86Reg(x86Reg Destination, x86Reg Source) { case x86_EDI: x86Command += 0xF800; break; case x86_ESP: x86Command += 0xE000; break; case x86_EBP: x86Command += 0xE800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); } @@ -2592,6 +2707,8 @@ void CX86Ops::SubConstFromX86Reg (x86Reg reg, DWORD Const) { case x86_EDI: PUTDST16(m_RecompPos,0xEF81); break; case x86_ESP: PUTDST16(m_RecompPos,0xEC81); break; case x86_EBP: PUTDST16(m_RecompPos,0xED81); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos, Const); } else { @@ -2604,6 +2721,8 @@ void CX86Ops::SubConstFromX86Reg (x86Reg reg, DWORD Const) { case x86_EDI: PUTDST16(m_RecompPos,0xEF83); break; case x86_ESP: PUTDST16(m_RecompPos,0xEC83); break; case x86_EBP: PUTDST16(m_RecompPos,0xED83); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos, Const); } @@ -2621,13 +2740,13 @@ void CX86Ops::SubVariableFromX86reg(x86Reg reg, void * Variable, const char * Va case x86_ESP: PUTDST16(m_RecompPos,0x252B); break; case x86_EBP: PUTDST16(m_RecompPos,0x2D2B); break; default: - _Notify->DisplayError("SubVariableFromX86reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } void CX86Ops::SubX86RegToX86Reg(x86Reg Destination, x86Reg Source) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" sub %s, %s",x86_Name(Destination),x86_Name(Source)); switch (Source) { case x86_EAX: x86Command = 0x002B; break; @@ -2638,6 +2757,8 @@ void CX86Ops::SubX86RegToX86Reg(x86Reg Destination, x86Reg Source) { case x86_EDI: x86Command = 0x072B; break; case x86_ESP: x86Command = 0x042B; break; case x86_EBP: x86Command = 0x052B; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (Destination) { case x86_EAX: x86Command += 0xC000; break; @@ -2648,6 +2769,8 @@ void CX86Ops::SubX86RegToX86Reg(x86Reg Destination, x86Reg Source) { case x86_EDI: x86Command += 0xF800; break; case x86_ESP: x86Command += 0xE000; break; case x86_EBP: x86Command += 0xE800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); } @@ -2664,6 +2787,8 @@ void CX86Ops::TestConstToX86Reg(DWORD Const, x86Reg reg) { case x86_EDI: PUTDST16(m_RecompPos,0xC7F7); break; case x86_ESP: PUTDST16(m_RecompPos,0xC4F7); break; case x86_EBP: PUTDST16(m_RecompPos,0xC5F7); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Const); } @@ -2676,7 +2801,7 @@ void CX86Ops::TestVariable(DWORD Const, void * Variable, const char * VariableNa } void CX86Ops::TestX86RegToX86Reg(x86Reg Destination, x86Reg Source) { - WORD x86Command; + WORD x86Command = 0; CPU_Message(" test %s, %s",x86_Name(Destination),x86_Name(Source)); switch (Source) { case x86_EAX: x86Command = 0x0085; break; @@ -2687,6 +2812,8 @@ void CX86Ops::TestX86RegToX86Reg(x86Reg Destination, x86Reg Source) { case x86_EDI: x86Command = 0x0785; break; case x86_ESP: x86Command = 0x0485; break; case x86_EBP: x86Command = 0x0585; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (Destination) { case x86_EAX: x86Command += 0xC000; break; @@ -2697,6 +2824,8 @@ void CX86Ops::TestX86RegToX86Reg(x86Reg Destination, x86Reg Source) { case x86_EDI: x86Command += 0xF800; break; case x86_ESP: x86Command += 0xE000; break; case x86_EBP: x86Command += 0xE800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); } @@ -2713,6 +2842,8 @@ void CX86Ops::XorConstToX86Reg(x86Reg reg, DWORD Const) { case x86_EDI: PUTDST16(m_RecompPos,0xF781); break; case x86_ESP: PUTDST16(m_RecompPos,0xF481); break; case x86_EBP: PUTDST16(m_RecompPos,0xF581); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos, Const); } else { @@ -2725,6 +2856,8 @@ void CX86Ops::XorConstToX86Reg(x86Reg reg, DWORD Const) { case x86_EDI: PUTDST16(m_RecompPos,0xF783); break; case x86_ESP: PUTDST16(m_RecompPos,0xF483); break; case x86_EBP: PUTDST16(m_RecompPos,0xF583); break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos, Const); } @@ -2744,6 +2877,8 @@ void CX86Ops::XorX86RegToX86Reg(x86Reg Source, x86Reg Destination) { case x86_EDI: x86Command = 0x0731; break; case x86_ESP: x86Command = 0x0431; break; case x86_EBP: x86Command = 0x0531; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } switch (Destination) { case x86_EAX: x86Command += 0xC000; break; @@ -2754,6 +2889,8 @@ void CX86Ops::XorX86RegToX86Reg(x86Reg Source, x86Reg Destination) { case x86_EDI: x86Command += 0xF800; break; case x86_ESP: x86Command += 0xE000; break; case x86_EBP: x86Command += 0xE800; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST16(m_RecompPos,x86Command); } @@ -2769,7 +2906,8 @@ void CX86Ops::XorVariableToX86reg(void *Variable, const char * VariableName, x86 case x86_EDI: PUTDST16(m_RecompPos,0x3D33); break; case x86_ESP: PUTDST16(m_RecompPos,0x2533); break; case x86_EBP: PUTDST16(m_RecompPos,0x2D33); break; - default: _Notify->DisplayError("XorVariableToX86reg\nUnknown x86 Register"); + default: + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,Variable); } @@ -2795,7 +2933,7 @@ void CX86Ops::fpuAddDwordRegPointer(x86Reg x86Pointer) { case x86_ESI: PUTDST16(m_RecompPos,0x06D8); break; case x86_EDI: PUTDST16(m_RecompPos,0x07D8); break; default: - _Notify->DisplayError("fpuAddDwordRegPointer\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -2816,7 +2954,7 @@ void CX86Ops::fpuAddQwordRegPointer(x86Reg x86Pointer) { case x86_ESI: PUTDST16(m_RecompPos,0x06DC); break; case x86_EDI: PUTDST16(m_RecompPos,0x07DC); break; default: - _Notify->DisplayError("fpuAddQwordRegPointer\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -2833,7 +2971,7 @@ void CX86Ops::fpuAddReg(x86FpuValues x86reg) { case x86_ST6: PUTDST16(m_RecompPos,0xC6D8); break; case x86_ST7: PUTDST16(m_RecompPos,0xC7D8); break; default: - _Notify->DisplayError("fpuAddReg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -2851,7 +2989,7 @@ void CX86Ops::fpuAddRegPop(int * StackPos, x86FpuValues reg) { case x86_ST6: PUTDST16(m_RecompPos,0xC6DE); break; case x86_ST7: PUTDST16(m_RecompPos,0xC7DE); break; default: - _Notify->DisplayError("fpuAddReg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -2873,6 +3011,8 @@ void CX86Ops::fpuComDwordRegPointer(x86Reg x86Pointer, BOOL Pop) { case x86_EDX: x86Command = 0x12D8; break; case x86_ESI: x86Command = 0x16D8; break; case x86_EDI: x86Command = 0x17D8; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } if (Pop) { x86Command |= 0x0800; } PUTDST16(m_RecompPos,x86Command); @@ -2895,6 +3035,8 @@ void CX86Ops::fpuComQwordRegPointer(x86Reg x86Pointer, BOOL Pop) { case x86_EDX: x86Command = 0x12DC; break; case x86_ESI: x86Command = 0x16DC; break; case x86_EDI: x86Command = 0x17DC; break; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } if (Pop) { x86Command |= 0x0800; } PUTDST16(m_RecompPos,x86Command); @@ -2914,7 +3056,7 @@ void CX86Ops::fpuComReg(x86FpuValues x86reg, BOOL Pop) { case x86_ST6: PUTDST16(m_RecompPos,0xD6D8|s); break; case x86_ST7: PUTDST16(m_RecompPos,0xD7D8|s); break; default: - _Notify->DisplayError("fpuComReg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -2935,7 +3077,7 @@ void CX86Ops::fpuDivDwordRegPointer(x86Reg x86Pointer) { case x86_ESI: PUTDST16(m_RecompPos,0x36D8); break; case x86_EDI: PUTDST16(m_RecompPos,0x37D8); break; default: - _Notify->DisplayError("fpuDivDwordRegPointer\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -2956,7 +3098,7 @@ void CX86Ops::fpuDivQwordRegPointer(x86Reg x86Pointer) { case x86_ESI: PUTDST16(m_RecompPos,0x36DC); break; case x86_EDI: PUTDST16(m_RecompPos,0x37DC); break; default: - _Notify->DisplayError("fpuDivQwordRegPointer\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -2973,7 +3115,7 @@ void CX86Ops::fpuDivReg(x86FpuValues Reg) { case x86_ST6: PUTDST16(m_RecompPos,0xF6D8); break; case x86_ST7: PUTDST16(m_RecompPos,0xF7D8); break; default: - _Notify->DisplayError("fpuDivReg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -2990,7 +3132,7 @@ void CX86Ops::fpuDivRegPop(x86FpuValues reg) { case x86_ST6: PUTDST16(m_RecompPos,0xFEDE); break; case x86_ST7: PUTDST16(m_RecompPos,0xFFDE); break; default: - _Notify->DisplayError("fpuDivReg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3007,7 +3149,7 @@ void CX86Ops::fpuExchange(x86FpuValues Reg) { case x86_ST6: PUTDST16(m_RecompPos,0xCED9); break; case x86_ST7: PUTDST16(m_RecompPos,0xCFD9); break; default: - _Notify->DisplayError("fpuExchange\nUnknown x86 Register: %i", Reg); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3024,7 +3166,7 @@ void CX86Ops::fpuFree(x86FpuValues Reg) { case x86_ST6: PUTDST16(m_RecompPos,0xC6DD); break; case x86_ST7: PUTDST16(m_RecompPos,0xC7DD); break; default: - _Notify->DisplayError("fpuFree\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3066,7 +3208,7 @@ void CX86Ops::fpuLoadDwordFromX86Reg(int * StackPos, x86Reg x86reg) { case x86_ESI: PUTDST8(m_RecompPos,0x06); break; case x86_EDI: PUTDST8(m_RecompPos,0x07); break; default: - _Notify->DisplayError("fpuLoadDwordFromX86Reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -3082,7 +3224,7 @@ void CX86Ops::fpuLoadDwordFromN64Mem(int * StackPos,x86Reg x86reg) { case x86_EDI: PUTDST16(m_RecompPos,0x87D9); break; case x86_EBP: PUTDST16(m_RecompPos,0x85D9); break; default: - _Notify->DisplayError("fpuLoadDwordFromN64Mem\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,_MMU->Rdram()); } @@ -3099,7 +3241,7 @@ void CX86Ops::fpuLoadInt32bFromN64Mem(int * StackPos,x86Reg x86reg) { case x86_EDI: PUTDST16(m_RecompPos,0x87DB); break; case x86_EBP: PUTDST16(m_RecompPos,0x85DB); break; default: - _Notify->DisplayError("fpuLoadIntDwordFromN64Mem\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,_MMU->Rdram()); } @@ -3123,7 +3265,7 @@ void CX86Ops::fpuLoadIntegerDwordFromX86Reg(int * StackPos,x86Reg x86reg) { case x86_ESI: PUTDST8(m_RecompPos,0x06); break; case x86_EDI: PUTDST8(m_RecompPos,0x07); break; default: - _Notify->DisplayError("fpuLoadIntegerDwordFromX86Reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -3146,7 +3288,7 @@ void CX86Ops::fpuLoadIntegerQwordFromX86Reg(int * StackPos,x86Reg x86reg) { case x86_ESI: PUTDST8(m_RecompPos,0x2E); break; case x86_EDI: PUTDST8(m_RecompPos,0x2F); break; default: - _Notify->DisplayError("fpuLoadIntegerDwordFromX86Reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -3169,7 +3311,7 @@ void CX86Ops::fpuLoadQwordFromX86Reg(int * StackPos, x86Reg x86reg) { case x86_ESI: PUTDST8(m_RecompPos,0x06); break; case x86_EDI: PUTDST8(m_RecompPos,0x07); break; default: - _Notify->DisplayError("fpuLoadQwordFromX86Reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } } @@ -3185,7 +3327,7 @@ void CX86Ops::fpuLoadQwordFromN64Mem(int * StackPos,x86Reg x86reg) { case x86_EDI: PUTDST16(m_RecompPos,0x87DD); break; case x86_EBP: PUTDST16(m_RecompPos,0x85DD); break; default: - _Notify->DisplayError("fpuLoadQwordFromN64Mem\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,_MMU->Rdram()); } @@ -3203,7 +3345,7 @@ void CX86Ops::fpuLoadReg(int * StackPos,x86FpuValues Reg) { case x86_ST6: PUTDST16(m_RecompPos,0xC6D9); break; case x86_ST7: PUTDST16(m_RecompPos,0xC7D9); break; default: - _Notify->DisplayError("fpuLoadReg\nUnknown x86 Register:%i", Reg); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3224,7 +3366,7 @@ void CX86Ops::fpuMulDwordRegPointer(x86Reg x86Pointer) { case x86_ESI: PUTDST16(m_RecompPos,0x0ED8); break; case x86_EDI: PUTDST16(m_RecompPos,0x0FD8); break; default: - _Notify->DisplayError("fpuMulDwordRegPointer\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3245,7 +3387,7 @@ void CX86Ops::fpuMulQwordRegPointer(x86Reg x86Pointer) { case x86_ESI: PUTDST16(m_RecompPos,0x0EDC); break; case x86_EDI: PUTDST16(m_RecompPos,0x0FDC); break; default: - _Notify->DisplayError("fpuMulQwordRegPointer\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3262,7 +3404,7 @@ void CX86Ops::fpuMulReg(x86FpuValues x86reg) { case x86_ST6: PUTDST16(m_RecompPos,0xCED8); break; case x86_ST7: PUTDST16(m_RecompPos,0xCFD8); break; default: - _Notify->DisplayError("fpuMulReg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3279,7 +3421,7 @@ void CX86Ops::fpuMulRegPop(x86FpuValues x86reg) { case x86_ST6: PUTDST16(m_RecompPos,0xCEDE); break; case x86_ST7: PUTDST16(m_RecompPos,0xCFDE); break; default: - _Notify->DisplayError("fpuMulReg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3313,7 +3455,7 @@ void CX86Ops::fpuStoreDword(int * StackPos,void *Variable, const char * Variable } void CX86Ops::fpuStoreDwordFromX86Reg(int * StackPos,x86Reg x86reg, BOOL pop) { - BYTE Command; + BYTE Command = 0; CPU_Message(" fst%s dword ptr [%s]", m_fpupop[pop], x86_Name(x86reg)); if (pop) { *StackPos = (*StackPos + 1) & 7; } @@ -3327,7 +3469,7 @@ void CX86Ops::fpuStoreDwordFromX86Reg(int * StackPos,x86Reg x86reg, BOOL pop) { case x86_ESI: Command = 0x16; break; case x86_EDI: Command = 0x17; break; default: - _Notify->DisplayError("fpuStoreIntegerQwordFromX86Reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos, (pop == FALSE) ? Command : (Command + 0x8)); } @@ -3347,7 +3489,7 @@ void CX86Ops::fpuStoreDwordToN64Mem(int * StackPos,x86Reg x86reg, BOOL Pop) { case x86_EDI: PUTDST16(m_RecompPos,0x97D9|s); break; case x86_EBP: PUTDST16(m_RecompPos,0x95D9|s); break; default: - _Notify->DisplayError("fpuStoreDwordToN64Mem\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST32(m_RecompPos,_MMU->Rdram()); } @@ -3360,7 +3502,7 @@ void CX86Ops::fpuStoreIntegerDword(int * StackPos,void *Variable, const char * V } void CX86Ops::fpuStoreIntegerDwordFromX86Reg(int * StackPos,x86Reg x86reg, BOOL pop) { - BYTE Command; + BYTE Command = 0; CPU_Message(" fist%s dword ptr [%s]", m_fpupop[pop], x86_Name(x86reg)); if (pop) { *StackPos = (*StackPos + 1) & 7; } @@ -3374,7 +3516,7 @@ void CX86Ops::fpuStoreIntegerDwordFromX86Reg(int * StackPos,x86Reg x86reg, BOOL case x86_ESI: Command = 0x16; break; case x86_EDI: Command = 0x17; break; default: - _Notify->DisplayError("fpuStoreIntegerDwordFromX86Reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos, (pop == FALSE) ? Command : (Command + 0x8)); } @@ -3388,7 +3530,7 @@ void CX86Ops::fpuStoreIntegerQword(int * StackPos,void *Variable, const char * V } void CX86Ops::fpuStoreIntegerQwordFromX86Reg(int * StackPos, x86Reg x86reg, BOOL pop) { - BYTE Command; + BYTE Command = 0; CPU_Message(" fist%s qword ptr [%s]", m_fpupop[pop], x86_Name(x86reg)); if (pop) { *StackPos = (*StackPos + 1) & 7; } @@ -3402,13 +3544,13 @@ void CX86Ops::fpuStoreIntegerQwordFromX86Reg(int * StackPos, x86Reg x86reg, BOOL case x86_ESI: Command = 0x36; break; case x86_EDI: Command = 0x37; break; default: - _Notify->DisplayError("fpuStoreIntegerQwordFromX86Reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos, (pop == FALSE) ? Command : (Command + 0x8)); } void CX86Ops::fpuStoreQwordFromX86Reg(int * StackPos, x86Reg x86reg, BOOL pop) { - BYTE Command; + BYTE Command = 0; CPU_Message(" fst%s qword ptr [%s]", m_fpupop[pop], x86_Name(x86reg)); if (pop) { *StackPos = (*StackPos + 1) & 7; } @@ -3422,7 +3564,7 @@ void CX86Ops::fpuStoreQwordFromX86Reg(int * StackPos, x86Reg x86reg, BOOL pop) { case x86_ESI: Command = 0x16; break; case x86_EDI: Command = 0x17; break; default: - _Notify->DisplayError("fpuStoreQwordFromX86Reg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); } PUTDST8(m_RecompPos, (pop == FALSE) ? Command : (Command + 0x8)); } @@ -3448,7 +3590,7 @@ void CX86Ops::fpuSubDwordRegPointer(x86Reg x86Pointer) { case x86_ESI: PUTDST16(m_RecompPos,0x26D8); break; case x86_EDI: PUTDST16(m_RecompPos,0x27D8); break; default: - _Notify->DisplayError("fpuSubDwordRegPointer\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3475,7 +3617,7 @@ void CX86Ops::fpuSubQwordRegPointer(x86Reg x86Pointer) { case x86_ESI: PUTDST16(m_RecompPos,0x26DC); break; case x86_EDI: PUTDST16(m_RecompPos,0x27DC); break; default: - _Notify->DisplayError("fpuSubQwordRegPointer\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3498,7 +3640,7 @@ void CX86Ops::fpuSubReg(x86FpuValues x86reg) { case x86_ST6: PUTDST16(m_RecompPos,0xE6D8); break; case x86_ST7: PUTDST16(m_RecompPos,0xE7D8); break; default: - _Notify->DisplayError("fpuSubReg\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3515,7 +3657,7 @@ void CX86Ops::fpuSubRegPop(x86FpuValues x86reg) { case x86_ST6: PUTDST16(m_RecompPos,0xEEDE); break; case x86_ST7: PUTDST16(m_RecompPos,0xEFDE); break; default: - _Notify->DisplayError("fpuSubRegPop\nUnknown x86 Register"); + _Notify->BreakPoint(__FILE__,__LINE__); break; } } @@ -3530,6 +3672,8 @@ const char * CX86Ops::x86_Name ( x86Reg Reg ) { case x86_EDI: return "edi"; case x86_EBP: return "ebp"; case x86_ESP: return "esp"; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } return "???"; } @@ -3544,6 +3688,8 @@ const char * CX86Ops::x86_ByteName ( x86Reg Reg ) { case x86_BH: return "bh"; case x86_CH: return "ch"; case x86_DH: return "dh"; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } return "???"; } @@ -3558,6 +3704,8 @@ const char * CX86Ops::x86_HalfName ( x86Reg Reg ) { case x86_EDI: return "di"; case x86_EBP: return "bp"; case x86_ESP: return "sp"; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } return "???"; } @@ -3572,6 +3720,8 @@ const char * CX86Ops::fpu_Name ( x86FpuValues Reg ) { case x86_ST5: return "ST(5)"; case x86_ST6: return "ST(6)"; case x86_ST7: return "ST(7)"; + default: + _Notify->BreakPoint(__FILE__,__LINE__); } return "???"; } @@ -3595,9 +3745,6 @@ BYTE CX86Ops::CalcMultiplyCode (Multipler Multiply) } } -//#define SetJump32(Loc,JumpLoc) *(DWORD *)(Loc)= (DWORD)(((DWORD)(JumpLoc)) - (((DWORD)(Loc)) + 4)); -//#define SetJump8(Loc,JumpLoc) *(BYTE *)(Loc)= (BYTE )(((BYTE )(JumpLoc)) - (((BYTE )(Loc)) + 1)); - void CX86Ops::SetJump32(DWORD * Loc, DWORD * JumpLoc) { *Loc = (DWORD)(((DWORD)JumpLoc) - (((DWORD)(Loc)) + 4));