summaryrefslogtreecommitdiffstats
path: root/accel/tcg/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'accel/tcg/internal.h')
-rw-r--r--accel/tcg/internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h
index a3875a3b5a..dc800fd485 100644
--- a/accel/tcg/internal.h
+++ b/accel/tcg/internal.h
@@ -21,7 +21,11 @@ void tb_htable_init(void);
/* Return the current PC from CPU, which may be cached in TB. */
static inline target_ulong log_pc(CPUState *cpu, const TranslationBlock *tb)
{
+#if TARGET_TB_PCREL
+ return cpu->cc->get_pc(cpu);
+#else
return tb_pc(tb);
+#endif
}
#endif /* ACCEL_TCG_INTERNAL_H */