Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,15 @@ void run_machine(std::string machine_str, char* rom_data,
// Log the PC and instruction every second to make it easier to validate
// that execution is the same every time.
deterministic_timer = TimerManager::get_instance()->add_cyclic_timer(MSECS_TO_NSECS(1000), [] {
// We may be running after an exceptions or RFI changed the address
// translation context. In those cases the PC address cannot be
// translated (it would either be stale or invalid).
if (exec_flags & (EXEF_EXCEPTION | EXEF_RFI)) {
LOG_F(INFO, "TS=%016llu PC=0x%08x transition pending to PC=0x%08x",
get_virt_time_ns(), ppc_state.pc, ppc_next_instruction_address);
return;
}

PPCDisasmContext ctx;
ctx.instr_code = ppc_read_instruction(mmu_translate_imem(ppc_state.pc));
ctx.instr_addr = ppc_state.pc;
Expand Down
Loading