]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tcg: Delete unused cpu_pc_from_tb()
authorPeter Crosthwaite <crosthwaitepeter@gmail.com>
Wed, 29 Apr 2015 07:52:21 +0000 (00:52 -0700)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 30 Apr 2015 13:06:18 +0000 (16:06 +0300)
No code uses the cpu_pc_from_tb() function. Delete from tricore and
arm which each provide an unused implementation. Update the comment
in tcg.h to reflect that this is obsoleted by synchronize_from_tb.

Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target-arm/cpu.h
target-tricore/cpu.h
tcg/tcg.h

index 8df0b6a39c045ef36373744874d01530c23b26c1..d4a589964e35187fdbcbc19b26bf8ef1d15f5921 100644 (file)
@@ -1874,15 +1874,6 @@ static inline void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc,
 
 #include "exec/exec-all.h"
 
-static inline void cpu_pc_from_tb(CPUARMState *env, TranslationBlock *tb)
-{
-    if (ARM_TBFLAG_AARCH64_STATE(tb->flags)) {
-        env->pc = tb->pc;
-    } else {
-        env->regs[15] = tb->pc;
-    }
-}
-
 enum {
     QEMU_PSCI_CONDUIT_DISABLED = 0,
     QEMU_PSCI_CONDUIT_SMC = 1,
index 90bf0069b549aca10d700bd886178f6a3acb79eb..c14b5f9016da4aa5fdb2ce9c02fd3343e629cbe2 100644 (file)
@@ -395,9 +395,4 @@ int cpu_tricore_handle_mmu_fault(CPUState *cpu, target_ulong address,
 
 #include "exec/exec-all.h"
 
-static inline void cpu_pc_from_tb(CPUTriCoreState *env, TranslationBlock *tb)
-{
-    env->PC = tb->pc;
-}
-
 #endif /*__TRICORE_CPU_H__ */
index add7f7524deba12b74bdaaa707d97186388e46f0..3d004ba27662dc1b36a9e62e58c2de8f5d6d8a41 100644 (file)
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -859,8 +859,10 @@ static inline size_t tcg_current_code_size(TCGContext *s)
  * state is correctly synchronised and ready for execution of the next
  * TB (and in particular the guest PC is the address to execute next).
  * Otherwise, we gave up on execution of this TB before it started, and
- * the caller must fix up the CPU state by calling cpu_pc_from_tb()
- * with the next-TB pointer we return.
+ * the caller must fix up the CPU state by calling the CPU's
+ * synchronize_from_tb() method with the next-TB pointer we return (falling
+ * back to calling the CPU's set_pc method with tb->pb if no
+ * synchronize_from_tb() method exists).
  *
  * Note that TCG targets may use a different definition of tcg_qemu_tb_exec
  * to this default (which just calls the prologue.code emitted by