Make MAXTL dynamic, bounds check tl when indexing

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4942 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
blueswir1 2008-07-25 07:42:14 +00:00
parent e7d05e6f1d
commit c19148bd8f
4 changed files with 56 additions and 51 deletions

View file

@ -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