Recalculate execution block after RFI.

While booting Mac OS X 10.2 installer CD, a return from RFI didn't change the instruction address virtual memory page but did change the physical memory page so we must always recalculate the physical address after RFI.
Perhaps there are other cases where this may be required?
This commit is contained in:
joevt 2023-09-05 03:21:14 -07:00 committed by Maxim Poliakovski
parent dcd4384d46
commit acdb14a10a
1 changed files with 3 additions and 3 deletions

View File

@ -364,7 +364,7 @@ static void ppc_exec_inner()
}
// define next execution block
eb_start = ppc_next_instruction_address;
if ((eb_start & PAGE_MASK) == page_start) {
if (!(exec_flags & EXEF_RFI) && (eb_start & PAGE_MASK) == page_start) {
pc_real += (int)eb_start - (int)ppc_state.pc;
ppc_set_cur_instruction(pc_real);
} else {
@ -467,7 +467,7 @@ static void ppc_exec_until_inner(const uint32_t goal_addr)
}
// define next execution block
eb_start = ppc_next_instruction_address;
if ((eb_start & PAGE_MASK) == page_start) {
if (!(exec_flags & EXEF_RFI) && (eb_start & PAGE_MASK) == page_start) {
pc_real += (int)eb_start - (int)ppc_state.pc;
ppc_set_cur_instruction(pc_real);
} else {
@ -543,7 +543,7 @@ static void ppc_exec_dbg_inner(const uint32_t start_addr, const uint32_t size)
}
// define next execution block
eb_start = ppc_next_instruction_address;
if ((eb_start & PAGE_MASK) == page_start) {
if (!(exec_flags & EXEF_RFI) && (eb_start & PAGE_MASK) == page_start) {
pc_real += (int)eb_start - (int)ppc_state.pc;
ppc_set_cur_instruction(pc_real);
} else {