remove a useless #define

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1582 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2008-12-18 10:52:55 +00:00
parent cbdcb536bf
commit 8cba6d933c
7 changed files with 37 additions and 96 deletions

View File

@ -26,10 +26,6 @@
#include "JitCache.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
{
struct JitStats

View File

@ -39,6 +39,7 @@
// Zelda and many more games seem to pass the Acid Test.
using namespace Gen;
namespace Jit64
{
void sc(UGeckoInstruction _inst)
@ -260,4 +261,4 @@ namespace Jit64
WriteExitDestInEAX(0);
}
}
} // namespace

View File

@ -40,25 +40,13 @@
// #define INSTRUCTION_START Default(inst); return;
#define INSTRUCTION_START
#ifdef _M_IX86
#define DISABLE_32BIT Default(inst); return;
#else
#define DISABLE_32BIT ;
#endif
namespace Jit64
{
namespace {
// u64 GC_ALIGNED16(temp64);
// u32 GC_ALIGNED16(temp32);
}
void lbzx(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff
|| Core::g_CoreStartupParameter.bJITLoadStorelbzxOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
int a = inst.RA, b = inst.RB, d = inst.RD;
@ -83,10 +71,8 @@ namespace Jit64
void lwzx(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
int a = inst.RA, b = inst.RB, d = inst.RD;
@ -111,10 +97,8 @@ namespace Jit64
void lhax(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
int a = inst.RA, b = inst.RB, d = inst.RD;
@ -127,23 +111,20 @@ namespace Jit64
MOV(32, R(ABI_PARAM1), gpr.R(b));
if (a)
ADD(32, R(ABI_PARAM1), gpr.R(a));
#if 1
// Some homebrew actually loads from a hw reg with this instruction
SafeLoadRegToEAX(ABI_PARAM1, 16, 0, true);
MOV(32, gpr.R(d), R(EAX));
#else
UnsafeLoadRegToReg(ABI_PARAM1, gpr.RX(d), 16, 0, true);
#endif
gpr.UnlockAll();
gpr.UnlockAllX();
}
void lXz(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff
|| Core::g_CoreStartupParameter.bJITLoadStorelXzOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
int d = inst.RD;
@ -233,10 +214,8 @@ namespace Jit64
void lha(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
int d = inst.RD;
@ -257,10 +236,8 @@ namespace Jit64
// Zero cache line.
void dcbz(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
MOV(32, R(EAX), gpr.R(inst.RB));
@ -280,10 +257,8 @@ namespace Jit64
void stX(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
int s = inst.RS;
@ -422,7 +397,6 @@ namespace Jit64
// A few games use these heavily in video codecs.
void lmw(UGeckoInstruction inst)
{
INSTRUCTION_START;
Default(inst);
return;
@ -449,7 +423,6 @@ namespace Jit64
void stmw(UGeckoInstruction inst)
{
INSTRUCTION_START;
Default(inst);
return;
/*

View File

@ -60,11 +60,10 @@ u32 GC_ALIGNED16(temp32);
void lfs(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
#endif
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
int d = inst.RD;
int a = inst.RA;
if (!a)
@ -98,11 +97,10 @@ void lfs(UGeckoInstruction inst)
void lfd(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
#endif
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
int d = inst.RD;
int a = inst.RA;
if (!a)
@ -166,11 +164,10 @@ void lfd(UGeckoInstruction inst)
void stfd(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
#endif
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
int s = inst.RS;
int a = inst.RA;
if (!a)
@ -220,11 +217,10 @@ void stfd(UGeckoInstruction inst)
void stfs(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
#endif
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
bool update = inst.OPCD & 1;
int s = inst.RS;
int a = inst.RA;
@ -278,13 +274,13 @@ void stfs(UGeckoInstruction inst)
void stfsx(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
#endif
// We can take a shortcut here - it's not likely that a hardware access would use this instruction.
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
// We can take a shortcut here - it's not likely that a hardware access would use this instruction.
#ifdef _M_X64
// TODO
Default(inst); return;
#else
gpr.FlushLockX(ABI_PARAM1);
@ -305,11 +301,10 @@ void stfsx(UGeckoInstruction inst)
void lfsx(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
#endif
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
fpr.Lock(inst.RS);
fpr.LoadToX64(inst.RS, false, true);
MOV(32, R(EAX), gpr.R(inst.RB));

View File

@ -38,6 +38,7 @@
#include "JitRegCache.h"
#define INSTRUCTION_START
// #define INSTRUCTION_START Default(inst); return;
namespace Jit64 {
@ -98,10 +99,8 @@ const double GC_ALIGNED16(m_dequantizeTableD[]) =
// We will have to break block after quantizers are written to.
void psq_st(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStorePairedOff)
{Default(inst); return;} // turn off from debugger
#endif
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStorePairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
js.block_flags |= BLOCK_USE_GQR0 << inst.I;
@ -312,11 +311,10 @@ void psq_st(UGeckoInstruction inst)
void psq_l(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStorePairedOff)
{Default(inst); return;} // turn off from debugger
#endif
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStorePairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
js.block_flags |= BLOCK_USE_GQR0 << inst.I;
if (js.blockSetsQuantizers || !Core::GetStartupParameter().bOptimizeQuantizers)

View File

@ -54,10 +54,8 @@ namespace Jit64
void ps_mr(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
if (inst.Rc) {
Default(inst); return;
@ -72,10 +70,8 @@ namespace Jit64
void ps_sel(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
Default(inst);
return;
@ -107,10 +103,8 @@ namespace Jit64
void ps_sign(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
if (inst.Rc) {
Default(inst); return;
@ -147,10 +141,8 @@ namespace Jit64
void ps_rsqrte(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
if (inst.Rc) {
Default(inst); return;
@ -222,10 +214,8 @@ namespace Jit64
void ps_arith(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
if (inst.Rc) {
Default(inst); return;
@ -249,10 +239,8 @@ namespace Jit64
void ps_sum(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
if (inst.Rc) {
Default(inst); return;
@ -293,10 +281,8 @@ namespace Jit64
void ps_muls(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
if (inst.Rc) {
Default(inst); return;
@ -335,10 +321,8 @@ namespace Jit64
//TODO: find easy cases and optimize them, do a breakout like ps_arith
void ps_mergeXX(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
if (inst.Rc) {
Default(inst); return;
@ -380,10 +364,8 @@ namespace Jit64
//TODO: add optimized cases
void ps_maddXX(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
if (inst.Rc) {
Default(inst); return;

View File

@ -37,10 +37,8 @@ namespace Jit64
{
void mtspr(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
u32 iIndex = (inst.SPRU << 5) | (inst.SPRL & 0x1F);
int d = inst.RD;
@ -90,10 +88,8 @@ namespace Jit64
void mfspr(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
u32 iIndex = (inst.SPRU << 5) | (inst.SPRL & 0x1F);
int d = inst.RD;
@ -138,10 +134,8 @@ namespace Jit64
void mfmsr(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
//Privileged?
gpr.LoadToX64(inst.RD, false);
@ -150,16 +144,17 @@ namespace Jit64
void mftb(UGeckoInstruction inst)
{
#ifdef JIT_OFF_OPTIONS
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
#endif
INSTRUCTION_START;
mfspr(inst);
}
void mfcr(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
// USES_CR
int d = inst.RD;
gpr.LoadToX64(d, false, true);
@ -175,8 +170,9 @@ namespace Jit64
void mtcrf(UGeckoInstruction inst)
{
//Default(inst);
//return;
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
// USES_CR
u32 mask = 0;