diff options
Diffstat (limited to 'target-sparc')
-rw-r--r-- | target-sparc/op_helper.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index c3cc0a4030..dab2c25a2b 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -3447,10 +3447,10 @@ void do_interrupt(CPUState *env) change_pstate(PS_PEF | PS_PRIV | PS_IG); break; case TT_TFAULT: - case TT_TMISS: case TT_DFAULT: - case TT_DMISS: - case TT_DPROT: + case TT_TMISS ... TT_TMISS + 3: + case TT_DMISS ... TT_DMISS + 3: + case TT_DPROT ... TT_DPROT + 3: change_pstate(PS_PEF | PS_PRIV | PS_MG); break; default: @@ -3686,21 +3686,24 @@ void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec, void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec, int is_asi, int size) { -#ifdef DEBUG_UNASSIGNED CPUState *saved_env; /* XXX: hack to restore env in all cases, even if not called from generated code */ saved_env = env; env = cpu_single_env; + +#ifdef DEBUG_UNASSIGNED printf("Unassigned mem access to " TARGET_FMT_plx " from " TARGET_FMT_lx "\n", addr, env->pc); - env = saved_env; #endif + if (is_exec) raise_exception(TT_CODE_ACCESS); else raise_exception(TT_DATA_ACCESS); + + env = saved_env; } #endif |