instruction_error_t SIM_instruction_handle_interrupt(conf_object_t *cpu, exception_type_t vector);
To handle the interrupt SIM_instruction_handle_interrupt should be called with the CPU and the trap vector as arguments. The effect of this call is to set the program counter to the first instruction in the corresponding trap handler and to update other architectural state that are affected when an interrupt occurs.
Currently the instruction tree needs to be empty when an interrupt is handled. This is achieved either by squashing all instructions or letting all of them commit before SIM_instruction_handle_interrupt is called.
Interrupts may be disabled (by software or hardware) after the hap triggers but before SIM_instruction_handle_interrupt is called, if this is the case Sim_IE_Interrupts_Disabled will be returned. The interrupts should then be handled as soon as the interrupts are enabled again.