MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / ExceptionX

Function ExceptionX

src/newcpu.cpp:3462–3510  ·  view source on GitHub ↗

address = format $2 stack frame address field

Source from the content-addressed store, hash-verified

3460
3461// address = format $2 stack frame address field
3462static void ExceptionX (int nr, uaecptr address, uaecptr oldpc)
3463{
3464 uaecptr pc = m68k_getpc();
3465 regs.exception = nr;
3466 regs.loop_mode = 0;
3467
3468#ifdef DEBUGGER
3469 if (debug_dma) {
3470 record_dma_event_data(DMA_EVENT_CPUINS, 0x20000);
3471 }
3472#endif
3473 if (cpu_tracer) {
3474 cputrace.state = nr;
3475 }
3476 if (!regs.s) {
3477 regs.instruction_pc_user_exception = pc;
3478 }
3479 if (oldpc != 0xffffffff) {
3480 regs.instruction_pc = oldpc;
3481 }
3482#ifdef DEBUGGER
3483 debug_exception(nr);
3484#endif
3485 m68k_resumestopped();
3486
3487#ifdef CPUEMU_13
3488 if (currprefs.cpu_cycle_exact && currprefs.cpu_model <= 68010)
3489 Exception_ce000 (nr);
3490 else
3491#endif
3492 {
3493 if (currprefs.cpu_model == 68060) {
3494 regs.buscr &= 0xa0000000;
3495 regs.buscr |= regs.buscr >> 1;
3496 }
3497 if (currprefs.mmu_model) {
3498 if (currprefs.cpu_model == 68030)
3499 Exception_mmu030(nr, m68k_getpc());
3500 else
3501 Exception_mmu(nr, m68k_getpc());
3502 } else {
3503 Exception_normal(nr);
3504 }
3505 }
3506 regs.exception = 0;
3507 if (cpu_tracer) {
3508 cputrace.state = 0;
3509 }
3510}
3511
3512void REGPARAM2 Exception_cpu_oldpc(int nr, uaecptr oldpc)
3513{

Callers 3

Exception_cpu_oldpcFunction · 0.85
ExceptionFunction · 0.85
ExceptionLFunction · 0.85

Calls 8

m68k_getpcFunction · 0.85
record_dma_event_dataFunction · 0.85
debug_exceptionFunction · 0.85
m68k_resumestoppedFunction · 0.85
Exception_ce000Function · 0.85
Exception_mmu030Function · 0.85
Exception_mmuFunction · 0.85
Exception_normalFunction · 0.85

Tested by

no test coverage detected