From 927e3a4e066d4bce091d368b15c7ad7877a1e0e1 Mon Sep 17 00:00:00 2001 From: aurel32 Date: Tue, 3 Mar 2009 09:14:01 +0000 Subject: SH4: Fixed last UTLB unused and URB/URC management Signed-off-by: Lionel Landwerlin Signed-off-by: Aurelien Jarno git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6675 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-sh4/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-sh4/helper.c') 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); } -- cgit v1.1