Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rth7680 committed May 25, 2023
1 parent 43b4cd9 commit f63eb2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tcg/mips/tcg-target.c.inc
Expand Up @@ -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);
}
Expand Down

0 comments on commit f63eb2e

Please sign in to comment.