From: Richard Henderson Date: Fri, 6 Aug 2021 17:13:46 +0000 (-1000) Subject: tcg/mips: Unify TCG_GUEST_BASE_REG tests X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f63eb2e59f45a2307f2e3f41e82e76f7abcd03f0;p=qemu.git 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 --- diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc index f322891797..ccb3a1cd9a 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); }