mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
sparc64: correct write extra bits to cwp
- 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>
This commit is contained in:
parent
28b150bfb0
commit
4f690853bb
1 changed files with 1 additions and 1 deletions
|
@ -519,7 +519,7 @@ static inline void PUT_PSR(CPUSPARCState *env1, target_ulong val)
|
||||||
static inline void PUT_CWP64(CPUSPARCState *env1, int cwp)
|
static inline void PUT_CWP64(CPUSPARCState *env1, int cwp)
|
||||||
{
|
{
|
||||||
if (unlikely(cwp >= env1->nwindows || cwp < 0))
|
if (unlikely(cwp >= env1->nwindows || cwp < 0))
|
||||||
cwp = 0;
|
cwp %= env1->nwindows;
|
||||||
cpu_set_cwp(env1, env1->nwindows - 1 - cwp);
|
cpu_set_cwp(env1, env1->nwindows - 1 - cwp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue