From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Latfj-0005T5-9m for qemu-devel@nongnu.org; Sat, 21 Feb 2009 10:21:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Latfi-0005St-Nj for qemu-devel@nongnu.org; Sat, 21 Feb 2009 10:21:42 -0500 Received: from [199.232.76.173] (port=48961 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Latfi-0005Sq-IN for qemu-devel@nongnu.org; Sat, 21 Feb 2009 10:21:42 -0500 Received: from mx20.gnu.org ([199.232.41.8]:5817) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Latfi-0002sg-8t for qemu-devel@nongnu.org; Sat, 21 Feb 2009 10:21:42 -0500 Received: from soufre.accelance.net ([213.162.48.15]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Latfg-0006cL-G7 for qemu-devel@nongnu.org; Sat, 21 Feb 2009 10:21:40 -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 B19C7450AD for ; Sat, 21 Feb 2009 16:21:37 +0100 (CET) Subject: Re: [Qemu-devel] [PATCH] SH4: Fixed last UTLB unused From: Lionel Landwerlin In-Reply-To: <1234824063.8648.6.camel@cocoduo.atr> References: <1234824063.8648.6.camel@cocoduo.atr> Content-Type: text/plain; charset=utf-8 Date: Sat, 21 Feb 2009 16:21:35 +0100 Message-Id: <1235229695.8648.17.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 A more exact patch (according to datasheet) would be : 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..918a946 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 =3D=3D 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