aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-01-23 12:40:40 -0800
committerRichard Henderson <richard.henderson@linaro.org>2019-01-28 07:04:10 -0800
commita31aa4ce00bb8b7ed01d82d08ce2ca94c2e408d2 (patch)
tree93676341f943a663f1c09274f750a369c0dd574d
parentcd7d3cb7a26297c2ca28da68bbc7aacec0c04d25 (diff)
downloadqemu-a31aa4ce00bb8b7ed01d82d08ce2ca94c2e408d2.zip
qemu-a31aa4ce00bb8b7ed01d82d08ce2ca94c2e408d2.tar.gz
qemu-a31aa4ce00bb8b7ed01d82d08ce2ca94c2e408d2.tar.bz2
tcg/mips: Fix tcg_out_qemu_ld_slow_path
Patch the branch after it has been emitted rather than before it exists. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--tcg/mips/tcg-target.inc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tcg/mips/tcg-target.inc.c b/tcg/mips/tcg-target.inc.c
index be0bc92..c5d7067 100644
--- a/tcg/mips/tcg-target.inc.c
+++ b/tcg/mips/tcg-target.inc.c
@@ -1343,8 +1343,9 @@ static void tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *l)
}
}
- reloc_pc16(s->code_ptr, l->raddr);
tcg_out_opc_br(s, OPC_BEQ, TCG_REG_ZERO, TCG_REG_ZERO);
+ reloc_pc16(s->code_ptr - 1, l->raddr);
+
/* delay slot */
if (TCG_TARGET_REG_BITS == 64 && l->type == TCG_TYPE_I32) {
/* we always sign-extend 32-bit loads */