diff options
| author | Richard Henderson <rth@twiddle.net> | 2014-09-13 09:45:31 -0700 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2014-09-25 18:54:22 +0100 |
| commit | e9854c39452b293f883c2e9e1d30c9930b5a2c49 (patch) | |
| tree | b7ff643e3b0d6f8e4f7d9aa423a4060dff7ecdc4 /target-lm32/helper.c | |
| parent | 29cd33d3c71afca157fed001d0cb3b5fe28bf632 (diff) | |
| download | focaccia-qemu-e9854c39452b293f883c2e9e1d30c9930b5a2c49.tar.gz focaccia-qemu-e9854c39452b293f883c2e9e1d30c9930b5a2c49.zip | |
target-lm32: Use cpu_exec_interrupt qom hook
Cc: Michael Walle <michael@walle.cc> Signed-off-by: Richard Henderson <rth@twiddle.net> Acked-by: Michael Walle <michael@walle.cc> Message-id: 1410626734-3804-21-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to '')
| -rw-r--r-- | target-lm32/helper.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/target-lm32/helper.c b/target-lm32/helper.c index ad724aecbc..7a41f29730 100644 --- a/target-lm32/helper.c +++ b/target-lm32/helper.c @@ -202,6 +202,19 @@ void lm32_cpu_do_interrupt(CPUState *cs) } } +bool lm32_cpu_exec_interrupt(CPUState *cs, int interrupt_request) +{ + LM32CPU *cpu = LM32_CPU(cs); + CPULM32State *env = &cpu->env; + + if ((interrupt_request & CPU_INTERRUPT_HARD) && (env->ie & IE_IE)) { + cs->exception_index = EXCP_IRQ; + lm32_cpu_do_interrupt(cs); + return true; + } + return false; +} + LM32CPU *cpu_lm32_init(const char *cpu_model) { return LM32_CPU(cpu_generic_init(TYPE_LM32_CPU, cpu_model)); |