tcg: Provide guest_base fallback for system mode
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 1 Oct 2023 17:12:32 +0000 (17:12 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 22 Oct 2023 23:32:27 +0000 (16:32 -0700)
Provide a define to allow !tcg_use_softmmu code paths to
compile in system mode, but require elimination.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/tcg.c

index d3a4a17ef2121bb28c420d1e9433ac7ea66f8a7d..35158a0846b82ddf5d19288339f72af400077a81 100644 (file)
--- 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;