Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make JITDISABLE not defeat grep.
  • Loading branch information
comex committed Sep 5, 2013
1 parent 3baab41 commit cd7b97f
Show file tree
Hide file tree
Showing 25 changed files with 183 additions and 183 deletions.
4 changes: 2 additions & 2 deletions Source/Core/Core/Src/PowerPC/Jit64/Jit.h
Expand Up @@ -34,9 +34,9 @@
// #define INSTRUCTION_START PPCTables::CountInstruction(inst);
#define INSTRUCTION_START

#define JITDISABLE(type) \
#define JITDISABLE(setting) \
if (Core::g_CoreStartupParameter.bJITOff || \
Core::g_CoreStartupParameter.bJIT##type##Off) \
Core::g_CoreStartupParameter.setting) \
{Default(inst); return;}

#define MEMCHECK_START \
Expand Down
12 changes: 6 additions & 6 deletions Source/Core/Core/Src/PowerPC/Jit64/Jit_Branch.cpp
Expand Up @@ -31,7 +31,7 @@ using namespace Gen;
void Jit64::sc(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Branch)
JITDISABLE(bJITBranchOff)

gpr.Flush(FLUSH_ALL);
fpr.Flush(FLUSH_ALL);
Expand All @@ -44,7 +44,7 @@ void Jit64::sc(UGeckoInstruction inst)
void Jit64::rfi(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Branch)
JITDISABLE(bJITBranchOff)

gpr.Flush(FLUSH_ALL);
fpr.Flush(FLUSH_ALL);
Expand All @@ -64,7 +64,7 @@ void Jit64::rfi(UGeckoInstruction inst)
void Jit64::bx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Branch)
JITDISABLE(bJITBranchOff)

// We must always process the following sentence
// even if the blocks are merged by PPCAnalyst::Flatten().
Expand Down Expand Up @@ -107,7 +107,7 @@ void Jit64::bx(UGeckoInstruction inst)
void Jit64::bcx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Branch)
JITDISABLE(bJITBranchOff)

// USES_CR
_assert_msg_(DYNA_REC, js.isLastInstruction, "bcx not last instruction of block");
Expand Down Expand Up @@ -155,7 +155,7 @@ void Jit64::bcx(UGeckoInstruction inst)
void Jit64::bcctrx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Branch)
JITDISABLE(bJITBranchOff)

gpr.Flush(FLUSH_ALL);
fpr.Flush(FLUSH_ALL);
Expand Down Expand Up @@ -204,7 +204,7 @@ void Jit64::bcctrx(UGeckoInstruction inst)
void Jit64::bclrx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Branch)
JITDISABLE(bJITBranchOff)

