diff --git a/Common/x64Emitter.h b/Common/x64Emitter.h index cf739c7a30..1c7e26a001 100644 --- a/Common/x64Emitter.h +++ b/Common/x64Emitter.h @@ -26,6 +26,12 @@ #error "Don't build this on arm." #endif +#ifdef _M_X64 +#define PTRBITS 64 +#else +#define PTRBITS 32 +#endif + namespace Gen { diff --git a/Core/MIPS/x86/Asm.cpp b/Core/MIPS/x86/Asm.cpp index d642f9e205..b4fbbe7161 100644 --- a/Core/MIPS/x86/Asm.cpp +++ b/Core/MIPS/x86/Asm.cpp @@ -103,13 +103,9 @@ void AsmRoutineManager::Generate(MIPSState *mips, MIPSComp::Jit *jit) dispatcherNoCheck = GetCodePtr(); - // TODO: Find a less costly place to put this (or multiple..) -#ifdef _M_X64 + // TODO: Find a less costly place to put this (or multiple..)? // From the start of the FP reg, a single byte offset can reach all GPR + all FPR (but no VFPUR) - MOV(64, R(CTXREG), ImmPtr(&mips->f[0])); -#else - MOV(32, R(CTXREG), ImmPtr(&mips->f[0])); -#endif + MOV(PTRBITS, R(CTXREG), ImmPtr(&mips->f[0])); MOV(32, R(EAX), M(&mips->pc)); #ifdef _M_IX86 diff --git a/GPU/Common/VertexDecoderX86.cpp b/GPU/Common/VertexDecoderX86.cpp index 9feb3be6da..7386fa329b 100644 --- a/GPU/Common/VertexDecoderX86.cpp +++ b/GPU/Common/VertexDecoderX86.cpp @@ -150,13 +150,6 @@ static const JitLookup jitLookup[] = { {&VertexDecoder::Step_Color5551Morph, &VertexDecoderJitCache::Jit_Color5551Morph}, }; -// TODO: This should probably be global... -#ifdef _M_X64 -#define PTRBITS 64 -#else -#define PTRBITS 32 -#endif - JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec) { dec_ = &dec; const u8 *start = this->GetCodePtr();