[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/29] tcg/riscv: Do not reserve TCG_GUEST_BASE_REG for guest_base
|
From: |
Richard Henderson |
|
Subject: |
[PULL 22/29] tcg/riscv: Do not reserve TCG_GUEST_BASE_REG for guest_base zero |
|
Date: |
Wed, 18 Oct 2023 15:25:50 -0700 |
Fixes: 92c041c59b ("tcg/riscv: Add the prologue generation and register the
JIT")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/riscv/tcg-target.c.inc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc
index d6dbcaf3cb..dc71f829d1 100644
--- a/tcg/riscv/tcg-target.c.inc
+++ b/tcg/riscv/tcg-target.c.inc
@@ -2076,8 +2076,10 @@ static void tcg_target_qemu_prologue(TCGContext *s)
}
#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);
+ if (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);
+ }
#endif
/* Call generated code */
--
2.34.1
- [PULL 09/29] tcg/ppc: Use prefixed instructions in tcg_out_mem_long, (continued)
- [PULL 09/29] tcg/ppc: Use prefixed instructions in tcg_out_mem_long, Richard Henderson, 2023/10/18
- [PULL 08/29] tcg/ppc: Use PADDI in tcg_out_movi, Richard Henderson, 2023/10/18
- [PULL 10/29] tcg/ppc: Use PLD in tcg_out_movi for constant pool, Richard Henderson, 2023/10/18
- [PULL 11/29] tcg/ppc: Use prefixed instructions in tcg_out_dupi_vec, Richard Henderson, 2023/10/18
- [PULL 12/29] tcg/ppc: Use PLD in tcg_out_goto_tb, Richard Henderson, 2023/10/18
- [PULL 13/29] tcg/ppc: Disable TCG_REG_TB for Power9/Power10, Richard Henderson, 2023/10/18
- [PULL 14/29] tcg: Introduce tcg_use_softmmu, Richard Henderson, 2023/10/18
- [PULL 17/29] tcg/aarch64: Use tcg_use_softmmu, Richard Henderson, 2023/10/18
- [PULL 20/29] tcg/mips: Use tcg_use_softmmu, Richard Henderson, 2023/10/18
- [PULL 19/29] tcg/loongarch64: Use tcg_use_softmmu, Richard Henderson, 2023/10/18
- [PULL 22/29] tcg/riscv: Do not reserve TCG_GUEST_BASE_REG for guest_base zero,
Richard Henderson <=
- [PULL 21/29] tcg/ppc: Use tcg_use_softmmu, Richard Henderson, 2023/10/18
- [PULL 15/29] tcg: Provide guest_base fallback for system mode, Richard Henderson, 2023/10/18
- [PULL 16/29] tcg/arm: Use tcg_use_softmmu, Richard Henderson, 2023/10/18
- [PULL 25/29] tcg: drop unused tcg_temp_free define, Richard Henderson, 2023/10/18
- [PULL 18/29] tcg/i386: Use tcg_use_softmmu, Richard Henderson, 2023/10/18
- [PULL 26/29] tcg: Use constant zero when expanding with divu2, Richard Henderson, 2023/10/18
- [PULL 27/29] tcg: Optimize past conditional branches, Richard Henderson, 2023/10/18
- [PULL 24/29] tcg/s390x: Use tcg_use_softmmu, Richard Henderson, 2023/10/18
- [PULL 28/29] tcg: Add tcg_gen_{ld,st}_i128, Richard Henderson, 2023/10/18