aboutsummaryrefslogtreecommitdiffstats
path: root/target-mips/exec.h
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2012-11-18 15:47:18 -0800
committerSteve Kondik <shade@chemlab.org>2012-11-18 15:47:18 -0800
commita546c7006355a7bd1df4267ee53d0bfa2c017c8c (patch)
tree01be0bf6c0d6968e1468ec9661fd52110f9b05a7 /target-mips/exec.h
parentbaf3d7830396202df5cc47bd7bcee109c319cdb3 (diff)
parent0f809250987b64f491bd3b4b73c0f0d33036a786 (diff)
downloadexternal_qemu-a546c7006355a7bd1df4267ee53d0bfa2c017c8c.zip
external_qemu-a546c7006355a7bd1df4267ee53d0bfa2c017c8c.tar.gz
external_qemu-a546c7006355a7bd1df4267ee53d0bfa2c017c8c.tar.bz2
Merge branch 'jb-mr1-release' of https://android.googlesource.com/platform/external/qemu into mr1-staging
Change-Id: I8a4a71ac65b08e6e17f26c942f67a15b85211115
Diffstat (limited to 'target-mips/exec.h')
-rw-r--r--target-mips/exec.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/target-mips/exec.h b/target-mips/exec.h
index 8a118bb..0d55790 100644
--- a/target-mips/exec.h
+++ b/target-mips/exec.h
@@ -8,7 +8,7 @@
#include "dyngen-exec.h"
#include "cpu-defs.h"
-register struct CPUMIPSState *env asm(AREG0);
+GLOBAL_REGISTER_VARIABLE_DECL struct CPUMIPSState *env asm(AREG0);
#include "cpu.h"
#include "exec-all.h"
@@ -35,10 +35,22 @@ static inline void regs_to_env(void)
static inline int cpu_has_work(CPUState *env)
{
- return (env->interrupt_request &
- (CPU_INTERRUPT_HARD | CPU_INTERRUPT_TIMER));
-}
+ int has_work = 0;
+
+ /* It is implementation dependent if non-enabled interrupts
+ wake-up the CPU, however most of the implementations only
+ check for interrupts that can be taken. */
+ if ((env->interrupt_request & CPU_INTERRUPT_HARD) &&
+ cpu_mips_hw_interrupts_pending(env)) {
+ has_work = 1;
+ }
+ if (env->interrupt_request & CPU_INTERRUPT_TIMER) {
+ has_work = 1;
+ }
+
+ return has_work;
+}
static inline int cpu_halted(CPUState *env)
{