summary refs log tree commit diff stats
path: root/target/sh4/op_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/sh4/op_helper.c')
-rw-r--r--target/sh4/op_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c
index a663335c39..ada41ba0a2 100644
--- a/target/sh4/op_helper.c
+++ b/target/sh4/op_helper.c
@@ -29,7 +29,7 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
                                     MMUAccessType access_type,
                                     int mmu_idx, uintptr_t retaddr)
 {
-    CPUSH4State *env = cs->env_ptr;
+    CPUSH4State *env = cpu_env(cs);
 
     env->tea = addr;
     switch (access_type) {