qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] ppc: Fix use of uninitialized TCG variable in tlbiv


From: Andreas Färber
Subject: [Qemu-devel] [PATCH] ppc: Fix use of uninitialized TCG variable in tlbiva
Date: Sun, 7 Dec 2008 16:01:51 +0100

Silences a warning about possible unitialized use of t0.

The remaining ca. three warnings seemed to be due to GCC's dumbness
to not recognize identical conditions.

Signed-off-by: Andreas Faerber <address@hidden>

---
 Making the add_ca argument const did not resolve the warning for t1
 in gen_op_arith_{add,subf}.

diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 31d7387..a239ebd 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -5381,11 +5381,11 @@ GEN_HANDLER(tlbiva, 0x1F, 0x12, 0x18, 0x03FFF801, PPC_TLBIVA)
 #if defined(CONFIG_USER_ONLY)
     GEN_EXCP_PRIVOPC(ctx);
 #else
-    TCGv t0;
     if (unlikely(!ctx->supervisor)) {
         GEN_EXCP_PRIVOPC(ctx);
         return;
     }
+    TCGv t0 = tcg_temp_new();
     gen_addr_reg_index(t0, ctx);
 #if defined(TARGET_PPC64)
     if (!ctx->sf_mode)

Attachment: tlbiva-var.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]