qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.landwerlin@openwide.fr>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] sh : performance problem
Date: Tue, 03 Mar 2009 01:09:40 +0100	[thread overview]
Message-ID: <1236038980.4975.18.camel@coalu.atr> (raw)
In-Reply-To: <1236038327.4975.16.camel@coalu.atr>

You might want this patch too


-- 
Lionel Landwerlin <lionel.landwerlin@openwide.fr>

[PATCH] SH4: Fixed last UTLB unused and URB/URC management

Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr>
---
 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

  reply	other threads:[~2009-03-03  0:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-26 16:28 [Qemu-devel] sh : performance problem Shin-ichiro KAWASAKI
2009-02-28 19:15 ` Lionel Landwerlin
2009-03-01  6:05   ` Shin-ichiro KAWASAKI
2009-03-01 12:46     ` Lionel Landwerlin
2009-03-01 16:10       ` Shin-ichiro KAWASAKI
2009-03-01 17:39         ` Lionel Landwerlin
2009-03-02 14:46           ` Shin-ichiro KAWASAKI
2009-03-02 22:30     ` Lionel Landwerlin
2009-03-03 15:32       ` Shin-ichiro KAWASAKI
2009-03-02 23:58 ` Lionel Landwerlin
2009-03-03  0:09   ` Lionel Landwerlin [this message]
2009-03-03 15:46   ` Shin-ichiro KAWASAKI
2009-03-03 18:57     ` Lionel Landwerlin
2009-03-03 19:25       ` Laurent Desnogues
2009-03-03 22:28         ` Lionel Landwerlin
2009-03-04  2:59           ` Paul Brook
2009-03-04 15:22             ` Shin-ichiro KAWASAKI
2009-03-04 15:39           ` Shin-ichiro KAWASAKI
2009-03-03 23:11     ` Lionel Landwerlin
2009-03-04 15:12       ` Shin-ichiro KAWASAKI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1236038980.4975.18.camel@coalu.atr \
    --to=lionel.landwerlin@openwide.fr \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).