On 4/10/23 08:42, Philippe Mathieu-Daudé wrote:
On 3/10/23 19:43, Richard Henderson wrote:
Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
tcg/riscv/tcg-target.c.inc | 189 +++++++++++++++++++------------------
1 file changed, 97 insertions(+), 92 deletions(-)
@@ -2075,10 +2080,10 @@ static void
tcg_target_qemu_prologue(TCGContext *s)
TCG_REG_SP, SAVE_OFS + i * REG_SIZE);
}
-#if !defined(CONFIG_SOFTMMU)
- tcg_out_movi(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, guest_base);
- tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG);
-#endif
+ if (!tcg_use_softmmu && guest_base) {
Do you mind mentioning the 'guest_base' change here?
Nitpicking, it would be clearer as a preliminary patch, with
Fixes: 92c041c59b ("tcg/riscv: Add the prologue generation and register
the JIT")
+ tcg_out_movi(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, guest_base);
+ tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG);
+ }
/* Call generated code */
tcg_out_mov(s, TCG_TYPE_PTR, TCG_AREG0,
tcg_target_call_iarg_regs[0]);