Skip to contentSkip to conversation

Fix compilation of PPC64 targets with DEBUG_TCGV enabled

PATCH Applied Stuart Brady 2 participants 2 messages Jan 31, 2009 – Feb 3, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix compilation of PPC64 targets with DEBUG_TCGV enabled

The attached patch fixes compilation of PPC64 targets with DEBUG_TCGV enabled.

translate.c +3 -3
Index: target-ppc/translate.c
===================================================================
@@ -6263,7 +6263,7 @@
     t = tcg_temp_new_i32();
     tcg_gen_ld_i32(t, cpu_env, offsetof(CPUState, vscr));
     tcg_gen_extu_i32_i64(cpu_avrl[rD(ctx->opcode)], t);
-    tcg_temp_free(t);
+    tcg_temp_free_i32(t);
 }
 
 GEN_HANDLER(mtvscr, 0x04, 0x2, 0x19, 0x03ff0000, PPC_ALTIVEC)
@@ -6511,7 +6511,7 @@
 GEN_HANDLER(vsldoi, 0x04, 0x16, 0xFF, 0x00000400, PPC_ALTIVEC)
 {
     TCGv_ptr ra, rb, rd;
-    TCGv sh;
+    TCGv_i32 sh;
     if (unlikely(!ctx->altivec_enabled)) {
         gen_exception(ctx, POWERPC_EXCP_VPU);
         return;
@@ -6524,7 +6524,7 @@
     tcg_temp_free_ptr(ra);
     tcg_temp_free_ptr(rb);
     tcg_temp_free_ptr(rd);
-    tcg_temp_free(sh);
+    tcg_temp_free_i32(sh);
 }
 
 #define GEN_VAFORM_PAIRED(name0, name1, opc2)                           \
Signature · 1 line
Stuart Brady
#1 lore raw
Quoted 4 lines · Stuart Brady

The attached patch fixes compilation of PPC64 targets with DEBUG_TCGV enabled.

Thanks, applied.

Quoted 36 lines

Index: target-ppc/translate.c
===================================================================

translate.c +3 -3
@@ -6263,7 +6263,7 @@
     t = tcg_temp_new_i32();
     tcg_gen_ld_i32(t, cpu_env, offsetof(CPUState, vscr));
     tcg_gen_extu_i32_i64(cpu_avrl[rD(ctx->opcode)], t);
-    tcg_temp_free(t);
+    tcg_temp_free_i32(t);
 }
 
 GEN_HANDLER(mtvscr, 0x04, 0x2, 0x19, 0x03ff0000, PPC_ALTIVEC)
@@ -6511,7 +6511,7 @@
 GEN_HANDLER(vsldoi, 0x04, 0x16, 0xFF, 0x00000400, PPC_ALTIVEC)
 {
     TCGv_ptr ra, rb, rd;
-    TCGv sh;
+    TCGv_i32 sh;
     if (unlikely(!ctx->altivec_enabled)) {
         gen_exception(ctx, POWERPC_EXCP_VPU);
         return;
@@ -6524,7 +6524,7 @@
     tcg_temp_free_ptr(ra);
     tcg_temp_free_ptr(rb);
     tcg_temp_free_ptr(rd);
-    tcg_temp_free(sh);
+    tcg_temp_free_i32(sh);
 }
 
 #define GEN_VAFORM_PAIRED(name0, name1, opc2)                           \
Signature · 1 line
Stuart Brady
Signature · 2 lines
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net