log_pc() is only used in cpu-exec.c, move it there.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
accel/tcg/internal-target.h | 10 ----------
accel/tcg/cpu-exec.c | 10 ++++++++++
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h
index fe109724c6..750b3706b1 100644
--- a/accel/tcg/internal-target.h
+++ b/accel/tcg/internal-target.h
@@ -71,16 +71,6 @@ G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr);
bool tb_invalidate_phys_page_unwind(tb_page_addr_t addr, uintptr_t pc);
-/* Return the current PC from CPU, which may be cached in TB. */
-static inline vaddr log_pc(CPUState *cpu, const TranslationBlock *tb)
-{
- if (tb_cflags(tb) & CF_PCREL) {
- return cpu->cc->get_pc(cpu);
- } else {
- return tb->pc;
- }
-}
-
/**
* tcg_req_mo:
* @type: TCGBar
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 033f5fab10..73bc9f00f7 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -433,6 +433,16 @@ const void *HELPER(lookup_tb_ptr)(CPUArchState *env)
return tb->tc.ptr;
}
+/* Return the current PC from CPU, which may be cached in TB. */
+static inline vaddr log_pc(CPUState *cpu, const TranslationBlock *tb)
+{
+ if (tb_cflags(tb) & CF_PCREL) {
+ return cpu->cc->get_pc(cpu);
+ } else {
+ return tb->pc;
+ }
+}
+
/* Execute a TB, and fix up the CPU state afterwards if necessary */
/*
* Disable CFI checks.
--
2.45.2