mirror of
https://github.com/holub/mame
synced 2025-04-25 01:40:16 +03:00
ppcdrc.cpp: clear two LSBs of the branch target address.
This is what a real CPU does in order to prevent branching to an invalid address.
This commit is contained in:
parent
0cbc070ce4
commit
619e737610
@ -1942,8 +1942,11 @@ void ppc_device::generate_branch(drcuml_block *block, compiler_state *compiler,
|
||||
}
|
||||
else
|
||||
{
|
||||
generate_update_cycles(block, &compiler_temp, mem(srcptr), true); // <subtract cycles>
|
||||
UML_HASHJMP(block, m_core->mode, mem(srcptr), *m_nocode); // hashjmp <mode>,<rsreg>,nocode
|
||||
generate_update_cycles(block, &compiler_temp, mem(srcptr), true); // <subtract cycles>
|
||||
|
||||
/* clear two LSBs of the target address to prevent branching to an invalid address */
|
||||
UML_AND(block, I0, mem(srcptr), 0xFFFFFFFC); // and i0, 0xFFFFFFFC
|
||||
UML_HASHJMP(block, m_core->mode, I0, *m_nocode); // hashjmp <mode>,i0,nocode
|
||||
}
|
||||
|
||||
/* update the label */
|
||||
|
Loading…
Reference in New Issue
Block a user