summaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-05-21 12:59:32 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-05-21 12:59:32 +0000
commit9fddaa0c0cabb610947146a79b4a9a38b0a216e5 (patch)
tree0fdea73fdd2dab9437c23efa4ffbc3e22e2be036 /cpu-exec.c
parent4a0fb71e67df4774d79eb788f0d1bd7a78801e6d (diff)
downloadqemu-9fddaa0c0cabb610947146a79b4a9a38b0a216e5.tar.gz
PowerPC merge: real time TB and decrementer - faster and simpler exception handling (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@841 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index 12e848b134..58468859dc 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -241,11 +241,25 @@ int cpu_exec(CPUState *env1)
#endif
}
#elif defined(TARGET_PPC)
+#if 0
+ if ((interrupt_request & CPU_INTERRUPT_RESET)) {
+ cpu_ppc_reset(env);
+ }
+#endif
+ if (msr_ee != 0) {
if ((interrupt_request & CPU_INTERRUPT_HARD)) {
- do_queue_exception(EXCP_EXTERNAL);
- if (check_exception_state(env))
+ /* Raise it */
+ env->exception_index = EXCP_EXTERNAL;
+ env->error_code = 0;
do_interrupt(env);
env->interrupt_request &= ~CPU_INTERRUPT_HARD;
+ } else if ((interrupt_request & CPU_INTERRUPT_TIMER)) {
+ /* Raise it */
+ env->exception_index = EXCP_DECR;
+ env->error_code = 0;
+ do_interrupt(env);
+ env->interrupt_request &= ~CPU_INTERRUPT_TIMER;
+ }
}
#endif
if (interrupt_request & CPU_INTERRUPT_EXITTB) {
@@ -757,7 +771,7 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address,
/* we restore the process signal mask as the sigreturn should
do it (XXX: use sigsetjmp) */
sigprocmask(SIG_SETMASK, old_set, NULL);
- do_queue_exception_err(env->exception_index, env->error_code);
+ do_raise_exception_err(env->exception_index, env->error_code);
} else {
/* activate soft MMU for this block */
cpu_resume_from_signal(env, puc);