aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-11-23 18:05:17 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-12-20 17:44:57 +0100
commita9ca97ea9e582a77629db9af61603b5fddc9ba2c (patch)
tree9ef6ae64640b649dbc4598f8b728f1c536bb8da3 /include
parent68df8c8dba57f539d24f1a92a8699a179d9bb6fb (diff)
downloadqemu-a9ca97ea9e582a77629db9af61603b5fddc9ba2c.zip
qemu-a9ca97ea9e582a77629db9af61603b5fddc9ba2c.tar.gz
qemu-a9ca97ea9e582a77629db9af61603b5fddc9ba2c.tar.bz2
accel/tcg: Un-inline translator_is_same_page()
Remove the single target-specific definition used in "exec/translator.h" (TARGET_PAGE_MASK) by un-inlining is_same_page(). Rename the method as translator_is_same_page() and improve its documentation. Use it in translator_use_goto_tb(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20241218154145.71353-1-philmd@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/exec/translator.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/exec/translator.h b/include/exec/translator.h
index d8dcb77..41e2a41 100644
--- a/include/exec/translator.h
+++ b/include/exec/translator.h
@@ -267,16 +267,15 @@ bool translator_st(const DisasContextBase *db, void *dest,
*/
size_t translator_st_len(const DisasContextBase *db);
-#ifdef COMPILING_PER_TARGET
-/*
- * Return whether addr is on the same page as where disassembly started.
+/**
+ * translator_is_same_page
+ * @db: disassembly context
+ * @addr: virtual address within TB
+ *
+ * Return whether @addr is on the same page as where disassembly started.
* Translators can use this to enforce the rule that only single-insn
* translation blocks are allowed to cross page boundaries.
*/
-static inline bool is_same_page(const DisasContextBase *db, vaddr addr)
-{
- return ((addr ^ db->pc_first) & TARGET_PAGE_MASK) == 0;
-}
-#endif
+bool translator_is_same_page(const DisasContextBase *db, vaddr addr);
#endif /* EXEC__TRANSLATOR_H */