struct frv_interrupt_queue_element * frv_queue_non_implemented_instruction_interrupt ( SIM_CPU *current_cpu, const CGEN_INSN *insn ) { SIM_DESC sd = CPU_STATE (current_cpu); switch (STATE_ARCHITECTURE (sd)->mach) { case bfd_mach_fr400: case bfd_mach_fr450: case bfd_mach_fr550: break; default: /* Some machines generate fp_exception or mp_exception for this case. */ if (frv_is_float_insn (insn)) { struct frv_fp_exception_info fp_info = { FSR_NO_EXCEPTION, FTT_UNIMPLEMENTED_FPOP }; return frv_queue_fp_exception_interrupt (current_cpu, & fp_info); } if (frv_is_media_insn (insn)) { frv_set_mp_exception_registers (current_cpu, MTT_UNIMPLEMENTED_MPOP, 0); return NULL; /* no interrupt queued at this time. */ } break; } return frv_queue_program_interrupt (current_cpu, FRV_ILLEGAL_INSTRUCTION); }
/* Record state for media exception: media_register_not_aligned. */ void frvbf_media_register_not_aligned (SIM_CPU *current_cpu) { SIM_DESC sd = CPU_STATE (current_cpu); /* On some machines this generates an illegal_instruction interrupt. */ switch (STATE_ARCHITECTURE (sd)->mach) { /* See comment in frvbf_cr_not_aligned(). */ case bfd_mach_fr400: case bfd_mach_fr450: case bfd_mach_fr550: frv_queue_program_interrupt (current_cpu, FRV_ILLEGAL_INSTRUCTION); break; default: frv_set_mp_exception_registers (current_cpu, MTT_INVALID_FR, 0); break; } }
/* Record state for media exception: media_cr_not_aligned. */ void frvbf_media_cr_not_aligned (SIM_CPU *current_cpu) { SIM_DESC sd = CPU_STATE (current_cpu); /* On some machines this generates an illegal_instruction interrupt. */ switch (STATE_ARCHITECTURE (sd)->mach) { /* Note: there is a discrepancy between V2.2 of the FR400 instruction manual and the various FR4xx LSI specs. The former claims that unaligned registers cause an mp_exception while the latter say it's an illegal_instruction. The LSI specs appear to be correct since MTT is fixed at 1. */ case bfd_mach_fr400: case bfd_mach_fr450: case bfd_mach_fr550: frv_queue_program_interrupt (current_cpu, FRV_ILLEGAL_INSTRUCTION); break; default: frv_set_mp_exception_registers (current_cpu, MTT_CR_NOT_ALIGNED, 0); break; } }
/* Record state for media exception: media_overflow. */ void frvbf_media_overflow (SIM_CPU *current_cpu, int sie) { frv_set_mp_exception_registers (current_cpu, MTT_OVERFLOW, sie); }