enable SPU recompiler on linux

This commit is contained in:
Peter Tissen 2014-04-27 18:18:04 +02:00
parent d085301af3
commit 1ba5cafc5f
3 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,4 @@
#pragma once
#ifdef _WIN32
#include "Emu/Cell/SPUOpcodes.h"
#include "Emu/Memory/Memory.h"
#include "Emu/Cell/SPUThread.h"
@ -104,11 +103,19 @@ public:
#define c (*compiler)
#ifdef _WIN32
#define cpu_xmm(x) oword_ptr(*cpu_var, (sizeof((*(SPUThread*)nullptr).x) == 16) ? offsetof(SPUThread, x) : throw "sizeof("#x") != 16")
#define cpu_qword(x) qword_ptr(*cpu_var, (sizeof((*(SPUThread*)nullptr).x) == 8) ? offsetof(SPUThread, x) : throw "sizeof("#x") != 8")
#define cpu_dword(x) dword_ptr(*cpu_var, (sizeof((*(SPUThread*)nullptr).x) == 4) ? offsetof(SPUThread, x) : throw "sizeof("#x") != 4")
#define cpu_word(x) word_ptr(*cpu_var, (sizeof((*(SPUThread*)nullptr).x) == 2) ? offsetof(SPUThread, x) : throw "sizeof("#x") != 2")
#define cpu_byte(x) byte_ptr(*cpu_var, (sizeof((*(SPUThread*)nullptr).x) == 1) ? offsetof(SPUThread, x) : throw "sizeof("#x") != 1")
#else
#define cpu_xmm(x) oword_ptr(*cpu_var, &(((SPUThread*)0)->x) )
#define cpu_qword(x) qword_ptr(*cpu_var, &(((SPUThread*)0)->x) )
#define cpu_dword(x) dword_ptr(*cpu_var, &(((SPUThread*)0)->x) )
#define cpu_word(x) word_ptr(*cpu_var, &(((SPUThread*)0)->x) )
#define cpu_byte(x) byte_ptr(*cpu_var, &(((SPUThread*)0)->x) )
#endif
#define g_imm_xmm(x) oword_ptr(*g_imm_var, offsetof(g_imm_table_struct, x))
#define g_imm2_xmm(x, y) oword_ptr(*g_imm_var, y, 0, offsetof(g_imm_table_struct, x))
@ -3692,7 +3699,7 @@ private:
}
else
{
throw __FUNCTION__"(): invalid case";
throw (std::string(__FUNCTION__) + std::string("(): invalid case")).c_str();
}
LOG_OPCODE();
}
@ -3777,7 +3784,7 @@ private:
}
else
{
throw __FUNCTION__"(): invalid case";
throw (std::string(__FUNCTION__) + std::string("(): invalid case")).c_str();
}
LOG_OPCODE();
}
@ -3797,6 +3804,5 @@ private:
};
#endif WIN32
#undef c

View File

@ -4,7 +4,6 @@
#include "SPUInterpreter.h"
#include "SPURecompiler.h"
#ifdef _WIN32
static const g_imm_table_struct g_imm_table;
SPURecompilerCore::SPURecompilerCore(SPUThread& cpu)
@ -251,4 +250,3 @@ u8 SPURecompilerCore::DecodeMemory(const u64 address)
return 0;
}
}
#endif

View File

@ -75,11 +75,7 @@ void SPUThread::DoRun()
m_dec = new SPUDecoder(*new SPUInterpreter(*this));
break;
case 2:
#ifdef _WIN32
m_dec = new SPURecompilerCore(*this);
#else
m_dec = new SPUDecoder(*new SPUInterpreter(*this));
#endif
break;
default: