aboutsummaryrefslogtreecommitdiff
path: root/target/s390x
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-04-03 07:39:31 -1000
committerRichard Henderson <richard.henderson@linaro.org>2024-05-15 08:55:19 +0200
commit171ce939812d5e09ff3b9e24e1cc995368258768 (patch)
tree93cd76d75eb6634e569dc9613f1dad395cbfceae /target/s390x
parent4c6163eaf2ca64391f885ca9625947371a4a4834 (diff)
target/s390x: Fix translator_fake_ld length
The ilen value extracted from ex_value is the length of the EXECUTE instruction itself, and so is the increment to the pc. However, the length of the synthetic insn is located in the opcode like all other instructions. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/s390x')
-rw-r--r--target/s390x/tcg/translate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 2eb787e401..95d4d6ebc3 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -6200,11 +6200,11 @@ static const DisasInsn *extract_insn(CPUS390XState *env, DisasContext *s)
/* Extract the values saved by EXECUTE. */
insn = s->ex_value & 0xffffffffffff0000ull;
ilen = s->ex_value & 0xf;
+ op = insn >> 56;
/* Register insn bytes with translator so plugins work. */
be_insn = cpu_to_be64(insn);
- translator_fake_ld(&s->base, &be_insn, ilen);
- op = insn >> 56;
+ translator_fake_ld(&s->base, &be_insn, get_ilen(op));
} else {
insn = ld_code2(env, s, pc);
op = (insn >> 8) & 0xff;