projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28b150b
)
sparc64: correct write extra bits to cwp
author
Igor V. Kovalenko
<igor.v.kovalenko@gmail.com>
Wed, 27 Jan 2010 17:47:48 +0000
(17:47 +0000)
committer
Blue Swirl
<blauwirbel@gmail.com>
Wed, 27 Jan 2010 17:47:48 +0000
(17:47 +0000)
- correctly fit to cwp if provided window number is out of range
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-sparc/cpu.h
patch
|
blob
|
history
diff --git
a/target-sparc/cpu.h
b/target-sparc/cpu.h
index 50859c7f1f3f6a2600eb3a05b95b886228dce6b0..842a2f44452a4da692a0044d0ba1b784c82c6848 100644
(file)
--- 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