mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user