mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-21 00:39:53 +00:00
enable SPU recompiler on linux
This commit is contained in:
parent
d085301af3
commit
1ba5cafc5f
@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#ifdef _WIN32
|
|
||||||
#include "Emu/Cell/SPUOpcodes.h"
|
#include "Emu/Cell/SPUOpcodes.h"
|
||||||
#include "Emu/Memory/Memory.h"
|
#include "Emu/Memory/Memory.h"
|
||||||
#include "Emu/Cell/SPUThread.h"
|
#include "Emu/Cell/SPUThread.h"
|
||||||
@ -104,11 +103,19 @@ public:
|
|||||||
|
|
||||||
#define c (*compiler)
|
#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_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_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_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_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")
|
#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_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))
|
#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
|
else
|
||||||
{
|
{
|
||||||
throw __FUNCTION__"(): invalid case";
|
throw (std::string(__FUNCTION__) + std::string("(): invalid case")).c_str();
|
||||||
}
|
}
|
||||||
LOG_OPCODE();
|
LOG_OPCODE();
|
||||||
}
|
}
|
||||||
@ -3777,7 +3784,7 @@ private:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw __FUNCTION__"(): invalid case";
|
throw (std::string(__FUNCTION__) + std::string("(): invalid case")).c_str();
|
||||||
}
|
}
|
||||||
LOG_OPCODE();
|
LOG_OPCODE();
|
||||||
}
|
}
|
||||||
@ -3797,6 +3804,5 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif WIN32
|
|
||||||
|
|
||||||
#undef c
|
#undef c
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#include "SPUInterpreter.h"
|
#include "SPUInterpreter.h"
|
||||||
#include "SPURecompiler.h"
|
#include "SPURecompiler.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
static const g_imm_table_struct g_imm_table;
|
static const g_imm_table_struct g_imm_table;
|
||||||
|
|
||||||
SPURecompilerCore::SPURecompilerCore(SPUThread& cpu)
|
SPURecompilerCore::SPURecompilerCore(SPUThread& cpu)
|
||||||
@ -251,4 +250,3 @@ u8 SPURecompilerCore::DecodeMemory(const u64 address)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
@ -75,11 +75,7 @@ void SPUThread::DoRun()
|
|||||||
m_dec = new SPUDecoder(*new SPUInterpreter(*this));
|
m_dec = new SPUDecoder(*new SPUInterpreter(*this));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
#ifdef _WIN32
|
|
||||||
m_dec = new SPURecompilerCore(*this);
|
m_dec = new SPURecompilerCore(*this);
|
||||||
#else
|
|
||||||
m_dec = new SPUDecoder(*new SPUInterpreter(*this));
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user