summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2017-02-07 02:43:12 -0800
committerMax Filippov <jcmvbkbc@gmail.com>2017-12-18 21:26:18 -0800
commit2eb967c4e9898d688a75be43955bbbc2107f29f7 (patch)
tree2deeebe8cde81a88b84e8583cb50316c5ee95723 /target
parent0a0dc59d27527b78a195c2d838d28b7b49e5a639 (diff)
downloadqemu-2eb967c4e9898d688a75be43955bbbc2107f29f7.tar.gz
target/xtensa: pass actual frame size to the entry helper
Currently 'entry' opcode helper accepts frame size divided by 8, as it is encoded in the opcode. Make it more natural and accept actual frame size instead. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target')
-rw-r--r--target/xtensa/op_helper.c2
-rw-r--r--target/xtensa/translate.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c
index 3d990c0caa..012552817f 100644
--- a/target/xtensa/op_helper.c
+++ b/target/xtensa/op_helper.c
@@ -249,7 +249,7 @@ void HELPER(entry)(CPUXtensaState *env, uint32_t pc, uint32_t s, uint32_t imm)
if (windowstart & ((1 << callinc) - 1)) {
HELPER(window_check)(env, pc, callinc);
}
- env->regs[(callinc << 2) | (s & 3)] = env->regs[s] - (imm << 3);
+ env->regs[(callinc << 2) | (s & 3)] = env->regs[s] - imm;
rotate_window(env, callinc);
env->sregs[WINDOW_START] |=
windowstart_bit(env->sregs[WINDOW_BASE], env);
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 20f7ddf042..225e4a5fe8 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -2830,7 +2830,7 @@ static void disas_xtensa_insn(CPUXtensaState *env, DisasContext *dc)
{
TCGv_i32 pc = tcg_const_i32(dc->pc);
TCGv_i32 s = tcg_const_i32(BRI12_S);
- TCGv_i32 imm = tcg_const_i32(BRI12_IMM12);
+ TCGv_i32 imm = tcg_const_i32(BRI12_IMM12 << 3);
gen_helper_entry(cpu_env, pc, s, imm);
tcg_temp_free(imm);
tcg_temp_free(s);