diff mbox series

[02/10] tcg: Provide guest_base fallback for system mode

Message ID 20231003174356.1602279-3-richard.henderson@linaro.org
State Superseded
Headers show
Series tcg: Allow softmmu for user-only | expand

Commit Message

Richard Henderson Oct. 3, 2023, 5:43 p.m. UTC
Provide a define to allow !tcg_use_softmmu code paths to
compile in system mode, but require elimination.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/tcg.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Philippe Mathieu-Daudé Oct. 4, 2023, 6:43 a.m. UTC | #1
On 3/10/23 19:43, Richard Henderson wrote:
> Provide a define to allow !tcg_use_softmmu code paths to
> compile in system mode, but require elimination.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   tcg/tcg.c | 4 ++++
>   1 file changed, 4 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/tcg/tcg.c b/tcg/tcg.c
index e753387690..a841844eba 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -178,6 +178,10 @@  static bool tcg_target_const_match(int64_t val, TCGType type, int ct, int vece);
 static int tcg_out_ldst_finalize(TCGContext *s);
 #endif
 
+#ifndef CONFIG_USER_ONLY
+#define guest_base  ({ qemu_build_not_reached(); (uintptr_t)0; })
+#endif
+
 typedef struct TCGLdstHelperParam {
     TCGReg (*ra_gen)(TCGContext *s, const TCGLabelQemuLdst *l, int arg_reg);
     unsigned ntmp;