aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-08-06 07:13:46 -1000
committerRichard Henderson <richard.henderson@linaro.org>2023-05-25 13:57:50 +0000
commitf63eb2e59f45a2307f2e3f41e82e76f7abcd03f0 (patch)
tree6ec8215987112252df6018f0d71da74d1805cd5c /tcg
parent43b4cd97131f3e99e6bf397ed3874855fac9cdff (diff)
downloadqemu-f63eb2e59f45a2307f2e3f41e82e76f7abcd03f0.zip
qemu-f63eb2e59f45a2307f2e3f41e82e76f7abcd03f0.tar.gz
qemu-f63eb2e59f45a2307f2e3f41e82e76f7abcd03f0.tar.bz2
tcg/mips: Unify TCG_GUEST_BASE_REG tests
In tcg_out_qemu_ld/st, we already check for guest_base matching int16_t. Mirror that when setting up TCG_GUEST_BASE_REG in the prologue. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/mips/tcg-target.c.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc
index f322891..ccb3a1c 100644
--- a/tcg/mips/tcg-target.c.inc
+++ b/tcg/mips/tcg-target.c.inc
@@ -2312,7 +2312,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
}
#ifndef CONFIG_SOFTMMU
- if (guest_base) {
+ if (guest_base != (int16_t)guest_base) {
tcg_out_movi(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, guest_base);
tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG);
}