]> git.proxmox.com Git - mirror_qemu.git/commitdiff
accel/tcg: Hide in_same_page outside of a target-specific context
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 5 Apr 2024 01:56:39 +0000 (15:56 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 15 May 2024 06:54:32 +0000 (08:54 +0200)
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é <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
include/exec/translator.h

index 51489c181ce61c3b68dd7c8e1c69ae02aa6584ef..212362f5a0c4459d510a6f7fb8c9716ffa2df011 100644 (file)
@@ -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 */