From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LeIC8-0004Zl-FM for qemu-devel@nongnu.org; Mon, 02 Mar 2009 19:09:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeIC6-0004ZJ-NK for qemu-devel@nongnu.org; Mon, 02 Mar 2009 19:09:11 -0500 Received: from [199.232.76.173] (port=34485 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeIC6-0004ZF-HQ for qemu-devel@nongnu.org; Mon, 02 Mar 2009 19:09:10 -0500 Received: from soufre.accelance.net ([213.162.48.15]:62744) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LeIC5-0005vH-UG for qemu-devel@nongnu.org; Mon, 02 Mar 2009 19:09:10 -0500 Received: from [192.168.0.5] (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 8F26D452F5 for ; Tue, 3 Mar 2009 01:09:08 +0100 (CET) Subject: Re: [Qemu-devel] sh : performance problem From: Lionel Landwerlin In-Reply-To: <1236038327.4975.16.camel@coalu.atr> References: <49A6C317.1080202@juno.dti.ne.jp> <1236038327.4975.16.camel@coalu.atr> Content-Type: text/plain Date: Tue, 03 Mar 2009 01:09:40 +0100 Message-Id: <1236038980.4975.18.camel@coalu.atr> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 You might want this patch too -- Lionel Landwerlin [PATCH] SH4: Fixed last UTLB unused and URB/URC management Signed-off-by: Lionel Landwerlin --- target-sh4/helper.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target-sh4/helper.c b/target-sh4/helper.c index cd0f392..54a3f1f 100644 --- a/target-sh4/helper.c +++ b/target-sh4/helper.c @@ -297,7 +297,7 @@ static int same_tlb_entry_exists(const tlb_t * haystack, uint8_t nbtlb, return 0; } -static void increment_urc(CPUState * env) +static inline void increment_urc(CPUState * env) { uint8_t urb, urc; @@ -305,7 +305,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); } -- 1.5.6.5