mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
PowerPC: Parametrize MMCR1 macro.
This commit is contained in:
parent
126590c4cd
commit
8bab3ac755
@ -534,7 +534,7 @@ bool Jit64::Cleanup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SPEED HACK: MMCR0/MMCR1 should be checked at run-time, not at compile time.
|
// SPEED HACK: MMCR0/MMCR1 should be checked at run-time, not at compile time.
|
||||||
if (MMCR0(PowerPC::ppcState).Hex || MMCR1.Hex)
|
if (MMCR0(PowerPC::ppcState).Hex || MMCR1(PowerPC::ppcState).Hex)
|
||||||
{
|
{
|
||||||
ABI_PushRegistersAndAdjustStack({}, 0);
|
ABI_PushRegistersAndAdjustStack({}, 0);
|
||||||
ABI_CallFunctionCCC(PowerPC::UpdatePerformanceMonitor, js.downcountAmount, js.numLoadStoreInst,
|
ABI_CallFunctionCCC(PowerPC::UpdatePerformanceMonitor, js.downcountAmount, js.numLoadStoreInst,
|
||||||
|
@ -288,7 +288,7 @@ void JitArm64::Cleanup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SPEED HACK: MMCR0/MMCR1 should be checked at run-time, not at compile time.
|
// SPEED HACK: MMCR0/MMCR1 should be checked at run-time, not at compile time.
|
||||||
if (MMCR0(PowerPC::ppcState).Hex || MMCR1.Hex)
|
if (MMCR0(PowerPC::ppcState).Hex || MMCR1(PowerPC::ppcState).Hex)
|
||||||
{
|
{
|
||||||
MOVP2R(ARM64Reg::X8, &PowerPC::UpdatePerformanceMonitor);
|
MOVP2R(ARM64Reg::X8, &PowerPC::UpdatePerformanceMonitor);
|
||||||
MOVI2R(ARM64Reg::X0, js.downcountAmount);
|
MOVI2R(ARM64Reg::X0, js.downcountAmount);
|
||||||
|
@ -430,7 +430,7 @@ void UpdatePerformanceMonitor(u32 cycles, u32 num_load_stores, u32 num_fp_inst)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (MMCR1.PMC3SELECT)
|
switch (MMCR1(PowerPC::ppcState).PMC3SELECT)
|
||||||
{
|
{
|
||||||
case 0: // No change
|
case 0: // No change
|
||||||
break;
|
break;
|
||||||
@ -444,7 +444,7 @@ void UpdatePerformanceMonitor(u32 cycles, u32 num_load_stores, u32 num_fp_inst)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (MMCR1.PMC4SELECT)
|
switch (MMCR1(PowerPC::ppcState).PMC4SELECT)
|
||||||
{
|
{
|
||||||
case 0: // No change
|
case 0: // No change
|
||||||
break;
|
break;
|
||||||
|
@ -241,7 +241,7 @@ void UpdatePerformanceMonitor(u32 cycles, u32 num_load_stores, u32 num_fp_inst);
|
|||||||
#define DMAU(ppc_state) (*(UReg_DMAU*)&(ppc_state).spr[SPR_DMAU])
|
#define DMAU(ppc_state) (*(UReg_DMAU*)&(ppc_state).spr[SPR_DMAU])
|
||||||
#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 ((UReg_MMCR1&)PowerPC::ppcState.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 ((UReg_THRM12&)PowerPC::ppcState.spr[SPR_THRM1])
|
||||||
#define THRM2 ((UReg_THRM12&)PowerPC::ppcState.spr[SPR_THRM2])
|
#define THRM2 ((UReg_THRM12&)PowerPC::ppcState.spr[SPR_THRM2])
|
||||||
#define THRM3 ((UReg_THRM3&)PowerPC::ppcState.spr[SPR_THRM3])
|
#define THRM3 ((UReg_THRM3&)PowerPC::ppcState.spr[SPR_THRM3])
|
||||||
|
Loading…
Reference in New Issue
Block a user