mirror of
https://github.com/holub/mame
synced 2025-10-07 01:16:22 +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;
|
m_cpr[0][COP0_EPC] -= 4;
|
||||||
CAUSE |= 0x80000000;
|
CAUSE |= 0x80000000;
|
||||||
}
|
}
|
||||||
m_branch_state = NONE;
|
m_branch_state = EXCEPTION;
|
||||||
|
|
||||||
// shift the exception bits
|
// shift the exception bits
|
||||||
SR = (SR & 0xffffffc0) | ((SR << 2) & 0x3c);
|
SR = (SR & 0xffffffc0) | ((SR << 2) & 0x3c);
|
||||||
@ -789,6 +789,10 @@ void mips1core_device_base::execute_run()
|
|||||||
m_branch_state = DELAY;
|
m_branch_state = DELAY;
|
||||||
m_pc += 4;
|
m_pc += 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EXCEPTION:
|
||||||
|
m_branch_state = NONE;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
m_icount--;
|
m_icount--;
|
||||||
|
@ -225,9 +225,10 @@ protected:
|
|||||||
int m_icount;
|
int m_icount;
|
||||||
enum branch_state_t : unsigned
|
enum branch_state_t : unsigned
|
||||||
{
|
{
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
DELAY = 1, // delay slot instruction active
|
DELAY = 1, // delay slot instruction active
|
||||||
BRANCH = 2, // branch instruction active
|
BRANCH = 2, // branch instruction active
|
||||||
|
EXCEPTION = 3, // exception triggered
|
||||||
}
|
}
|
||||||
m_branch_state;
|
m_branch_state;
|
||||||
u32 m_branch_target;
|
u32 m_branch_target;
|
||||||
|
Loading…
Reference in New Issue
Block a user