From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lb1qq-0006wn-Hp for qemu-devel@nongnu.org; Sat, 21 Feb 2009 19:05:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lb1qp-0006wQ-54 for qemu-devel@nongnu.org; Sat, 21 Feb 2009 19:05:43 -0500 Received: from [199.232.76.173] (port=56037 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lb1qo-0006wN-V5 for qemu-devel@nongnu.org; Sat, 21 Feb 2009 19:05:42 -0500 Received: from soufre.accelance.net ([213.162.48.15]:56357) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lb1qo-00067w-Ec for qemu-devel@nongnu.org; Sat, 21 Feb 2009 19:05:42 -0500 Received: from [192.168.0.3] (potipota.net [88.168.176.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by soufre.accelance.net (Postfix) with ESMTP id 5D86345028 for ; Sun, 22 Feb 2009 01:05:40 +0100 (CET) Subject: Re: [Qemu-devel] [PATCH] SH4: Fixed last UTLB unused From: Lionel Landwerlin In-Reply-To: <1235229695.8648.17.camel@cocoduo.atr> References: <1234824063.8648.6.camel@cocoduo.atr> <1235229695.8648.17.camel@cocoduo.atr> Content-Type: text/plain; charset=utf-8 Date: Sun, 22 Feb 2009 01:05:37 +0100 Message-Id: <1235261137.8648.18.camel@cocoduo.atr> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Still not happy with the fix ... Signed-off-by: Lionel Landwerlin --- 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 cd0f392..8498d3f 100644 --- a/target-sh4/helper.c +++ b/target-sh4/helper.c @@ -305,7 +305,7 @@ static void increment_urc(CPUState * env) urb =3D ((env->mmucr) >> 18) & 0x3f; urc =3D ((env->mmucr) >> 10) & 0x3f; urc++; - if (urc =3D=3D urb || urc =3D=3D UTLB_SIZE - 1) + if (urc > urb || urc > (UTLB_SIZE - 1)) urc =3D 0; env->mmucr =3D (env->mmucr & 0xffff03ff) | (urc << 10); } --=20 1.5.6.5 --=20 =EF=BB=BFLione Landwerlin =20 =EF=BB=BF O p e n W i d e 14, rue Gaillon 75002 Paris