]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
plugins/api: use qemu_target_page_mask() to get value
authorAlex Bennée <alex.bennee@linaro.org>
Tue, 4 Mar 2025 22:24:27 +0000 (22:24 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Mon, 10 Mar 2025 10:30:01 +0000 (10:30 +0000)
Requiring TARGET_PAGE_MASK to be defined gets in the way of building
this unit once. qemu_target_page_mask() will tell us what it is.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250304222439.2035603-21-alex.bennee@linaro.org>

plugins/api.c
tests/tcg/hexagon/Makefile.target
tests/tcg/multiarch/Makefile.target

index cf8cdf076a0f31e7c91f399e0a316448e813707e..fa4d4952779ad6928d93bbf5c45aeaf8fa8273ed 100644 (file)
@@ -43,6 +43,7 @@
 #include "tcg/tcg.h"
 #include "exec/exec-all.h"
 #include "exec/gdbstub.h"
+#include "exec/target_page.h"
 #include "exec/translation-block.h"
 #include "exec/translator.h"
 #include "disas/disas.h"
@@ -287,7 +288,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 | ~qemu_target_page_mask();
 
     if (db->fake_insn) {
         return NULL;
index 4dfc39bc98ee464b74cc06ec54a7ee7d0513af21..e5182c01d8a0c537b41d5a280c3d2e9e55cd4cf0 100644 (file)
@@ -18,7 +18,7 @@
 # Hexagon doesn't support gdb, so skip the EXTRA_RUNS
 EXTRA_RUNS =
 
-CFLAGS += -Wno-incompatible-pointer-types -Wno-undefined-internal -Wno-unknown-warning-option
+CFLAGS += -Wno-incompatible-pointer-types -Wno-undefined-internal
 CFLAGS += -fno-unroll-loops -fno-stack-protector
 
 HEX_SRC=$(SRC_PATH)/tests/tcg/hexagon
index c769a7d69d9e7f9edeb17958457211c647a64c6c..45c9cfe18c5bdedba2ef7fb4a2b44d1da9aa878c 100644 (file)
@@ -51,7 +51,7 @@ sigreturn-sigmask: LDFLAGS+=-pthread
 # Since this is just a standard piece of library code we've borrowed for a
 # TCG test case, suppress the warning rather than trying to modify the
 # code to work around the compiler.
-sha1: CFLAGS+=-Wno-stringop-overread
+sha1: CFLAGS+=-Wno-stringop-overread -Wno-unknown-warning-option
 
 # The vma-pthread seems very sensitive on gitlab and we currently
 # don't know if its exposing a real bug or the test is flaky.