[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/26] target-alpha: Use kernel mmu_idx for pal_mode
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 15/26] target-alpha: Use kernel mmu_idx for pal_mode. |
Date: |
Mon, 23 May 2011 13:28:35 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
target-alpha/cpu.h | 8 +++++++-
target-alpha/translate.c | 6 ++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h
index 4407b32..a59b39a 100644
--- a/target-alpha/cpu.h
+++ b/target-alpha/cpu.h
@@ -341,7 +341,13 @@ enum {
static inline int cpu_mmu_index(CPUState *env)
{
- return (env->ps & PS_USER_MODE) != 0;
+ if (env->pal_mode) {
+ return MMU_KERNEL_IDX;
+ } else if (env->ps & PS_USER_MODE) {
+ return MMU_USER_IDX;
+ } else {
+ return MMU_KERNEL_IDX;
+ }
}
enum {
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 2f3c637..a937356 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -3098,10 +3098,8 @@ static inline void
gen_intermediate_code_internal(CPUState *env,
ctx.env = env;
ctx.pc = pc_start;
ctx.amask = env->amask;
-#if defined (CONFIG_USER_ONLY)
- ctx.mem_idx = 0;
-#else
- ctx.mem_idx = ((env->ps >> 3) & 3);
+ ctx.mem_idx = cpu_mmu_index(env);
+#if !defined (CONFIG_USER_ONLY)
ctx.pal_mode = env->pal_mode;
#endif
--
1.7.4.4
- [Qemu-devel] [PATCH 02/26] target-alpha: Disassemble EV6 PALcode instructions., (continued)
- [Qemu-devel] [PATCH 02/26] target-alpha: Disassemble EV6 PALcode instructions., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 03/26] target-alpha: Single-step properly across branches., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 04/26] target-alpha: Remove partial support for palcode emulation., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 06/26] target-alpha: Fix system store_conditional, Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 08/26] target-alpha: Merge HW_REI and HW_RET implementations., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 07/26] target-alpha: Cleanup MMU modes., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 05/26] target-alpha: Fix translation of PALmode memory insns., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 09/26] target-alpha: Rationalize internal processor registers., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 12/26] target-alpha: Tidy up arithmetic exceptions., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 13/26] target-alpha: Use do_restore_state for arithmetic exceptions., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 15/26] target-alpha: Use kernel mmu_idx for pal_mode.,
Richard Henderson <=
- [Qemu-devel] [PATCH 14/26] target-alpha: Add various symbolic constants., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 10/26] target-alpha: Enable the alpha-softmmu target., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 16/26] target-alpha: Add IPRs to be used by the emulation PALcode., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 17/26] target-alpha: Implement do_interrupt for system mode., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 11/26] target-alpha: Tidy exception constants., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 18/26] target-alpha: Swap shadow registers moving to/from PALmode., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 20/26] target-alpha: Disable interrupts properly., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 19/26] target-alpha: All ISA checks to use TB->FLAGS., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 21/26] target-alpha: Implement more CALL_PAL values inline., Richard Henderson, 2011/05/23
- [Qemu-devel] [PATCH 22/26] target-alpha: Implement cpu_alpha_handle_mmu_fault for system mode., Richard Henderson, 2011/05/23