diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-25 07:42:14 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-25 07:42:14 +0000 |
commit | c19148bd8f5c2800265372d3554035efde1c5517 (patch) | |
tree | 48865e441f51604f9df6268a38b82063cf75eba1 /target-sparc/op_helper.c | |
parent | e7d05e6f1d39b913a15911c35a857965e696fa65 (diff) |
Make MAXTL dynamic, bounds check tl when indexing
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4942 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/op_helper.c')
-rw-r--r-- | target-sparc/op_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index 73d960b72e..40cdf6ee2c 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -2742,7 +2742,7 @@ void helper_done(void) change_pstate((env->tsptr->tstate >> 8) & 0xf3f); PUT_CWP64(env, env->tsptr->tstate & 0xff); env->tl--; - env->tsptr = &env->ts[env->tl]; + env->tsptr = &env->ts[env->tl & MAXTL_MASK]; } void helper_retry(void) @@ -2754,7 +2754,7 @@ void helper_retry(void) change_pstate((env->tsptr->tstate >> 8) & 0xf3f); PUT_CWP64(env, env->tsptr->tstate & 0xff); env->tl--; - env->tsptr = &env->ts[env->tl]; + env->tsptr = &env->ts[env->tl & MAXTL_MASK]; } #endif |