[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 30/59] accel/tcg: Un-inline log_pc()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 30/59] accel/tcg: Un-inline log_pc() |
Date: |
Fri, 20 Dec 2024 17:15:21 +0100 |
log_pc() is only used within cpu-exec.c, no need to
expose it via "internal-target.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20241212185341.2857-10-philmd@linaro.org>
---
accel/tcg/internal-target.h | 10 ----------
accel/tcg/cpu-exec.c | 11 +++++++++++
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h
index 6f4ec0bd424..0437d798295 100644
--- a/accel/tcg/internal-target.h
+++ b/accel/tcg/internal-target.h
@@ -72,16 +72,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 f82870a1e2a..396fa6f4a6b 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -21,6 +21,7 @@
#include "qemu/qemu-print.h"
#include "qapi/error.h"
#include "qapi/type-helpers.h"
+#include "hw/core/cpu.h"
#include "hw/core/tcg-cpu-ops.h"
#include "trace.h"
#include "disas/disas.h"
@@ -434,6 +435,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 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.47.1
- [PULL 17/59] exec/cpu-defs: Remove unnecessary headers, (continued)
- [PULL 17/59] exec/cpu-defs: Remove unnecessary headers, Philippe Mathieu-Daudé, 2024/12/20
- [PULL 21/59] target/arm/cpu: Restrict cpu_untagged_addr() to user emulation, Philippe Mathieu-Daudé, 2024/12/20
- [PULL 18/59] exec/translation-block: Include missing 'exec/vaddr.h' header, Philippe Mathieu-Daudé, 2024/12/20
- [PULL 22/59] target/arm/mte: Restrict 'exec/ram_addr.h' to system emulation, Philippe Mathieu-Daudé, 2024/12/20
- [PULL 25/59] accel/tcg: Declare mmap_[un]lock() in 'exec/page-protection.h', Philippe Mathieu-Daudé, 2024/12/20
- [PULL 26/59] accel/tcg: Use tb_page_addr_t type in page_unprotect(), Philippe Mathieu-Daudé, 2024/12/20
- [PULL 20/59] user: Introduce 'user/guest-host.h' header, Philippe Mathieu-Daudé, 2024/12/20
- [PULL 32/59] accel/tcg: Really restrict cpu_io_recompile() to system emulation, Philippe Mathieu-Daudé, 2024/12/20
- [PULL 34/59] accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (2/4), Philippe Mathieu-Daudé, 2024/12/20
- [PULL 29/59] accel/tcg: Move 'exec/translate-all.h' -> 'tb-internal.h', Philippe Mathieu-Daudé, 2024/12/20
- [PULL 30/59] accel/tcg: Un-inline log_pc(),
Philippe Mathieu-Daudé <=
- [PULL 38/59] user: Move 'linux-user/cpu_loop-common.h' -> 'user/cpu_loop.h', Philippe Mathieu-Daudé, 2024/12/20
- [PULL 23/59] exec/ram_addr: Include missing 'exec/hwaddr.h' and 'exec/cpu-common.h', Philippe Mathieu-Daudé, 2024/12/20
- [PULL 24/59] include: Include missing 'qemu/clang-tsa.h' header, Philippe Mathieu-Daudé, 2024/12/20
- [PULL 27/59] accel/tcg: Move page_[un]protect() to 'user/page-protection.h', Philippe Mathieu-Daudé, 2024/12/20
- [PULL 28/59] system: Remove unnecessary 'exec/translate-all.h' include, Philippe Mathieu-Daudé, 2024/12/20
- [PULL 31/59] accel/tcg: Move TranslationBlock declarations to 'tb-internal.h', Philippe Mathieu-Daudé, 2024/12/20
- [PULL 33/59] accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (1/4), Philippe Mathieu-Daudé, 2024/12/20
- [PULL 35/59] accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (3/4), Philippe Mathieu-Daudé, 2024/12/20
- [PULL 36/59] accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (4/4), Philippe Mathieu-Daudé, 2024/12/20
- [PULL 39/59] user: Declare cpu_loop() once in 'user/cpu_loop.h', Philippe Mathieu-Daudé, 2024/12/20