summary refs log tree commit diff stats
path: root/include/exec
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-04-04 15:56:39 -1000
committerRichard Henderson <richard.henderson@linaro.org>2024-05-15 08:54:32 +0200
commit66f3b79e85149f42465a580c2530638e27c4a4bb (patch)
tree224f91b2f831d46f7c2a1048645be4821f2a4d0c /include/exec
parent80189472303e0209deb1c483915df87c0a8310bf (diff)
downloadfocaccia-qemu-66f3b79e85149f42465a580c2530638e27c4a4bb.tar.gz
focaccia-qemu-66f3b79e85149f42465a580c2530638e27c4a4bb.zip
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é <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/translator.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/exec/translator.h b/include/exec/translator.h
index 51489c181c..212362f5a0 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 */