uae_s32 pissoff = 0;
/* Opcode of faulting instruction */
-static uae_u16 last_op_for_exception_3;
+static uae_u32 last_op_for_exception_3;
/* PC at fault time */
static uaecptr last_addr_for_exception_3;
/* Address that generated the exception */
cpu_halt (CPU_HALT_DOUBLE_FAULT);
return;
}
- write_log(_T("Exception %d (%04x %x) at %x -> %x!\n"),
+ write_log(_T("Exception %d (%08x %x) at %x -> %x!\n"),
nr, last_op_for_exception_3, last_addr_for_exception_3, currpc, get_long_debug(4 * nr));
if (currprefs.cpu_model == 68000) {
uae_u16 mode = (sv ? 4 : 0) | (last_instructionaccess_for_exception_3 ? 2 : 1);
mode |= last_notinstruction_for_exception_3 ? 8 : 0;
// undocumented bits seem to contain opcode
mode |= last_op_for_exception_3 & ~31;
+ uae_u16 statusormask = (last_op_for_exception_3 >> 16) & 0xff;
+ uae_u16 statusandmask = (last_op_for_exception_3 >> 24) & 0xff;
+ mode |= statusormask;
+ mode &= ~statusandmask;
m68k_areg(regs, 7) -= 14;
exception_in_exception = -1;
x_put_word(m68k_areg(regs, 7) + 12, last_addr_for_exception_3);
uae_u16 mode = (sv ? 4 : 0) | (last_instructionaccess_for_exception_3 ? 2 : 1);
mode |= last_writeaccess_for_exception_3 ? 0 : 16;
mode |= last_notinstruction_for_exception_3 ? 8 : 0;
+ uae_u16 statusormask = (last_op_for_exception_3 >> 16) & 0xff;
+ uae_u16 statusandmask = (last_op_for_exception_3 >> 24) & 0xff;
+ mode |= statusormask;
+ mode &= ~statusandmask;
exception_in_exception = -1;
Exception_build_68000_address_error_stack_frame(mode, last_op_for_exception_3, last_fault_for_exception_3, last_addr_for_exception_3);
write_log (_T("Exception %d (%x) at %x -> %x!\n"), nr, last_fault_for_exception_3, currpc, get_long_debug (regs.vbr + 4 * vector_nr));