diff mbox series

[v2,25/27] target/avr: Replace `tb_pc()` with `tb->pc`

Message ID 20230221221818.9382-26-anjo@rev.ng (mailing list archive)
State New, archived
Headers show
Series Replace TARGET_TB_PCREL with CF_PCREL | expand

Commit Message

Anton Johansson Feb. 21, 2023, 10:18 p.m. UTC
Signed-off-by: Anton Johansson <anjo@rev.ng>
---
 target/avr/cpu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/target/avr/cpu.c b/target/avr/cpu.c
index d0139804b9..a24c23c247 100644
--- a/target/avr/cpu.c
+++ b/target/avr/cpu.c
@@ -54,7 +54,8 @@  static void avr_cpu_synchronize_from_tb(CPUState *cs,
     AVRCPU *cpu = AVR_CPU(cs);
     CPUAVRState *env = &cpu->env;
 
-    env->pc_w = tb_pc(tb) / 2; /* internally PC points to words */
+    tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL));
+    env->pc_w = tb->pc / 2; /* internally PC points to words */
 }
 
 static void avr_restore_state_to_opc(CPUState *cs,