projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e072ea2
)
target-xtensa: mask out undefined bits of WINDOWSTART SR
author
Max Filippov
<jcmvbkbc@gmail.com>
Mon, 31 Oct 2011 21:51:02 +0000
(
01:51
+0400)
committer
Max Filippov
<jcmvbkbc@gmail.com>
Wed, 2 Nov 2011 01:05:38 +0000
(
05:05
+0400)
According to ISA, table 5-156, bits 32:NAREG/4 of the WINDOWSTART SR
must be zero.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
target-xtensa/translate.c
patch
|
blob
|
history
diff --git
a/target-xtensa/translate.c
b/target-xtensa/translate.c
index 1688bb2462ebdf266cf0cb681edc96c446f0e5c8..b724d466d6c96df65962ddc712df26c84c6ba42f 100644
(file)
--- a/
target-xtensa/translate.c
+++ b/
target-xtensa/translate.c
@@
-466,7
+466,7
@@
static void gen_wsr_windowbase(DisasContext *dc, uint32_t sr, TCGv_i32 v)
static void gen_wsr_windowstart(DisasContext *dc, uint32_t sr, TCGv_i32 v)
{
- tcg_gen_
mov_i32(cpu_SR[sr], v
);
+ tcg_gen_
andi_i32(cpu_SR[sr], v, (1 << dc->config->nareg / 4) - 1
);
reset_used_window(dc);
}