From 9e88287e167546fac4a44119f32a934d31900528 Mon Sep 17 00:00:00 2001 From: Denis Drakhnya Date: Wed, 9 Dec 2020 09:50:42 +0200 Subject: [PATCH] target: e2k: Fix setting ctpr.ipd for *disp instr. --- target/e2k/translate/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/e2k/translate/control.c b/target/e2k/translate/control.c index e4da1435d1..9901a7ef35 100644 --- a/target/e2k/translate/control.c +++ b/target/e2k/translate/control.c @@ -245,7 +245,7 @@ static void gen_cs0(DisasContext *dc) if (type == GETTSD && param_type != 1) { e2k_tr_gen_exception(dc, E2K_EXCP_ILLOPC); } - int ipd = GET_FIELD(bundle->ss, 30, 2); + int ipd = bundle->ss_present ? GET_FIELD(bundle->ss, 30, 2) : 3; if (type == DISP || type == LDISP) { unsigned int disp = GET_FIELD(cs0, 0, 28); /* Calculate a signed displacement in bytes. */