On 2/25/25 03:08, Alex Bennée wrote:
Requiring TARGET_PAGE_MASK to be defined gets in the way of building
this unit once. As tcg_ctx has the value lets use it.
Signed-off-by: Alex Bennée <alex.ben...@linaro.org>
---
plugins/api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/api.c b/plugins/api.c
index cf8cdf076a..10b258b08d 100644
--- a/plugins/api.c
+++ b/plugins/api.c
@@ -287,7 +287,7 @@ uint64_t qemu_plugin_insn_vaddr(const struct
qemu_plugin_insn *insn)
void *qemu_plugin_insn_haddr(const struct qemu_plugin_insn *insn)
{
const DisasContextBase *db = tcg_ctx->plugin_db;
- vaddr page0_last = db->pc_first | ~TARGET_PAGE_MASK;
+ vaddr page0_last = db->pc_first | ~tcg_ctx->page_mask;
if (db->fake_insn) {
return NULL;
NACK. While this currently happens to work, it's the wrong api. This value is only live
during the compilation cycle, and this part of plugins is not that.
For this, qemu_target_page_mask() is your huckleberry.
r~