summaryrefslogtreecommitdiff
path: root/target-xtensa
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2011-11-01 01:51:02 +0400
committerMax Filippov <jcmvbkbc@gmail.com>2011-11-02 05:05:38 +0400
commit53a72dfda584c8d54df61f7c1aea9f9ff86b138c (patch)
tree240aad6dbeab981c96a680e05327af6d632ce372 /target-xtensa
parente072ea2fd8fdceef64159b9596d3c15ce01bea91 (diff)
target-xtensa: mask out undefined bits of WINDOWSTART SR
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>
Diffstat (limited to 'target-xtensa')
-rw-r--r--target-xtensa/translate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c
index 1688bb246..b724d466d 100644
--- 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);
}