From 719eaa7ead9e4f1ec6322fc32a6a8267efda8e46 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 27 Sep 2015 13:47:35 -0400 Subject: [PATCH] MemoryFilter starts to compile. --- .../N64 System/Mips/Memory Virtual Mem.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp b/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp index c21d5abca..d9b5d556e 100644 --- a/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp +++ b/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp @@ -1987,7 +1987,21 @@ void CMipsMemoryVM::ResetMemoryStack() int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer ) { -#ifdef _M_IX86 +#if defined(_M_IX86) && defined(_WIN32) +// to do: Remove the _M_IX86 criteria. This can compile on 64-bit Windows. + +#ifdef _WIN64 +#define Eax Rax +#define Ebx Rbx +#define Ecx Rcx +#define Edx Rdx +#define Esp Rsp +#define Ebp Rbp +#define Esi Rsi +#define Edi Rdi + +#define Eip Rip +#endif if (dwExptCode != EXCEPTION_ACCESS_VIOLATION) { if (bHaveDebugger()) @@ -2010,7 +2024,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer ) return EXCEPTION_EXECUTE_HANDLER; } - DWORD * Reg = NULL; + size_t * Reg = NULL; BYTE * TypePos = (unsigned char *)lpEP->ContextRecord->Eip; EXCEPTION_RECORD exRec = *lpEP->ExceptionRecord;