From: Richard Henderson Date: Fri, 5 Apr 2024 01:56:39 +0000 (-1000) Subject: accel/tcg: Hide in_same_page outside of a target-specific context X-Git-Tag: v9.1.0-rc0~106^2~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=66f3b79e85149f42465a580c2530638e27c4a4bb;p=thirdparty%2Fqemu.git accel/tcg: Hide in_same_page outside of a target-specific context While there are other methods that could be used to replace TARGET_PAGE_MASK, the function is not really required outside the context of target-specific translation. This makes the header usable by target independent code. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- diff --git a/include/exec/translator.h b/include/exec/translator.h index 51489c181ce..212362f5a0c 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -232,6 +232,7 @@ translator_ldq_swap(CPUArchState *env, DisasContextBase *db, */ void translator_fake_ldb(uint8_t insn8, vaddr pc); +#ifdef COMPILING_PER_TARGET /* * Return whether addr is on the same page as where disassembly started. * Translators can use this to enforce the rule that only single-insn @@ -241,5 +242,6 @@ static inline bool is_same_page(const DisasContextBase *db, vaddr addr) { return ((addr ^ db->pc_first) & TARGET_PAGE_MASK) == 0; } +#endif #endif /* EXEC__TRANSLATOR_H */