diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-17 19:17:19 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-17 19:17:19 +0000 |
commit | e6bf7d70b5a459f96f0b2cbc677926eebe685c84 (patch) | |
tree | 588a5f287852858223eed1f5a88921cbcfd18188 /target-sparc/helper.c | |
parent | 2cade6a3f60cc203ee2b3fc44d06af3ec048e379 (diff) |
Fix saving and loading of trap state
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4883 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/helper.c')
-rw-r--r-- | target-sparc/helper.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/target-sparc/helper.c b/target-sparc/helper.c index 14364fb91f..baf761a056 100644 --- a/target-sparc/helper.c +++ b/target-sparc/helper.c @@ -742,6 +742,14 @@ void do_interrupt(CPUState *env) return; } #endif + if (env->tl < MAXTL - 1) { + env->tl++; + } else { + env->pstate |= PS_RED; + if (env->tl != MAXTL) + env->tl++; + } + env->tsptr = &env->ts[env->tl]; env->tsptr->tstate = ((uint64_t)GET_CCR(env) << 32) | ((env->asi & 0xff) << 24) | ((env->pstate & 0xf3f) << 8) | GET_CWP64(env); @@ -758,14 +766,6 @@ void do_interrupt(CPUState *env) cpu_set_cwp(env, cpu_cwp_inc(env, env->cwp + 1)); env->tbr &= ~0x7fffULL; env->tbr |= ((env->tl > 1) ? 1 << 14 : 0) | (intno << 5); - if (env->tl < MAXTL - 1) { - env->tl++; - } else { - env->pstate |= PS_RED; - if (env->tl != MAXTL) - env->tl++; - } - env->tsptr = &env->ts[env->tl]; env->pc = env->tbr; env->npc = env->pc + 4; env->exception_index = 0; |