[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 01/16] target/xtensa: pass actual frame size to t
From: |
Max Filippov |
Subject: |
[Qemu-devel] [PATCH v2 01/16] target/xtensa: pass actual frame size to the entry helper |
Date: |
Mon, 18 Dec 2017 21:38:37 -0800 |
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 <address@hidden>
---
target/xtensa/op_helper.c | 2 +-
target/xtensa/translate.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c
index 3d990c0caa44..012552817f74 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 20f7ddf042f8..225e4a5fe870 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);
--
2.1.4
- [Qemu-devel] [PATCH v2 00/16] target/xtensa: switch to libisa, Max Filippov, 2017/12/19
- [Qemu-devel] [PATCH v2 01/16] target/xtensa: pass actual frame size to the entry helper,
Max Filippov <=
- [Qemu-devel] [PATCH v2 04/16] target/xtensa: extract FPU2000 opcode translators, Max Filippov, 2017/12/19
- [Qemu-devel] [PATCH v2 05/16] target/xtensa: update import_core.sh script for libisa, Max Filippov, 2017/12/19
- [Qemu-devel] [PATCH v2 02/16] target/xtensa: import libisa source, Max Filippov, 2017/12/19
- [Qemu-devel] [PATCH v2 03/16] target/xtensa: extract core opcode translators, Max Filippov, 2017/12/19
- [Qemu-devel] [PATCH v2 10/16] target/xtensa: tests: fix memctl SR test, Max Filippov, 2017/12/19
- [Qemu-devel] [PATCH v2 11/16] target/xtensa: drop DisasContext::litbase, Max Filippov, 2017/12/19
- [Qemu-devel] [PATCH v2 12/16] target/xtensa: add internal/noop SRs and opcodes, Max Filippov, 2017/12/19
- [Qemu-devel] [PATCH v2 13/16] target/xtensa: implement salt/saltu, Max Filippov, 2017/12/19
- [Qemu-devel] [PATCH v2 09/16] target/xtensa: use libisa for instruction decoding, Max Filippov, 2017/12/19
- [Qemu-devel] [PATCH v2 14/16] target/xtensa: implement GPIO32, Max Filippov, 2017/12/19