PowerPC: Parametrize HID0 macro.
This commit is contained in:
6 files changed
+31
-26
No files matched your search
@@ -503,7 +503,7 @@ void Interpreter::dcbz(UGeckoInstruction inst)
|
||||
{
|
||||
const u32 dcbz_addr = Helper_Get_EA_X(PowerPC::ppcState, inst);
|
||||
|
||||
if (!HID0.DCE)
|
||||
if (!HID0(PowerPC::ppcState).DCE)
|
||||
{
|
||||
GenerateAlignmentException(dcbz_addr);
|
||||
return;
|
||||
@@ -533,7 +533,7 @@ void Interpreter::dcbz_l(UGeckoInstruction inst)
|
||||
|
||||
const u32 address = Helper_Get_EA_X(PowerPC::ppcState, inst);
|
||||
|
||||
if (!HID0.DCE)
|
||||
if (!HID0(PowerPC::ppcState).DCE)
|
||||
{
|
||||
GenerateAlignmentException(address);
|
||||
return;
|
||||
|
||||
@@ -325,18 +325,20 @@ void Interpreter::mtspr(UGeckoInstruction inst)
|
||||
{
|
||||
UReg_HID0 old_hid0;
|
||||
old_hid0.Hex = old_value;
|
||||
if (HID0.ICE != old_hid0.ICE)
|
||||
if (HID0(PowerPC::ppcState).ICE != old_hid0.ICE)
|
||||
{
|
||||
INFO_LOG_FMT(POWERPC, "Instruction Cache Enable (HID0.ICE) = {}", HID0.ICE);
|
||||
INFO_LOG_FMT(POWERPC, "Instruction Cache Enable (HID0.ICE) = {}",
|
||||
HID0(PowerPC::ppcState).ICE);
|
||||
}
|
||||
if (HID0.ILOCK != old_hid0.ILOCK)
|
||||
if (HID0(PowerPC::ppcState).ILOCK != old_hid0.ILOCK)
|
||||
{
|
||||
INFO_LOG_FMT(POWERPC, "Instruction Cache Lock (HID0.ILOCK) = {}", HID0.ILOCK);
|
||||
INFO_LOG_FMT(POWERPC, "Instruction Cache Lock (HID0.ILOCK) = {}",
|
||||
HID0(PowerPC::ppcState).ILOCK);
|
||||
}
|
||||
if (HID0.ICFI)
|
||||
if (HID0(PowerPC::ppcState).ICFI)
|
||||
{
|
||||
HID0.ICFI = 0;
|
||||
INFO_LOG_FMT(POWERPC, "Flush Instruction Cache! ICE={}", HID0.ICE);
|
||||
HID0(PowerPC::ppcState).ICFI = 0;
|
||||
INFO_LOG_FMT(POWERPC, "Flush Instruction Cache! ICE={}", HID0(PowerPC::ppcState).ICE);
|
||||
// this is rather slow
|
||||
// most games do it only once during initialization
|
||||
PowerPC::ppcState.iCache.Reset();
|
||||
|
||||
Reference in new issue
Block a user