Commit 45f4d016be0a40af247faa2de26fa775882cb5eb

Authored by aurel32
1 parent fb104582

SH4: Fixed last UTLB unused

Version 2 of the patch.

Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6672 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 1 additions and 1 deletions
target-sh4/helper.c
... ... @@ -304,7 +304,7 @@ static void increment_urc(CPUState * env)
304 304 urb = ((env->mmucr) >> 18) & 0x3f;
305 305 urc = ((env->mmucr) >> 10) & 0x3f;
306 306 urc++;
307   - if (urc == urb || urc == UTLB_SIZE)
  307 + if (urc > urb || urc > (UTLB_SIZE - 1))
308 308 urc = 0;
309 309 env->mmucr = (env->mmucr & 0xffff03ff) | (urc << 10);
310 310 }
... ...