aboutsummaryrefslogtreecommitdiff
path: root/exec-all.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-18 22:44:01 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-18 22:44:01 +0000
commit3f5dcc340c1e4fa8a49066e30cf980bafdb3ecf4 (patch)
tree7827c0efa46e0b14889e0ad4432babb34d121c5c /exec-all.h
parentf09936ac82b3c56a0a36a533dd3f63d08e013e7d (diff)
PowerPC merge (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@565 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec-all.h')
-rw-r--r--exec-all.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/exec-all.h b/exec-all.h
index d78224a070..fa407e94a6 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -541,7 +541,13 @@ static inline target_ulong get_phys_addr_code(CPUState *env, target_ulong addr)
int is_user, index;
index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
+#if defined(TARGET_I386)
is_user = ((env->hflags & HF_CPL_MASK) == 3);
+#elif defined (TARGET_PPC)
+ is_user = msr_pr;
+#else
+#error "Unimplemented !"
+#endif
if (__builtin_expect(env->tlb_read[is_user][index].address !=
(addr & TARGET_PAGE_MASK), 0)) {
ldub_code((void *)addr);