mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
mips1: missed this (nw)
Make sure the exception target address isn't incremented.
This commit is contained in:
parent
a7f0f6e027
commit
a3f7b2a415
@ -284,7 +284,7 @@ void mips1core_device_base::generate_exception(int exception)
|
||||
m_cpr[0][COP0_EPC] -= 4;
|
||||
CAUSE |= 0x80000000;
|
||||
}
|
||||
m_branch_state = NONE;
|
||||
m_branch_state = EXCEPTION;
|
||||
|
||||
// shift the exception bits
|
||||
SR = (SR & 0xffffffc0) | ((SR << 2) & 0x3c);
|
||||
@ -789,6 +789,10 @@ void mips1core_device_base::execute_run()
|
||||
m_branch_state = DELAY;
|
||||
m_pc += 4;
|
||||
break;
|
||||
|
||||
case EXCEPTION:
|
||||
m_branch_state = NONE;
|
||||
break;
|
||||
}
|
||||
});
|
||||
m_icount--;
|
||||
|
@ -228,6 +228,7 @@ protected:
|
||||
NONE = 0,
|
||||
DELAY = 1, // delay slot instruction active
|
||||
BRANCH = 2, // branch instruction active
|
||||
EXCEPTION = 3, // exception triggered
|
||||
}
|
||||
m_branch_state;
|
||||
u32 m_branch_target;
|
||||
|
Loading…
Reference in New Issue
Block a user