From: Peter Maydell Date: Sun, 6 Mar 2011 21:39:55 +0000 (+0000) Subject: target-arm: Use TCG temporary leak debugging facilities X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~3361 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d084c7c57362968a1300b2185015f045faf43453;p=sdk%2Femulator%2Fqemu.git target-arm: Use TCG temporary leak debugging facilities Use the new TCG temporary leak debugging facilities to check that each ARM instruction does not leak temporaries. Signed-off-by: Peter Maydell Signed-off-by: Aurelien Jarno --- diff --git a/target-arm/translate.c b/target-arm/translate.c index e01c8cd304..91203c2407 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -9149,6 +9149,8 @@ static inline void gen_intermediate_code_internal(CPUState *env, gen_icount_start(); + tcg_clear_temp_count(); + /* A note on handling of the condexec (IT) bits: * * We want to avoid the overhead of having to write the updated condexec @@ -9258,6 +9260,11 @@ static inline void gen_intermediate_code_internal(CPUState *env, gen_set_label(dc->condlabel); dc->condjmp = 0; } + + if (tcg_check_temp_count()) { + fprintf(stderr, "TCG temporary leak before %08x\n", dc->pc); + } + /* Translation stops when a conditional branch is encountered. * Otherwise the subsequent code could get translated several times. * Also stop translation when a page boundary is reached. This