From 66adc4e695792c71f30c368fedecfc140b882e86 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 2 Jul 2015 20:30:40 -0700 Subject: [PATCH] jit: Normalize CONDITIONAL_DISABLE formatting. --- Core/MIPS/ARM/ArmCompALU.cpp | 2 +- Core/MIPS/ARM/ArmCompFPU.cpp | 2 +- Core/MIPS/ARM/ArmCompVFPU.cpp | 2 +- Core/MIPS/ARM/ArmCompVFPUNEON.cpp | 5 ++++- Core/MIPS/ARM/ArmCompVFPUNEONUtil.cpp | 5 ----- Core/MIPS/ARM/ArmRegCache.cpp | 1 + Core/MIPS/ARM64/Arm64CompALU.cpp | 7 +++---- Core/MIPS/ARM64/Arm64CompFPU.cpp | 2 +- Core/MIPS/ARM64/Arm64CompLoadStore.cpp | 3 +-- Core/MIPS/ARM64/Arm64CompVFPU.cpp | 5 ++--- Core/MIPS/ARM64/Arm64RegCache.cpp | 1 + Core/MIPS/x86/CompALU.cpp | 2 +- 12 files changed, 17 insertions(+), 20 deletions(-) diff --git a/Core/MIPS/ARM/ArmCompALU.cpp b/Core/MIPS/ARM/ArmCompALU.cpp index 6420800c24..ea70bf7762 100644 --- a/Core/MIPS/ARM/ArmCompALU.cpp +++ b/Core/MIPS/ARM/ArmCompALU.cpp @@ -39,7 +39,7 @@ using namespace MIPSAnalyst; // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -//#define CONDITIONAL_DISABLE { Comp_Generic(op); return; } +// #define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; #define DISABLE { Comp_Generic(op); return; } diff --git a/Core/MIPS/ARM/ArmCompFPU.cpp b/Core/MIPS/ARM/ArmCompFPU.cpp index 57178cd12a..babf9bf5ce 100644 --- a/Core/MIPS/ARM/ArmCompFPU.cpp +++ b/Core/MIPS/ARM/ArmCompFPU.cpp @@ -40,7 +40,7 @@ // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -//#define CONDITIONAL_DISABLE { Comp_Generic(op); return; } +// #define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; #define DISABLE { Comp_Generic(op); return; } diff --git a/Core/MIPS/ARM/ArmCompVFPU.cpp b/Core/MIPS/ARM/ArmCompVFPU.cpp index 3862dec1fc..4a2ef9fb57 100644 --- a/Core/MIPS/ARM/ArmCompVFPU.cpp +++ b/Core/MIPS/ARM/ArmCompVFPU.cpp @@ -37,9 +37,9 @@ // Currently known non working ones should have DISABLE. // #define CONDITIONAL_DISABLE { fpr.ReleaseSpillLocksAndDiscardTemps(); Comp_Generic(op); return; } - #define CONDITIONAL_DISABLE ; #define DISABLE { fpr.ReleaseSpillLocksAndDiscardTemps(); Comp_Generic(op); return; } + #define NEON_IF_AVAILABLE(func) { if (jo.useNEONVFPU) { func(op); return; } } #define _RS MIPS_GET_RS(op) #define _RT MIPS_GET_RT(op) diff --git a/Core/MIPS/ARM/ArmCompVFPUNEON.cpp b/Core/MIPS/ARM/ArmCompVFPUNEON.cpp index a96b86df83..73f50dc8db 100644 --- a/Core/MIPS/ARM/ArmCompVFPUNEON.cpp +++ b/Core/MIPS/ARM/ArmCompVFPUNEON.cpp @@ -47,8 +47,11 @@ #include "Core/MIPS/ARM/ArmCompVFPUNEONUtil.h" // TODO: Somehow #ifdef away on ARMv5eabi, without breaking the linker. -// #define CONDITIONAL_DISABLE { fpr.ReleaseSpillLocksAndDiscardTemps(); Comp_Generic(op); return; } +// All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. +// Currently known non working ones should have DISABLE. + +// #define CONDITIONAL_DISABLE { fpr.ReleaseSpillLocksAndDiscardTemps(); Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; #define DISABLE { fpr.ReleaseSpillLocksAndDiscardTemps(); Comp_Generic(op); return; } #define DISABLE_UNKNOWN_PREFIX { WLOG("DISABLE: Unknown Prefix in %s", __FUNCTION__); fpr.ReleaseSpillLocksAndDiscardTemps(); Comp_Generic(op); return; } diff --git a/Core/MIPS/ARM/ArmCompVFPUNEONUtil.cpp b/Core/MIPS/ARM/ArmCompVFPUNEONUtil.cpp index 7359d48898..8efa3181da 100644 --- a/Core/MIPS/ARM/ArmCompVFPUNEONUtil.cpp +++ b/Core/MIPS/ARM/ArmCompVFPUNEONUtil.cpp @@ -44,11 +44,6 @@ #include "Core/MIPS/ARM/ArmCompVFPUNEONUtil.h" // TODO: Somehow #ifdef away on ARMv5eabi, without breaking the linker. -// #define CONDITIONAL_DISABLE { fpr.ReleaseSpillLocksAndDiscardTemps(); Comp_Generic(op); return; } - -#define CONDITIONAL_DISABLE ; -#define DISABLE { fpr.ReleaseSpillLocksAndDiscardTemps(); Comp_Generic(op); return; } - #define _RS MIPS_GET_RS(op) #define _RT MIPS_GET_RT(op) diff --git a/Core/MIPS/ARM/ArmRegCache.cpp b/Core/MIPS/ARM/ArmRegCache.cpp index 2ab327834f..1979197799 100644 --- a/Core/MIPS/ARM/ArmRegCache.cpp +++ b/Core/MIPS/ARM/ArmRegCache.cpp @@ -184,6 +184,7 @@ void ArmRegCache::MapRegTo(ARMReg reg, MIPSGPReg mipsReg, int mapFlags) { } else { if (mipsReg == MIPS_REG_ZERO) { // This way, if we SetImm() it, we'll keep it. + // TODO: Actually, this may cause trouble with SetRegImm? The reg is NOT zero yet. mr[mipsReg].loc = ML_ARMREG_IMM; mr[mipsReg].imm = 0; } else { diff --git a/Core/MIPS/ARM64/Arm64CompALU.cpp b/Core/MIPS/ARM64/Arm64CompALU.cpp index cb61b539c3..0c22c248c3 100644 --- a/Core/MIPS/ARM64/Arm64CompALU.cpp +++ b/Core/MIPS/ARM64/Arm64CompALU.cpp @@ -40,12 +40,11 @@ using namespace MIPSAnalyst; // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -//#define CONDITIONAL_DISABLE { Comp_Generic(op); return; } +// #define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; #define DISABLE { Comp_Generic(op); return; } -namespace MIPSComp -{ +namespace MIPSComp { using namespace Arm64Gen; using namespace Arm64JitConstants; @@ -445,7 +444,7 @@ void Arm64Jit::Comp_Special3(MIPSOpcode op) { return; } - // It might be nice to avoid flushing rs, but it's the a little slower and + // It might be nice to avoid flushing rs, but it's a little slower and // usually more instructions. Not worth it. gpr.MapDirtyIn(rt, rs, false); BFI(gpr.R(rt), gpr.R(rs), pos, size - pos); diff --git a/Core/MIPS/ARM64/Arm64CompFPU.cpp b/Core/MIPS/ARM64/Arm64CompFPU.cpp index 80f4d4ee93..df71b3b3d4 100644 --- a/Core/MIPS/ARM64/Arm64CompFPU.cpp +++ b/Core/MIPS/ARM64/Arm64CompFPU.cpp @@ -48,7 +48,7 @@ // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -//#define CONDITIONAL_DISABLE { Comp_Generic(op); return; } +// #define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; #define DISABLE { Comp_Generic(op); return; } diff --git a/Core/MIPS/ARM64/Arm64CompLoadStore.cpp b/Core/MIPS/ARM64/Arm64CompLoadStore.cpp index 8550d715d2..ec28bcf463 100644 --- a/Core/MIPS/ARM64/Arm64CompLoadStore.cpp +++ b/Core/MIPS/ARM64/Arm64CompLoadStore.cpp @@ -64,8 +64,7 @@ #define CONDITIONAL_DISABLE ; #define DISABLE { Comp_Generic(op); return; } -namespace MIPSComp -{ +namespace MIPSComp { using namespace Arm64Gen; using namespace Arm64JitConstants; diff --git a/Core/MIPS/ARM64/Arm64CompVFPU.cpp b/Core/MIPS/ARM64/Arm64CompVFPU.cpp index d07a2fd03c..a231abf004 100644 --- a/Core/MIPS/ARM64/Arm64CompVFPU.cpp +++ b/Core/MIPS/ARM64/Arm64CompVFPU.cpp @@ -35,9 +35,9 @@ // Currently known non working ones should have DISABLE. // #define CONDITIONAL_DISABLE { fpr.ReleaseSpillLocksAndDiscardTemps(); Comp_Generic(op); return; } - #define CONDITIONAL_DISABLE ; #define DISABLE { fpr.ReleaseSpillLocksAndDiscardTemps(); Comp_Generic(op); return; } + #define _RS MIPS_GET_RS(op) #define _RT MIPS_GET_RT(op) #define _RD MIPS_GET_RD(op) @@ -50,8 +50,7 @@ #define _IMM16 (signed short)(op & 0xFFFF) #define _IMM26 (op & 0x03FFFFFF) -namespace MIPSComp -{ +namespace MIPSComp { using namespace Arm64Gen; using namespace Arm64JitConstants; diff --git a/Core/MIPS/ARM64/Arm64RegCache.cpp b/Core/MIPS/ARM64/Arm64RegCache.cpp index 925d5a9425..f0216c91e3 100644 --- a/Core/MIPS/ARM64/Arm64RegCache.cpp +++ b/Core/MIPS/ARM64/Arm64RegCache.cpp @@ -125,6 +125,7 @@ void Arm64RegCache::MapRegTo(ARM64Reg reg, MIPSGPReg mipsReg, int mapFlags) { } else { if (mipsReg == MIPS_REG_ZERO) { // This way, if we SetImm() it, we'll keep it. + // TODO: Actually, this may cause trouble with SetRegImm? The reg is NOT zero. mr[mipsReg].loc = ML_ARMREG_IMM; mr[mipsReg].imm = 0; } else { diff --git a/Core/MIPS/x86/CompALU.cpp b/Core/MIPS/x86/CompALU.cpp index 5303325967..e45622d048 100644 --- a/Core/MIPS/x86/CompALU.cpp +++ b/Core/MIPS/x86/CompALU.cpp @@ -37,7 +37,7 @@ using namespace MIPSAnalyst; // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -//#define CONDITIONAL_DISABLE { Comp_Generic(op); return; } +// #define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; #define DISABLE { Comp_Generic(op); return; }