qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] sparc64: correct write extra bits to cwp
@ 2010-01-26 23:11 Igor V. Kovalenko
  2010-01-27 17:48 ` Blue Swirl
  0 siblings, 1 reply; 2+ messages in thread
From: Igor V. Kovalenko @ 2010-01-26 23:11 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-27 17:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-26 23:11 [Qemu-devel] [PATCH] sparc64: correct write extra bits to cwp Igor V. Kovalenko
2010-01-27 17:48 ` Blue Swirl

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).