PowerPC: Parametrize THRM1/2/3 macros.
This commit is contained in:
parent
8bab3ac755
commit
82f3170876
|
@ -486,7 +486,7 @@ void Interpreter::mtspr(UGeckoInstruction inst)
|
||||||
constexpr u32 SIMULATED_TEMP = 42; // °C
|
constexpr u32 SIMULATED_TEMP = 42; // °C
|
||||||
|
|
||||||
auto UpdateThermalReg = [](UReg_THRM12* reg) {
|
auto UpdateThermalReg = [](UReg_THRM12* reg) {
|
||||||
if (!THRM3.E || !reg->V)
|
if (!THRM3(PowerPC::ppcState).E || !reg->V)
|
||||||
{
|
{
|
||||||
reg->TIV = 0;
|
reg->TIV = 0;
|
||||||
}
|
}
|
||||||
|
@ -500,8 +500,8 @@ void Interpreter::mtspr(UGeckoInstruction inst)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
UpdateThermalReg(&THRM1);
|
UpdateThermalReg(&THRM1(PowerPC::ppcState));
|
||||||
UpdateThermalReg(&THRM2);
|
UpdateThermalReg(&THRM2(PowerPC::ppcState));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,9 +242,9 @@ void UpdatePerformanceMonitor(u32 cycles, u32 num_load_stores, u32 num_fp_inst);
|
||||||
#define DMAL(ppc_state) (*(UReg_DMAL*)&(ppc_state).spr[SPR_DMAL])
|
#define DMAL(ppc_state) (*(UReg_DMAL*)&(ppc_state).spr[SPR_DMAL])
|
||||||
#define MMCR0(ppc_state) ((UReg_MMCR0&)(ppc_state).spr[SPR_MMCR0])
|
#define MMCR0(ppc_state) ((UReg_MMCR0&)(ppc_state).spr[SPR_MMCR0])
|
||||||
#define MMCR1(ppc_state) ((UReg_MMCR1&)(ppc_state).spr[SPR_MMCR1])
|
#define MMCR1(ppc_state) ((UReg_MMCR1&)(ppc_state).spr[SPR_MMCR1])
|
||||||
#define THRM1 ((UReg_THRM12&)PowerPC::ppcState.spr[SPR_THRM1])
|
#define THRM1(ppc_state) ((UReg_THRM12&)(ppc_state).spr[SPR_THRM1])
|
||||||
#define THRM2 ((UReg_THRM12&)PowerPC::ppcState.spr[SPR_THRM2])
|
#define THRM2(ppc_state) ((UReg_THRM12&)(ppc_state).spr[SPR_THRM2])
|
||||||
#define THRM3 ((UReg_THRM3&)PowerPC::ppcState.spr[SPR_THRM3])
|
#define THRM3(ppc_state) ((UReg_THRM3&)(ppc_state).spr[SPR_THRM3])
|
||||||
#define PC PowerPC::ppcState.pc
|
#define PC PowerPC::ppcState.pc
|
||||||
#define NPC PowerPC::ppcState.npc
|
#define NPC PowerPC::ppcState.npc
|
||||||
#define FPSCR PowerPC::ppcState.fpscr
|
#define FPSCR PowerPC::ppcState.fpscr
|
||||||
|
|
Loading…
Reference in New Issue