Added option to compile without the JIT off options.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@843 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson 2008-10-12 13:59:26 +00:00
parent 91d4d5b98c
commit 3d345450f5
8 changed files with 128 additions and 22 deletions

View File

@ -26,6 +26,14 @@
#include "JitCache.h" #include "JitCache.h"
#include "x64Emitter.h" #include "x64Emitter.h"
// =======================================================================================
// Enable or disable JIT off options. All the if() checks in the JIT functions may result in a
// speed drop. However it should barely be noticable as the code is recompiled rarely.
// --------------
#define JIT_OFF_OPTIONS
namespace Jit64 namespace Jit64
{ {
struct JitStats struct JitStats

View File

@ -93,8 +93,10 @@ namespace Jit64
void reg_imm(UGeckoInstruction inst) void reg_imm(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int d = inst.RD, a = inst.RA, s = inst.RS; int d = inst.RD, a = inst.RA, s = inst.RS;
switch (inst.OPCD) switch (inst.OPCD)
@ -122,8 +124,10 @@ namespace Jit64
// unsigned // unsigned
void cmpli(UGeckoInstruction inst) void cmpli(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
u32 uimm = inst.UIMM; u32 uimm = inst.UIMM;
@ -152,8 +156,10 @@ namespace Jit64
// signed // signed
void cmpi(UGeckoInstruction inst) void cmpi(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
s32 simm = (s32)(s16)inst.UIMM; s32 simm = (s32)(s16)inst.UIMM;
@ -182,8 +188,10 @@ namespace Jit64
// signed // signed
void cmp(UGeckoInstruction inst) void cmp(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
int b = inst.RB; int b = inst.RB;
@ -214,8 +222,10 @@ namespace Jit64
// unsigned // unsigned
void cmpl(UGeckoInstruction inst) void cmpl(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
int b = inst.RB; int b = inst.RB;
@ -245,8 +255,10 @@ namespace Jit64
void orx(UGeckoInstruction inst) void orx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
int s = inst.RS; int s = inst.RS;
@ -282,8 +294,10 @@ namespace Jit64
void andx(UGeckoInstruction inst) void andx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, s = inst.RS, b = inst.RB; int a = inst.RA, s = inst.RS, b = inst.RB;
if (a != s && a != b) { if (a != s && a != b) {
@ -305,8 +319,10 @@ namespace Jit64
void extsbx(UGeckoInstruction inst) void extsbx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, int a = inst.RA,
s = inst.RS; s = inst.RS;
@ -322,8 +338,10 @@ namespace Jit64
void extshx(UGeckoInstruction inst) void extshx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, s = inst.RS; int a = inst.RA, s = inst.RS;
gpr.LoadToX64(a, a == s, true); gpr.LoadToX64(a, a == s, true);
@ -337,8 +355,10 @@ namespace Jit64
void subfic(UGeckoInstruction inst) void subfic(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, d = inst.RD; int a = inst.RA, d = inst.RD;
gpr.FlushLockX(ECX); gpr.FlushLockX(ECX);
@ -373,8 +393,10 @@ namespace Jit64
void subfx(UGeckoInstruction inst) void subfx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, b = inst.RB, d = inst.RD; int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.Lock(a, b, d); gpr.Lock(a, b, d);
@ -396,8 +418,10 @@ namespace Jit64
void mulli(UGeckoInstruction inst) void mulli(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, d = inst.RD; int a = inst.RA, d = inst.RD;
gpr.FlushLockX(EDX); gpr.FlushLockX(EDX);
@ -417,8 +441,10 @@ namespace Jit64
void mullwx(UGeckoInstruction inst) void mullwx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, b = inst.RB, d = inst.RD; int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.FlushLockX(EDX); gpr.FlushLockX(EDX);
@ -442,8 +468,10 @@ namespace Jit64
void mulhwux(UGeckoInstruction inst) void mulhwux(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, b = inst.RB, d = inst.RD; int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.FlushLockX(EDX); gpr.FlushLockX(EDX);
@ -505,8 +533,10 @@ namespace Jit64
void addx(UGeckoInstruction inst) void addx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, b = inst.RB, d = inst.RD; int a = inst.RA, b = inst.RB, d = inst.RD;
_assert_msg_(DYNA_REC, !inst.OE, "Add - OE enabled :("); _assert_msg_(DYNA_REC, !inst.OE, "Add - OE enabled :(");
@ -558,8 +588,10 @@ namespace Jit64
// This can be optimized // This can be optimized
void addex(UGeckoInstruction inst) void addex(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, b = inst.RB, d = inst.RD; int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.FlushLockX(ECX); gpr.FlushLockX(ECX);
@ -584,8 +616,10 @@ namespace Jit64
void rlwinmx(UGeckoInstruction inst) void rlwinmx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
int s = inst.RS; int s = inst.RS;
@ -647,8 +681,10 @@ namespace Jit64
void rlwimix(UGeckoInstruction inst) void rlwimix(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
int s = inst.RS; int s = inst.RS;
@ -681,8 +717,10 @@ namespace Jit64
void rlwnmx(UGeckoInstruction inst) void rlwnmx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, b = inst.RB, s = inst.RS; int a = inst.RA, b = inst.RB, s = inst.RS;
if (gpr.R(a).IsImm()) if (gpr.R(a).IsImm())
@ -711,8 +749,10 @@ namespace Jit64
void negx(UGeckoInstruction inst) void negx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
int d = inst.RD; int d = inst.RD;
@ -731,8 +771,10 @@ namespace Jit64
void srwx(UGeckoInstruction inst) void srwx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
int b = inst.RB; int b = inst.RB;
@ -760,8 +802,10 @@ namespace Jit64
void slwx(UGeckoInstruction inst) void slwx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
int b = inst.RB; int b = inst.RB;
@ -789,8 +833,10 @@ namespace Jit64
void srawix(UGeckoInstruction inst) void srawix(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
int s = inst.RS; int s = inst.RS;
@ -834,8 +880,10 @@ namespace Jit64
// count leading zeroes // count leading zeroes
void cntlzwx(UGeckoInstruction inst) void cntlzwx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA; int a = inst.RA;
int s = inst.RS; int s = inst.RS;

View File

@ -54,8 +54,10 @@ namespace Jit64
} }
void lbzx(UGeckoInstruction inst) void lbzx(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
//if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) //if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
// {Default(inst); return;} // turn off from debugger // {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int a = inst.RA, b = inst.RB, d = inst.RD; int a = inst.RA, b = inst.RB, d = inst.RD;
@ -77,8 +79,10 @@ namespace Jit64
void lXz(UGeckoInstruction inst) void lXz(UGeckoInstruction inst)
{ {
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) #ifdef JIT_OFF_OPTIONS
{Default(inst); return;} // turn off from debugger //if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
// {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int d = inst.RD; int d = inst.RD;
@ -162,8 +166,10 @@ namespace Jit64
void lha(UGeckoInstruction inst) void lha(UGeckoInstruction inst)
{ {
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) #ifdef JIT_OFF_OPTIONS
{Default(inst); return;} // turn off from debugger //if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
// {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int d = inst.RD; int d = inst.RD;
@ -184,8 +190,10 @@ namespace Jit64
// Zero cache line. // Zero cache line.
void dcbz(UGeckoInstruction inst) void dcbz(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
//if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) //if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
// {Default(inst); return;} // turn off from debugger // {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
MOV(32, R(EAX), gpr.R(inst.RB)); MOV(32, R(EAX), gpr.R(inst.RB));
@ -205,8 +213,10 @@ namespace Jit64
void stX(UGeckoInstruction inst) void stX(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
//if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) //if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
// {Default(inst); return;} // turn off from debugger // {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int s = inst.RS; int s = inst.RS;

View File

@ -66,8 +66,10 @@ u32 GC_ALIGNED16(temp32);
void lfs(UGeckoInstruction inst) void lfs(UGeckoInstruction inst)
{ {
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) #ifdef JIT_OFF_OPTIONS
{Default(inst); return;} // turn off from debugger if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
int d = inst.RD; int d = inst.RD;
int a = inst.RA; int a = inst.RA;
@ -102,8 +104,10 @@ void lfs(UGeckoInstruction inst)
void lfd(UGeckoInstruction inst) void lfd(UGeckoInstruction inst)
{ {
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) #ifdef JIT_OFF_OPTIONS
{Default(inst); return;} // turn off from debugger if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
if (!cpu_info.bSSSE3) { if (!cpu_info.bSSSE3) {
DISABLE_32BIT; DISABLE_32BIT;
@ -148,8 +152,10 @@ void lfd(UGeckoInstruction inst)
void stfd(UGeckoInstruction inst) void stfd(UGeckoInstruction inst)
{ {
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) #ifdef JIT_OFF_OPTIONS
{Default(inst); return;} // turn off from debugger if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
if (!cpu_info.bSSSE3) if (!cpu_info.bSSSE3)
{ {
@ -193,8 +199,10 @@ void stfd(UGeckoInstruction inst)
void stfs(UGeckoInstruction inst) void stfs(UGeckoInstruction inst)
{ {
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) #ifdef JIT_OFF_OPTIONS
{Default(inst); return;} // turn off from debugger if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
bool update = inst.OPCD & 1; bool update = inst.OPCD & 1;
int s = inst.RS; int s = inst.RS;
@ -258,8 +266,10 @@ void stfsx(UGeckoInstruction inst)
void lfsx(UGeckoInstruction inst) void lfsx(UGeckoInstruction inst)
{ {
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) #ifdef JIT_OFF_OPTIONS
{Default(inst); return;} // turn off from debugger if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
fpr.Lock(inst.RS); fpr.Lock(inst.RS);
fpr.LoadToX64(inst.RS, false, true); fpr.LoadToX64(inst.RS, false, true);

View File

@ -106,8 +106,10 @@ const double GC_ALIGNED16(m_dequantizeTableD[]) =
// We will have to break block after quantizers are written to. // We will have to break block after quantizers are written to.
void psq_st(UGeckoInstruction inst) void psq_st(UGeckoInstruction inst)
{ {
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) #ifdef JIT_OFF_OPTIONS
{Default(inst); return;} // turn off from debugger if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
js.block_flags |= BLOCK_USE_GQR0 << inst.I; js.block_flags |= BLOCK_USE_GQR0 << inst.I;
@ -285,8 +287,10 @@ const u8 GC_ALIGNED16(pbswapShuffleNoop[16]) = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
void psq_l(UGeckoInstruction inst) void psq_l(UGeckoInstruction inst)
{ {
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff) #ifdef JIT_OFF_OPTIONS
{Default(inst); return;} // turn off from debugger if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
js.block_flags |= BLOCK_USE_GQR0 << inst.I; js.block_flags |= BLOCK_USE_GQR0 << inst.I;

View File

@ -54,8 +54,10 @@ namespace Jit64
void ps_mr(UGeckoInstruction inst) void ps_mr(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
if (inst.Rc) { if (inst.Rc) {
Default(inst); return; Default(inst); return;
@ -70,8 +72,10 @@ namespace Jit64
void ps_sel(UGeckoInstruction inst) void ps_sel(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
Default(inst); Default(inst);
return; return;
@ -103,8 +107,10 @@ namespace Jit64
void ps_sign(UGeckoInstruction inst) void ps_sign(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
if (inst.Rc) { if (inst.Rc) {
Default(inst); return; Default(inst); return;
@ -141,8 +147,10 @@ namespace Jit64
void ps_rsqrte(UGeckoInstruction inst) void ps_rsqrte(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
if (inst.Rc) { if (inst.Rc) {
Default(inst); return; Default(inst); return;
@ -214,8 +222,10 @@ namespace Jit64
void ps_arith(UGeckoInstruction inst) void ps_arith(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
if (inst.Rc) { if (inst.Rc) {
Default(inst); return; Default(inst); return;
@ -240,8 +250,10 @@ namespace Jit64
//TODO: find easy cases and optimize them, do a breakout like ps_arith //TODO: find easy cases and optimize them, do a breakout like ps_arith
void ps_mergeXX(UGeckoInstruction inst) void ps_mergeXX(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
if (inst.Rc) { if (inst.Rc) {
Default(inst); return; Default(inst); return;
@ -283,8 +295,10 @@ namespace Jit64
//TODO: add optimized cases //TODO: add optimized cases
void ps_maddXX(UGeckoInstruction inst) void ps_maddXX(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
if (inst.Rc) { if (inst.Rc) {
Default(inst); return; Default(inst); return;
@ -330,8 +344,10 @@ namespace Jit64
void ps_mulsX(UGeckoInstruction inst) void ps_mulsX(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
Default(inst); Default(inst);
return; return;

View File

@ -37,8 +37,10 @@ namespace Jit64
{ {
void mtspr(UGeckoInstruction inst) void mtspr(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
u32 iIndex = (inst.SPRU << 5) | (inst.SPRL & 0x1F); u32 iIndex = (inst.SPRU << 5) | (inst.SPRL & 0x1F);
int d = inst.RD; int d = inst.RD;
@ -87,8 +89,10 @@ namespace Jit64
void mfspr(UGeckoInstruction inst) void mfspr(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
u32 iIndex = (inst.SPRU << 5) | (inst.SPRL & 0x1F); u32 iIndex = (inst.SPRU << 5) | (inst.SPRL & 0x1F);
int d = inst.RD; int d = inst.RD;
@ -115,7 +119,7 @@ namespace Jit64
// ======================================================================================= // =======================================================================================
// ... ? Don't interpret this, if we do we get thrown out // Don't interpret this, if we do we get thrown out
// -------------- // --------------
void mtmsr(UGeckoInstruction inst) void mtmsr(UGeckoInstruction inst)
{ {
@ -133,8 +137,10 @@ namespace Jit64
void mfmsr(UGeckoInstruction inst) void mfmsr(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
//Privileged? //Privileged?
gpr.LoadToX64(inst.RD, false); gpr.LoadToX64(inst.RD, false);
@ -143,8 +149,10 @@ namespace Jit64
void mftb(UGeckoInstruction inst) void mftb(UGeckoInstruction inst)
{ {
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff) if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger {Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START; INSTRUCTION_START;
mfspr(inst); mfspr(inst);
} }

View File

@ -325,6 +325,7 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _T("&Interpreter"), wxEmptyString, wxITEM_CHECK); wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _T("&Interpreter"), wxEmptyString, wxITEM_CHECK);
interpreter->Check(!_LocalCoreStartupParameter.bUseJIT); interpreter->Check(!_LocalCoreStartupParameter.bUseJIT);
#ifdef JIT_OFF_OPTIONS
jitoff = pCoreMenu->Append(IDM_JITOFF, _T("&JIT off"), wxEmptyString, wxITEM_CHECK); jitoff = pCoreMenu->Append(IDM_JITOFF, _T("&JIT off"), wxEmptyString, wxITEM_CHECK);
jitoff->Check(_LocalCoreStartupParameter.bJITOff); jitoff->Check(_LocalCoreStartupParameter.bJITOff);
@ -342,6 +343,7 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
jitsroff = pCoreMenu->Append(IDM_JITSROFF, _T("&JIT SystemRegisters off"), wxEmptyString, wxITEM_CHECK); jitsroff = pCoreMenu->Append(IDM_JITSROFF, _T("&JIT SystemRegisters off"), wxEmptyString, wxITEM_CHECK);
jitsroff->Check(_LocalCoreStartupParameter.bJITSystemRegistersOff); jitsroff->Check(_LocalCoreStartupParameter.bJITSystemRegistersOff);
#endif
// wxMenuItem* dualcore = pDebugMenu->Append(IDM_DUALCORE, _T("&DualCore"), wxEmptyString, wxITEM_CHECK); // wxMenuItem* dualcore = pDebugMenu->Append(IDM_DUALCORE, _T("&DualCore"), wxEmptyString, wxITEM_CHECK);
// dualcore->Check(_LocalCoreStartupParameter.bUseDualCore); // dualcore->Check(_LocalCoreStartupParameter.bUseDualCore);