diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-03 09:14:01 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-03 09:14:01 +0000 |
commit | 927e3a4e066d4bce091d368b15c7ad7877a1e0e1 (patch) | |
tree | 98f0666040de7823742a528bdd3e9fd928b3e768 /target-sh4 | |
parent | d905dba48fd1a67af3668649523e5a0959d2f619 (diff) | |
download | qemu-927e3a4e066d4bce091d368b15c7ad7877a1e0e1.zip qemu-927e3a4e066d4bce091d368b15c7ad7877a1e0e1.tar.gz qemu-927e3a4e066d4bce091d368b15c7ad7877a1e0e1.tar.bz2 |
SH4: Fixed last UTLB unused and URB/URC management
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@6675 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sh4')
-rw-r--r-- | target-sh4/helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-sh4/helper.c b/target-sh4/helper.c index 6df6bde..c506086 100644 --- a/target-sh4/helper.c +++ b/target-sh4/helper.c @@ -304,7 +304,7 @@ static void increment_urc(CPUState * env) urb = ((env->mmucr) >> 18) & 0x3f; urc = ((env->mmucr) >> 10) & 0x3f; urc++; - if (urc > urb || urc > (UTLB_SIZE - 1)) + if ((urb > 0 && urc > urb) || urc > (UTLB_SIZE - 1)) urc = 0; env->mmucr = (env->mmucr & 0xffff03ff) | (urc << 10); } |