CR16C: translate: fix pop edge case for CFG.SR=1

e.g. popret 0x2, RA_L is valid, but raised illegal instruction here
This commit is contained in:
fridtjof 2025-08-19 23:32:59 +02:00
parent 5b25a18c95
commit f4503efb20

View file

@ -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;
}