target/tricore: Fix OPC2_32_RCRW_INSERT translation
authorBastian Koppelmann <kbastian@mail.uni-paderborn.de>
Thu, 2 Feb 2023 12:04:25 +0000 (13:04 +0100)
committerBastian Koppelmann <kbastian@mail.uni-paderborn.de>
Wed, 8 Feb 2023 08:57:42 +0000 (09:57 +0100)
we were mixing up the "c" and "d" registers. We used "d" as a
destination register und "c" as the source. According to the TriCore ISA
manual 1.6 vol 2 it is the other way round.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/653
Message-Id: <20230202120432.1268-4-kbastian@mail.uni-paderborn.de>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
target/tricore/translate.c

index 8de4e56b1f1e7bd4a980b777177f1e34b13de37a..6149d4f5c08655d56254f940bad129ebb79d38bc 100644 (file)
@@ -5805,8 +5805,8 @@ static void decode_rcrw_insert(DisasContext *ctx)
 
         tcg_gen_movi_tl(temp, width);
         tcg_gen_movi_tl(temp2, const4);
-        tcg_gen_andi_tl(temp3, cpu_gpr_d[r4], 0x1f);
-        gen_insert(cpu_gpr_d[r3], cpu_gpr_d[r1], temp2, temp, temp3);
+        tcg_gen_andi_tl(temp3, cpu_gpr_d[r3], 0x1f);
+        gen_insert(cpu_gpr_d[r4], cpu_gpr_d[r1], temp2, temp, temp3);
 
         tcg_temp_free(temp3);
         break;