Avoid an ifdef using PTRBITS

This commit is contained in:
Henrik Rydgard 2014-10-12 18:53:56 +02:00
parent eab010a0c0
commit 8177b4c43b
3 changed files with 8 additions and 13 deletions

View File

@ -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
{

View File

@ -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

View File

@ -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();