From 57b36ae0580aa33c3581804c5fc07dc81d321dcb Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 11 Nov 2020 01:17:31 +0300 Subject: [PATCH] target: e2k: fix instructions with speculative mode --- target/e2k/translate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/e2k/translate.c b/target/e2k/translate.c index a5d20eaf70..acd5620a0d 100644 --- a/target/e2k/translate.c +++ b/target/e2k/translate.c @@ -862,7 +862,8 @@ static Result gen_alc(DisasContext *dc, CPUE2KState *env, int chan) { const struct unpacked_instr *instr = &dc->instr; unsigned int als = instr->als[chan]; - int opc = als >> 24; + int opc = (als >> 24) & 0x7f; + int sm = als >> 31; unsigned int dst = als & 0xff; Result res = { 0 }; @@ -978,7 +979,7 @@ static Result gen_alc(DisasContext *dc, CPUE2KState *env, int chan) gen_exception(dc, 1); break; default: - qemu_log_mask(LOG_UNIMP, "gen_alc: undefined instruction 0x%x\n", opc); + qemu_log_mask(LOG_UNIMP, "gen_alc: undefined instruction 0x%x %s\n", opc, sm ? "(speculative)" : ""); break; }