[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 063/118] PPC: Fail on leaking temporaries
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 063/118] PPC: Fail on leaking temporaries |
Date: |
Wed, 4 Jun 2014 14:44:04 +0200 |
When QEMU gets compiled with --enable-debug-tcg we can check for temporary
leakage. Implement the necessary target code for this and fail emulation
when we hit a leakage.
This hopefully ensures that we don't get new leaks.
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/translate.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index e609d4e..6aede79 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -11766,6 +11766,7 @@ static inline void
gen_intermediate_code_internal(PowerPCCPU *cpu,
max_insns = CF_COUNT_MASK;
gen_tb_start();
+ tcg_clear_temp_count();
/* Set env in case of segfault during code fetch */
while (ctx.exception == POWERPC_EXCP_NONE
&& tcg_ctx.gen_opc_ptr < gen_opc_end) {
@@ -11865,6 +11866,12 @@ static inline void
gen_intermediate_code_internal(PowerPCCPU *cpu,
*/
break;
}
+ if (tcg_check_temp_count()) {
+ fprintf(stderr, "Opcode %02x %02x %02x (%08x) leaked
temporaries\n",
+ opc1(ctx.opcode), opc2(ctx.opcode), opc3(ctx.opcode),
+ ctx.opcode);
+ exit(1);
+ }
}
if (tb->cflags & CF_LAST_IO)
gen_io_end();
--
1.8.1.4
- [Qemu-ppc] [PULL 058/118] target-ppc: Refactor AES Instructions, (continued)
- [Qemu-ppc] [PULL 058/118] target-ppc: Refactor AES Instructions, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 075/118] macio: handle non-block ATAPI DMA transfers, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 013/118] target-ppc: Remove PVR check from migration, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 049/118] target-ppc: Introduce DFP Extract Biased Exponent, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 065/118] PPC: Add definitions for GIVORs, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 055/118] util: Add InvMixColumns, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 021/118] libdecnumber: Eliminate Unused Variable in decSetSubnormal, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 070/118] PPC: e500: Expose kernel load address in dt, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 019/118] libdecnumber: Change gstdint.h to stdint.h, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 072/118] PPC: e500: Move to u-boot as firmware, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 063/118] PPC: Fail on leaking temporaries,
Alexander Graf <=
- [Qemu-ppc] [PULL 062/118] PPC: Fix TCG chunks that don't free their temps, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 016/118] libdecnumber: Eliminate #include *Symbols.h, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 029/118] target-ppc: Introduce DFP Helper Utilities, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 067/118] PPC: Add L1CFG1 SPR emulation, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 025/118] libdecnumber: Fix decNumberSetBCD, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 068/118] PPC: Properly emulate L1CSR0 and L1CSR1, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 051/118] target-ppc: Introduce DFP Shift Significand, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 024/118] libdecnumber: Introduce decNumberIntegralToInt64, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 037/118] target-ppc: Introduce DFP Test Data Group, Alexander Graf, 2014/06/04
- [Qemu-ppc] [PULL 023/118] libdecnumber: Introduce decNumberFrom[U]Int64, Alexander Graf, 2014/06/04