mirror of
https://github.com/mii443/qemu.git
synced 2025-12-07 13:08:31 +00:00
target-or32: Add interrupt support
Add OpenRISC interrupt support. Signed-off-by: Jia Liu <proljc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
17
cpu-exec.c
17
cpu-exec.c
@@ -388,6 +388,23 @@ int cpu_exec(CPUArchState *env)
|
||||
do_interrupt(env);
|
||||
next_tb = 0;
|
||||
}
|
||||
#elif defined(TARGET_OPENRISC)
|
||||
{
|
||||
int idx = -1;
|
||||
if ((interrupt_request & CPU_INTERRUPT_HARD)
|
||||
&& (env->sr & SR_IEE)) {
|
||||
idx = EXCP_INT;
|
||||
}
|
||||
if ((interrupt_request & CPU_INTERRUPT_TIMER)
|
||||
&& (env->sr & SR_TEE)) {
|
||||
idx = EXCP_TICK;
|
||||
}
|
||||
if (idx >= 0) {
|
||||
env->exception_index = idx;
|
||||
do_interrupt(env);
|
||||
next_tb = 0;
|
||||
}
|
||||
}
|
||||
#elif defined(TARGET_SPARC)
|
||||
if (interrupt_request & CPU_INTERRUPT_HARD) {
|
||||
if (cpu_interrupts_enabled(env) &&
|
||||
|
||||
Reference in New Issue
Block a user