From 086801599218a133fef6eb71eaff545af2fe1034 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 28 Feb 2019 18:53:29 -0500 Subject: [PATCH] target/arm: Move TCGContext variable within arm_post_translate_insn into a narrower scope This is only used within the scope of the if statement, so we can just move it there. --- qemu/target/arm/translate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qemu/target/arm/translate.c b/qemu/target/arm/translate.c index e635e13c..5a27b244 100644 --- a/qemu/target/arm/translate.c +++ b/qemu/target/arm/translate.c @@ -13657,8 +13657,6 @@ static bool arm_pre_translate_insn(DisasContext *dc) static void arm_post_translate_insn(DisasContext *dc) { - TCGContext *tcg_ctx = dc->uc->tcg_ctx; - // Unicorn: end address tells us to stop emulation if (dc->pc == dc->uc->addr_end) { // imitate WFI instruction to halt emulation @@ -13667,6 +13665,7 @@ static void arm_post_translate_insn(DisasContext *dc) } if (dc->condjmp && !dc->base.is_jmp) { + TCGContext *tcg_ctx = dc->uc->tcg_ctx; gen_set_label(tcg_ctx, dc->condlabel); dc->condjmp = 0; }