]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tcg/mips: Unify TCG_GUEST_BASE_REG tests
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 6 Aug 2021 17:13:46 +0000 (07:13 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 25 May 2023 13:57:50 +0000 (13:57 +0000)
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>
tcg/mips/tcg-target.c.inc

index f322891797ac35a34bad56e35f3f63d7eb829a57..ccb3a1cd9ad3f1f603827dac081a84b3c3486e76 100644 (file)
@@ -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);
     }