if (!js.isLastInstruction &&
(inst.BO & (1 << 4)) && (inst.BO & (1 << 2))) {
Expand Down
10 changes: 5 additions & 5 deletions Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp
Expand Up @@ -75,7 +75,7 @@ static const double one_const = 1.0f;
void Jit64::fp_arith_s(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(FloatingPoint)
JITDISABLE(bJITFloatingPointOff)
if (inst.Rc) {
Default(inst); return;
}
Expand Down Expand Up @@ -124,7 +124,7 @@ void Jit64::fp_arith_s(UGeckoInstruction inst)
void Jit64::fmaddXX(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(FloatingPoint)
JITDISABLE(bJITFloatingPointOff)
if (inst.Rc) {
Default(inst); return;
}
Expand Down Expand Up @@ -181,7 +181,7 @@ void Jit64::fmaddXX(UGeckoInstruction inst)
void Jit64::fsign(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(FloatingPoint)
JITDISABLE(bJITFloatingPointOff)
if (inst.Rc) {
Default(inst); return;
}
Expand Down Expand Up @@ -212,7 +212,7 @@ void Jit64::fsign(UGeckoInstruction inst)
void Jit64::fmrx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(FloatingPoint)
JITDISABLE(bJITFloatingPointOff)
if (inst.Rc) {
Default(inst); return;
}
Expand All @@ -228,7 +228,7 @@ void Jit64::fmrx(UGeckoInstruction inst)
void Jit64::fcmpx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(FloatingPoint)
JITDISABLE(bJITFloatingPointOff)
if (jo.fpAccurateFcmp) {
Default(inst); return; // turn off from debugger
}
Expand Down
62 changes: 31 additions & 31 deletions Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp
Expand Up @@ -236,7 +236,7 @@ void Jit64::regimmop(int d, int a, bool binary, u32 value, Operation doop, void
void Jit64::reg_imm(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
u32 d = inst.RD, a = inst.RA, s = inst.RS;
switch (inst.OPCD)
{
Expand Down Expand Up @@ -309,7 +309,7 @@ void Jit64::cmpXX(UGeckoInstruction inst)
{
// USES_CR
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA;
int b = inst.RB;
int crf = inst.CRFD;
Expand Down Expand Up @@ -551,7 +551,7 @@ void Jit64::cmpXX(UGeckoInstruction inst)
void Jit64::boolX(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, s = inst.RS, b = inst.RB;
_dbg_assert_msg_(DYNA_REC, inst.OPCD == 31, "Invalid boolX");

Expand Down Expand Up @@ -814,7 +814,7 @@ void Jit64::boolX(UGeckoInstruction inst)
void Jit64::extsbx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, s = inst.RS;

if (gpr.R(s).IsImm())
Expand Down Expand Up @@ -842,7 +842,7 @@ void Jit64::extsbx(UGeckoInstruction inst)
void Jit64::extshx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, s = inst.RS;

if (gpr.R(s).IsImm())
Expand Down Expand Up @@ -870,7 +870,7 @@ void Jit64::extshx(UGeckoInstruction inst)
void Jit64::subfic(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, d = inst.RD;
gpr.Lock(a, d);
gpr.BindToRegister(d, a == d, true);
Expand Down Expand Up @@ -921,7 +921,7 @@ void Jit64::subfic(UGeckoInstruction inst)
void Jit64::subfcx(UGeckoInstruction inst)
{
INSTRUCTION_START;
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.Lock(a, b, d);
gpr.BindToRegister(d, (d == a || d == b), true);
Expand Down Expand Up @@ -953,7 +953,7 @@ void Jit64::subfcx(UGeckoInstruction inst)
void Jit64::subfex(UGeckoInstruction inst)
{
INSTRUCTION_START;
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.Lock(a, b, d);
gpr.BindToRegister(d, (d == a || d == b), true);
Expand Down Expand Up @@ -991,7 +991,7 @@ void Jit64::subfmex(UGeckoInstruction inst)
{
// USES_XER
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, d = inst.RD;
gpr.Lock(a, d);
gpr.BindToRegister(d, d == a);
Expand All @@ -1015,7 +1015,7 @@ void Jit64::subfzex(UGeckoInstruction inst)
{
// USES_XER
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, d = inst.RD;

gpr.Lock(a, d);
Expand All @@ -1040,7 +1040,7 @@ void Jit64::subfzex(UGeckoInstruction inst)
void Jit64::subfx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, b = inst.RB, d = inst.RD;

if (gpr.R(a).IsImm() && gpr.R(b).IsImm())
Expand Down Expand Up @@ -1090,7 +1090,7 @@ void Jit64::subfx(UGeckoInstruction inst)
void Jit64::mulli(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, d = inst.RD;
u32 imm = inst.SIMM_16;

Expand Down Expand Up @@ -1137,7 +1137,7 @@ void Jit64::mulli(UGeckoInstruction inst)
void Jit64::mullwx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, b = inst.RB, d = inst.RD;

if (gpr.R(a).IsImm() && gpr.R(b).IsImm())
Expand Down Expand Up @@ -1213,7 +1213,7 @@ void Jit64::mullwx(UGeckoInstruction inst)
void Jit64::mulhwux(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, b = inst.RB, d = inst.RD;

if (gpr.R(a).IsImm() && gpr.R(b).IsImm())
Expand Down Expand Up @@ -1244,7 +1244,7 @@ void Jit64::mulhwux(UGeckoInstruction inst)
void Jit64::divwux(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, b = inst.RB, d = inst.RD;

if (gpr.R(a).IsImm() && gpr.R(b).IsImm())
Expand Down Expand Up @@ -1401,7 +1401,7 @@ void Jit64::divwux(UGeckoInstruction inst)
void Jit64::divwx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, b = inst.RB, d = inst.RD;

if (gpr.R(a).IsImm() && gpr.R(b).IsImm())
Expand Down Expand Up @@ -1475,7 +1475,7 @@ void Jit64::divwx(UGeckoInstruction inst)
void Jit64::addx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, b = inst.RB, d = inst.RD;

if (gpr.R(a).IsImm() && gpr.R(b).IsImm())
Expand Down Expand Up @@ -1536,7 +1536,7 @@ void Jit64::addex(UGeckoInstruction inst)
{
// USES_XER
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, b = inst.RB, d = inst.RD;

if ((d == a) || (d == b))
Expand Down Expand Up @@ -1573,7 +1573,7 @@ void Jit64::addex(UGeckoInstruction inst)
void Jit64::addcx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, b = inst.RB, d = inst.RD;

if ((d == a) || (d == b))
Expand Down Expand Up @@ -1610,7 +1610,7 @@ void Jit64::addmex(UGeckoInstruction inst)
{
// USES_XER
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, d = inst.RD;

if (d == a)
Expand Down Expand Up @@ -1648,7 +1648,7 @@ void Jit64::addzex(UGeckoInstruction inst)
{
// USES_XER
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, d = inst.RD;

if (d == a)
Expand Down Expand Up @@ -1685,7 +1685,7 @@ void Jit64::addzex(UGeckoInstruction inst)
void Jit64::rlwinmx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA;
int s = inst.RS;
if (gpr.R(s).IsImm())
Expand Down Expand Up @@ -1752,7 +1752,7 @@ void Jit64::rlwinmx(UGeckoInstruction inst)
void Jit64::rlwimix(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA;
int s = inst.RS;

Expand Down Expand Up @@ -1838,7 +1838,7 @@ void Jit64::rlwimix(UGeckoInstruction inst)
void Jit64::rlwnmx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA, b = inst.RB, s = inst.RS;

u32 mask = Helper_Mask(inst.MB, inst.ME);
Expand Down Expand Up @@ -1874,7 +1874,7 @@ void Jit64::rlwnmx(UGeckoInstruction inst)
void Jit64::negx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA;
int d = inst.RD;

Expand Down Expand Up @@ -1912,7 +1912,7 @@ void Jit64::negx(UGeckoInstruction inst)
void Jit64::srwx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA;
int b = inst.RB;
int s = inst.RS;
Expand Down Expand Up @@ -1964,7 +1964,7 @@ void Jit64::srwx(UGeckoInstruction inst)
void Jit64::slwx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA;
int b = inst.RB;
int s = inst.RS;
Expand Down Expand Up @@ -2030,7 +2030,7 @@ void Jit64::srawx(UGeckoInstruction inst)
{
// USES_XER
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA;
int b = inst.RB;
int s = inst.RS;
Expand Down Expand Up @@ -2087,7 +2087,7 @@ void Jit64::srawx(UGeckoInstruction inst)
void Jit64::srawix(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA;
int s = inst.RS;
int amount = inst.SH;
Expand Down Expand Up @@ -2134,7 +2134,7 @@ void Jit64::srawix(UGeckoInstruction inst)
void Jit64::cntlzwx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)
int a = inst.RA;
int s = inst.RS;

Expand Down Expand Up @@ -2170,7 +2170,7 @@ void Jit64::cntlzwx(UGeckoInstruction inst)
void Jit64::twx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(Integer)
JITDISABLE(bJITIntegerOff)

s32 a = inst.RA;

Expand Down

0 comments on commit cd7b97f

Please sign in to comment.