From: "Igor V. Kovalenko" <igor.v.kovalenko@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] sparc64: correct write extra bits to cwp
Date: Wed, 27 Jan 2010 02:11:06 +0300 [thread overview]
Message-ID: <20100126231106.22550.1006.stgit@skyserv> (raw)
From: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
- correctly fit to cwp if provided window number is out of range
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
---
target-sparc/cpu.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index 50859c7..842a2f4 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -519,7 +519,7 @@ static inline void PUT_PSR(CPUSPARCState *env1, target_ulong val)
static inline void PUT_CWP64(CPUSPARCState *env1, int cwp)
{
if (unlikely(cwp >= env1->nwindows || cwp < 0))
- cwp = 0;
+ cwp %= env1->nwindows;
cpu_set_cwp(env1, env1->nwindows - 1 - cwp);
}
#endif
next reply other threads:[~2010-01-26 23:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-26 23:11 Igor V. Kovalenko [this message]
2010-01-27 17:48 ` [Qemu-devel] [PATCH] sparc64: correct write extra bits to cwp Blue Swirl
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=20100126231106.22550.1006.stgit@skyserv \
--to=igor.v.kovalenko@gmail.com \
--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).