diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-21 18:43:32 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-21 18:43:32 +0000 |
commit | 74b9decc473177f16cb84b3504ad8169f13ec147 (patch) | |
tree | 3150d9d614abfa8b58bfa5bcca1d5f58a992da0b /target-sparc/helper.c | |
parent | 8eba209e3348d7a8d7b411e03d1ffb999308bf3a (diff) |
Use MMU globals for some MMU traps
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4918 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/helper.c')
-rw-r--r-- | target-sparc/helper.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/target-sparc/helper.c b/target-sparc/helper.c index 6822f1b92f..06265dc6a4 100644 --- a/target-sparc/helper.c +++ b/target-sparc/helper.c @@ -758,9 +758,23 @@ void do_interrupt(CPUState *env) env->tsptr->tpc = env->pc; env->tsptr->tnpc = env->npc; env->tsptr->tt = intno; - if (!(env->features & CPU_FEATURE_GL)) - change_pstate(PS_PEF | PS_PRIV | PS_AG); - + if (!(env->features & CPU_FEATURE_GL)) { + switch (intno) { + case TT_IVEC: + change_pstate(PS_PEF | PS_PRIV | PS_IG); + break; + case TT_TFAULT: + case TT_TMISS: + case TT_DFAULT: + case TT_DMISS: + case TT_DPROT: + change_pstate(PS_PEF | PS_PRIV | PS_MG); + break; + default: + change_pstate(PS_PEF | PS_PRIV | PS_AG); + break; + } + } if (intno == TT_CLRWIN) cpu_set_cwp(env, cpu_cwp_dec(env, env->cwp - 1)); else if ((intno & 0x1c0) == TT_SPILL) |