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.
This commit is contained in:
Lioncash 2019-02-28 18:53:29 -05:00
parent 15440a83c5
commit 0868015992
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -13657,8 +13657,6 @@ static bool arm_pre_translate_insn(DisasContext *dc)
static void arm_post_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 // Unicorn: end address tells us to stop emulation
if (dc->pc == dc->uc->addr_end) { if (dc->pc == dc->uc->addr_end) {
// imitate WFI instruction to halt emulation // 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) { if (dc->condjmp && !dc->base.is_jmp) {
TCGContext *tcg_ctx = dc->uc->tcg_ctx;
gen_set_label(tcg_ctx, dc->condlabel); gen_set_label(tcg_ctx, dc->condlabel);
dc->condjmp = 0; dc->condjmp = 0;
} }