OSDN Git Service

target/sparc: Always copy conditions into a new temporary
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 16 Oct 2023 16:03:10 +0000 (09:03 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 5 Nov 2023 20:03:38 +0000 (12:03 -0800)
This will allow the condition to live across changes to
the global cc variables.

Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/sparc/translate.c

index a405512..dd6d43d 100644 (file)
@@ -1226,8 +1226,9 @@ static const TCGCond gen_tcg_cond_reg[8] = {
 static void gen_compare_reg(DisasCompare *cmp, int cond, TCGv r_src)
 {
     cmp->cond = tcg_invert_cond(gen_tcg_cond_reg[cond]);
-    cmp->c1 = r_src;
+    cmp->c1 = tcg_temp_new();
     cmp->c2 = 0;
+    tcg_gen_mov_tl(cmp->c1, r_src);
 }
 
 static void gen_op_clear_ieee_excp_and_FTT(void)