summaryrefslogtreecommitdiff
path: root/linux-user
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 /linux-user
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 'linux-user')
-rw-r--r--linux-user/main.c50
1 files changed, 44 insertions, 6 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index c0759bfefc..2275b01f97 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -504,6 +504,49 @@ void cpu_loop (CPUSPARCState *env)
#endif
#ifdef TARGET_PPC
+
+static inline uint64_t cpu_ppc_get_tb (CPUState *env)
+{
+ /* TO FIX */
+ return 0;
+}
+
+uint32_t cpu_ppc_load_tbl (CPUState *env)
+{
+ return cpu_ppc_get_tb(env) & 0xFFFFFFFF;
+}
+
+uint32_t cpu_ppc_load_tbu (CPUState *env)
+{
+ return cpu_ppc_get_tb(env) >> 32;
+}
+
+static void cpu_ppc_store_tb (CPUState *env, uint64_t value)
+{
+ /* TO FIX */
+}
+
+void cpu_ppc_store_tbu (CPUState *env, uint32_t value)
+{
+ cpu_ppc_store_tb(env, ((uint64_t)value << 32) | cpu_ppc_load_tbl(env));
+}
+
+void cpu_ppc_store_tbl (CPUState *env, uint32_t value)
+{
+ cpu_ppc_store_tb(env, ((uint64_t)cpu_ppc_load_tbl(env) << 32) | value);
+}
+
+uint32_t cpu_ppc_load_decr (CPUState *env)
+{
+ /* TO FIX */
+ return -1;
+}
+
+void cpu_ppc_store_decr (CPUState *env, uint32_t value)
+{
+ /* TO FIX */
+}
+
void cpu_loop(CPUPPCState *env)
{
target_siginfo_t info;
@@ -812,7 +855,7 @@ void cpu_loop(CPUPPCState *env)
abort();
case EXCP_MTMSR:
/* We reloaded the msr, just go on */
- if (msr_pr) {
+ if (msr_pr == 0) {
fprintf(stderr, "Tried to go into supervisor mode !\n");
if (loglevel)
fprintf(logfile, "Tried to go into supervisor mode !\n");
@@ -842,12 +885,7 @@ void cpu_loop(CPUPPCState *env)
}
abort();
}
- if (trapnr < EXCP_PPC_MAX)
- env->exceptions &= ~(1 << trapnr);
process_pending_signals(env);
- if (env->exceptions != 0) {
- check_exception_state(env);
- }
}
}
#endif