From 4d706ca329c7642635fed0e7eef7fae175d601b6 Mon Sep 17 00:00:00 2001 From: Denis Drakhnya Date: Thu, 10 Dec 2020 00:29:14 +0200 Subject: [PATCH] target: e2k: Ignore unimplemented mas opc in store. --- target/e2k/translate/alc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/target/e2k/translate/alc.c b/target/e2k/translate/alc.c index 9636f8e676..36af35c59b 100644 --- a/target/e2k/translate/alc.c +++ b/target/e2k/translate/alc.c @@ -1271,6 +1271,7 @@ static MemOp gen_mas(DisasContext *ctx, int chan, MemOp memop, TCGv_i64 addr) // e2k_tr_gen_exception(ctx, E2K_EXCP_ILLOPC); qemu_log_mask(LOG_UNIMP, "0x%lx: mas=%#x, opc=%#x is not implemented!\n", ctx->pc, mas, opc); + return 0; } else if (mas) { int mod = extract8(mas, 0, 3); // int dc = extract8(mas, 5, 2); @@ -1341,6 +1342,11 @@ static void gen_st_i64(DisasContext *ctx, int chan, MemOp memop) tcg_gen_add_i64(t0, s1.value, s2.value); memop = gen_mas(ctx, chan, memop, t0); + if (memop == 0) { + // FIXME: hack + return; + } + if (sm) { TCGv_i32 t1 = tcg_temp_new_i32(); gen_helper_probe_write_access(t1, cpu_env, t0); @@ -1370,6 +1376,11 @@ static void gen_st_i32(DisasContext *ctx, int chan, MemOp memop) tcg_gen_add_i64(t0, s1.value, s2.value); memop = gen_mas(ctx, chan, memop, t0); + if (memop == 0) { + // FIXME: hack + return; + } + if (sm) { TCGv_i32 t1 = tcg_temp_new_i32(); gen_helper_probe_write_access(t1, cpu_env, t0);