aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-02-10 22:05:51 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-02-10 22:05:51 +0000
commit9df217a31741e21eb63a5e3ee8529391ba3762e3 (patch)
tree53332ef1b810f1093cbf300381457fc6cdde97b5 /cpu-exec.c
parent92a31b1fff09bed823865262d4b3c8e7b246c812 (diff)
kqemu support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1283 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index ff548af7af..4adfb81aa1 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -209,7 +209,33 @@ int cpu_exec(CPUState *env1)
#endif
}
env->exception_index = -1;
+ }
+#ifdef USE_KQEMU
+ if (kqemu_is_ok(env) && env->interrupt_request == 0) {
+ int ret;
+ env->eflags = env->eflags | cc_table[CC_OP].compute_all() | (DF & DF_MASK);
+ ret = kqemu_cpu_exec(env);
+ /* put eflags in CPU temporary format */
+ CC_SRC = env->eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
+ DF = 1 - (2 * ((env->eflags >> 10) & 1));
+ CC_OP = CC_OP_EFLAGS;
+ env->eflags &= ~(DF_MASK | CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
+ if (ret == 1) {
+ /* exception */
+ longjmp(env->jmp_env, 1);
+ } else if (ret == 2) {
+ /* softmmu execution needed */
+ } else {
+ if (env->interrupt_request != 0) {
+ /* hardware interrupt will be executed just after */
+ } else {
+ /* otherwise, we restart */
+ longjmp(env->jmp_env, 1);
+ }
+ }
}
+#endif
+
T0 = 0; /* force lookup of first TB */
for(;;) {
#ifdef __sparc__