From f4503efb2068b42a90e4ab45360fb40d8931b8c7 Mon Sep 17 00:00:00 2001 From: fridtjof Date: Tue, 19 Aug 2025 23:32:59 +0200 Subject: [PATCH] CR16C: translate: fix pop edge case for CFG.SR=1 e.g. popret 0x2, RA_L is valid, but raised illegal instruction here --- target/cr16c/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/cr16c/translate.c b/target/cr16c/translate.c index 839976dafb..b474c47df8 100644 --- a/target/cr16c/translate.c +++ b/target/cr16c/translate.c @@ -1574,7 +1574,7 @@ static bool trans_pop(DisasContext *ctx, arg_pop *a) { int32_t count = a->count + 1; // todo if cfg.sr = 1 if (true) { - if (count + a->dest > 15) { // TODO verify against ISA table + if (a->count + a->dest > 15) { // invalid return false; }