summary refs log tree commit diff stats
path: root/accel/tcg/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'accel/tcg/internal.h')
-rw-r--r--accel/tcg/internal.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h
index 130d7fd564..96f198b28b 100644
--- a/accel/tcg/internal.h
+++ b/accel/tcg/internal.h
@@ -57,11 +57,11 @@ void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb,
 /* 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
+    if (tb_cflags(tb) & CF_PCREL) {
+        return cpu->cc->get_pc(cpu);
+    } else {
+        return tb->pc;
+    }
 }
 
 extern int64_t max_delay;