From 0efe75f98bbf6da1bbc94f8947f5ea0fdd7c2f1f Mon Sep 17 00:00:00 2001 From: fridtjof Date: Fri, 22 Aug 2025 01:31:02 +0200 Subject: [PATCH] Revert "wip! maybe??? fix a subtle bug in MOVD imm" This reverts commit 574767b51e623f6686d3ad70588600b21aa79441. --- target/cr16c/translate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/cr16c/translate.c b/target/cr16c/translate.c index 804f56b57e..d121bbec3a 100644 --- a/target/cr16c/translate.c +++ b/target/cr16c/translate.c @@ -218,8 +218,7 @@ static void gen_compute_rrp_addr(TCGv_i32 dest, uint8_t rrp, uint32_t disp) { /* Moves */ static bool trans_MOV_imm(DisasContext* ctx, arg_MOV_imm* a) { - int len = (a->width == 4 ? 2 : a->width) * 8; - tcg_gen_deposit_i32(r[a->rd], r[a->rd], tcg_constant_i32(a->imm), 0, len); + tcg_gen_deposit_i32(r[a->rd], r[a->rd], tcg_constant_i32(a->imm), 0, a->width * 8); if (a->width == 4 && a->rd < CR16C_FIRST_32B_REG) { tcg_gen_movi_i32(r[a->rd + 1], a->imm >> 16); }