summaryrefslogtreecommitdiff
path: root/tcg/tcg-op.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-02-07 13:26:40 +0000
committerRichard Henderson <richard.henderson@linaro.org>2019-02-11 08:52:44 -0800
commitbef16ab4e641636b4e85c3d863b4257ce0be4e6f (patch)
treeff857b9e8eda32e70d336d6b855befd609685714 /tcg/tcg-op.h
parenta044e3de2917d54b95f1211f4d14ec30cac9a59f (diff)
downloadqemu-bef16ab4e641636b4e85c3d863b4257ce0be4e6f.zip
tcg: Diagnose referenced labels that have not been emitted
Currently, a jump to a label that is not defined anywhere will be emitted not be relocated. This results in a jump to a random jump target. With tcg debugging, print a diagnostic to the -d op file and abort. This could help debug or detect errors like c2d9644e6d ("target/arm: Fix crash on conditional instruction in an IT block") Reported-by: Roman Kapl <code@rkapl.cz> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/tcg-op.h')
-rw-r--r--tcg/tcg-op.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
index 2d98868d8f..d3e51b15af 100644
--- a/tcg/tcg-op.h
+++ b/tcg/tcg-op.h
@@ -255,6 +255,7 @@ static inline void tcg_gen_op6ii_i64(TCGOpcode opc, TCGv_i64 a1, TCGv_i64 a2,
static inline void gen_set_label(TCGLabel *l)
{
+ l->present = 1;
tcg_gen_op1(INDEX_op_set_label, label_arg(l));
}