Skip to contentSkip to conversation

MIPS: Avoid tcg internal error

PATCH New Edgar E. Iglesias 1 participant 1 message Oct 29, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Avoid tcg internal error

Hello Thiemo,

I've got this in my tree, I needed it to avoid a tcg internal error while booting mips linux. Feel free to apply it if it's correct.

Thanks

commit d30651cff0b75ab584ba8401e87b39738d134149

Author: Edgar E. Iglesias <[email protected]>
Date:   Wed Oct 29 13:54:48 2008 +0100

MIPS: Initialize local temps before passing them to helpers.

target-mips/translate.c +2 -0
index ec375e1..3c18235 100644
@@ -5213,6 +5213,7 @@ static void gen_mftr(CPUState *env, DisasContext *ctx, int rt, int rd,
              (env->mvp->CP0_MVPConf0 & (0xff << CP0MVPC0_PTC)))
         tcg_gen_movi_tl(t0, -1);
     else if (u == 0) {
+        tcg_gen_movi_tl(t0, 0);
         switch (rt) {
         case 2:
             switch (sel) {
@@ -8163,6 +8164,7 @@ static void decode_opc (CPUState *env, DisasContext *ctx)
 #ifndef CONFIG_USER_ONLY
             if (!env->user_mode_only) {
                 TCGv t0 = tcg_temp_local_new(TCG_TYPE_TL);
+                tcg_gen_movi_tl(t0, 0);
 
                 op2 = MASK_MFMC0(ctx->opcode);
                 switch (op2) {