PowerPC: Parametrize DMAU macro.

This commit is contained in:
Admiral H. Curtiss 2023-01-09 20:55:02 +01:00
parent 31483e492e
commit 2374365274
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
2 changed files with 3 additions and 3 deletions

View File

@ -392,9 +392,9 @@ void Interpreter::mtspr(UGeckoInstruction inst)
// Total fake, we ignore that DMAs take time. // Total fake, we ignore that DMAs take time.
if (DMAL.DMA_T) if (DMAL.DMA_T)
{ {
const u32 mem_address = DMAU.MEM_ADDR << 5; const u32 mem_address = DMAU(PowerPC::ppcState).MEM_ADDR << 5;
const u32 cache_address = DMAL.LC_ADDR << 5; const u32 cache_address = DMAL.LC_ADDR << 5;
u32 length = ((DMAU.DMA_LEN_U << 2) | DMAL.DMA_LEN_L); u32 length = ((DMAU(PowerPC::ppcState).DMA_LEN_U << 2) | DMAL.DMA_LEN_L);
if (length == 0) if (length == 0)
length = 128; length = 128;

View File

@ -238,7 +238,7 @@ void UpdatePerformanceMonitor(u32 cycles, u32 num_load_stores, u32 num_fp_inst);
#define HID0(ppc_state) ((UReg_HID0&)(ppc_state).spr[SPR_HID0]) #define HID0(ppc_state) ((UReg_HID0&)(ppc_state).spr[SPR_HID0])
#define HID2(ppc_state) ((UReg_HID2&)(ppc_state).spr[SPR_HID2]) #define HID2(ppc_state) ((UReg_HID2&)(ppc_state).spr[SPR_HID2])
#define HID4(ppc_state) ((UReg_HID4&)(ppc_state).spr[SPR_HID4]) #define HID4(ppc_state) ((UReg_HID4&)(ppc_state).spr[SPR_HID4])
#define DMAU (*(UReg_DMAU*)&PowerPC::ppcState.spr[SPR_DMAU]) #define DMAU(ppc_state) (*(UReg_DMAU*)&(ppc_state).spr[SPR_DMAU])
#define DMAL (*(UReg_DMAL*)&PowerPC::ppcState.spr[SPR_DMAL]) #define DMAL (*(UReg_DMAL*)&PowerPC::ppcState.spr[SPR_DMAL])
#define MMCR0 ((UReg_MMCR0&)PowerPC::ppcState.spr[SPR_MMCR0]) #define MMCR0 ((UReg_MMCR0&)PowerPC::ppcState.spr[SPR_MMCR0])
#define MMCR1 ((UReg_MMCR1&)PowerPC::ppcState.spr[SPR_MMCR1]) #define MMCR1 ((UReg_MMCR1&)PowerPC::ppcState.spr[SPR_MMCR1])