Skip to content

Commit 9d06b0c

Browse files
committed
plugins/api: use qemu_target_page_mask() to get value
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é <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Alex Bennée <[email protected]> Message-Id: <[email protected]>
1 parent 2a8e854 commit 9d06b0c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

plugins/api.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "tcg/tcg.h"
4444
#include "exec/exec-all.h"
4545
#include "exec/gdbstub.h"
46+
#include "exec/target_page.h"
4647
#include "exec/translation-block.h"
4748
#include "exec/translator.h"
4849
#include "disas/disas.h"
@@ -287,7 +288,7 @@ uint64_t qemu_plugin_insn_vaddr(const struct qemu_plugin_insn *insn)
287288
void *qemu_plugin_insn_haddr(const struct qemu_plugin_insn *insn)
288289
{
289290
const DisasContextBase *db = tcg_ctx->plugin_db;
290-
vaddr page0_last = db->pc_first | ~TARGET_PAGE_MASK;
291+
vaddr page0_last = db->pc_first | ~qemu_target_page_mask();
291292

292293
if (db->fake_insn) {
293294
return NULL;

tests/tcg/hexagon/Makefile.target

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Hexagon doesn't support gdb, so skip the EXTRA_RUNS
1919
EXTRA_RUNS =
2020

21-
CFLAGS += -Wno-incompatible-pointer-types -Wno-undefined-internal -Wno-unknown-warning-option
21+
CFLAGS += -Wno-incompatible-pointer-types -Wno-undefined-internal
2222
CFLAGS += -fno-unroll-loops -fno-stack-protector
2323

2424
HEX_SRC=$(SRC_PATH)/tests/tcg/hexagon

tests/tcg/multiarch/Makefile.target

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ sigreturn-sigmask: LDFLAGS+=-pthread
5151
# Since this is just a standard piece of library code we've borrowed for a
5252
# TCG test case, suppress the warning rather than trying to modify the
5353
# code to work around the compiler.
54-
sha1: CFLAGS+=-Wno-stringop-overread
54+
sha1: CFLAGS+=-Wno-stringop-overread -Wno-unknown-warning-option
5555

5656
# The vma-pthread seems very sensitive on gitlab and we currently
5757
# don't know if its exposing a real bug or the test is flaky.

0 commit comments

Comments
 (0)