Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LeNtt-0002W5-FA for qemu-devel@nongnu.org; Tue, 03 Mar 2009 01:14:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeNts-0002Vj-OW for qemu-devel@nongnu.org; Tue, 03 Mar 2009 01:14:45 -0500 Received: from [199.232.76.173] (port=39207 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeNts-0002Vd-Ig for qemu-devel@nongnu.org; Tue, 03 Mar 2009 01:14:44 -0500 Received: from savannah.gnu.org ([199.232.41.3]:46835 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LeNts-0005GR-Da for qemu-devel@nongnu.org; Tue, 03 Mar 2009 01:14:44 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LeNtr-000551-RO for qemu-devel@nongnu.org; Tue, 03 Mar 2009 06:14:43 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LeNtr-00054w-Iw for qemu-devel@nongnu.org; Tue, 03 Mar 2009 06:14:43 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Tue, 03 Mar 2009 06:14:43 +0000 Subject: [Qemu-devel] [6672] SH4: Fixed last UTLB unused 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 Revision: 6672 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6672 Author: aurel32 Date: 2009-03-03 06:14:43 +0000 (Tue, 03 Mar 2009) Log Message: ----------- SH4: Fixed last UTLB unused Version 2 of the patch. Signed-off-by: Lionel Landwerlin Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/target-sh4/helper.c Modified: trunk/target-sh4/helper.c =================================================================== --- trunk/target-sh4/helper.c 2009-03-03 06:12:34 UTC (rev 6671) +++ trunk/target-sh4/helper.c 2009-03-03 06:14:43 UTC (rev 6672) @@ -304,7 +304,7 @@ urb = ((env->mmucr) >> 18) & 0x3f; urc = ((env->mmucr) >> 10) & 0x3f; urc++; - if (urc == urb || urc == UTLB_SIZE) + if (urc > urb || urc > (UTLB_SIZE - 1)) urc = 0; env->mmucr = (env->mmucr & 0xffff03ff) | (urc << 10); }