5544c1b
From 23ff6fa6a883d210aab33e09d0bb9470df5083fc Mon Sep 17 00:00:00 2001
5544c1b
From: Blue Swirl <blauwirbel@gmail.com>
5544c1b
Date: Sun, 2 Sep 2012 07:42:33 +0000
5544c1b
Subject: [PATCH] target-unicore32: switch to AREG0 free mode
5544c1b
5544c1b
Add an explicit CPUState parameter instead of relying on AREG0
5544c1b
and switch to AREG0 free mode.
5544c1b
5544c1b
Tested-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
5544c1b
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
5544c1b
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1b
---
5544c1b
 configure                      |  2 +-
5544c1b
 target-unicore32/Makefile.objs |  2 --
5544c1b
 target-unicore32/helper.h      | 26 ++++++++---------
5544c1b
 target-unicore32/op_helper.c   | 65 ++++++++++++++++--------------------------
5544c1b
 target-unicore32/translate.c   | 38 ++++++++++++------------
5544c1b
 5 files changed, 58 insertions(+), 75 deletions(-)
5544c1b
5544c1b
diff --git a/configure b/configure
5544c1b
index af03942..a8827ba 100755
5544c1b
--- a/configure
5544c1b
+++ b/configure
5544c1b
@@ -3839,7 +3839,7 @@ symlink "$source_path/Makefile.target" "$target_dir/Makefile"
5544c1b
 
5544c1b
 
5544c1b
 case "$target_arch2" in
5544c1b
-  alpha | i386 | lm32 | m68k | or32 | s390x | sparc* | x86_64 | xtensa* | ppc*)
5544c1b
+  alpha | i386 | lm32 | m68k | or32 | s390x | sparc* | unicore32 | x86_64 | xtensa* | ppc*)
5544c1b
     echo "CONFIG_TCG_PASS_AREG0=y" >> $config_target_mak
5544c1b
   ;;
5544c1b
 esac
5544c1b
diff --git a/target-unicore32/Makefile.objs b/target-unicore32/Makefile.objs
5544c1b
index 777f01f..8e143da 100644
5544c1b
--- a/target-unicore32/Makefile.objs
5544c1b
+++ b/target-unicore32/Makefile.objs
5544c1b
@@ -2,5 +2,3 @@ obj-y += translate.o op_helper.o helper.o cpu.o
5544c1b
 obj-y += ucf64_helper.o
5544c1b
 
5544c1b
 obj-$(CONFIG_SOFTMMU) += machine.o softmmu.o
5544c1b
-
5544c1b
-$(obj)/op_helper.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
5544c1b
diff --git a/target-unicore32/helper.h b/target-unicore32/helper.h
5544c1b
index 305318a..a4b8149 100644
5544c1b
--- a/target-unicore32/helper.h
5544c1b
+++ b/target-unicore32/helper.h
5544c1b
@@ -17,26 +17,26 @@ DEF_HELPER_1(cp1_putc, void, i32)
5544c1b
 DEF_HELPER_1(clz, i32, i32)
5544c1b
 DEF_HELPER_1(clo, i32, i32)
5544c1b
 
5544c1b
-DEF_HELPER_1(exception, void, i32)
5544c1b
+DEF_HELPER_2(exception, void, env, i32)
5544c1b
 
5544c1b
-DEF_HELPER_2(asr_write, void, i32, i32)
5544c1b
-DEF_HELPER_0(asr_read, i32)
5544c1b
+DEF_HELPER_3(asr_write, void, env, i32, i32)
5544c1b
+DEF_HELPER_1(asr_read, i32, env)
5544c1b
 
5544c1b
-DEF_HELPER_1(get_user_reg, i32, i32)
5544c1b
-DEF_HELPER_2(set_user_reg, void, i32, i32)
5544c1b
+DEF_HELPER_2(get_user_reg, i32, env, i32)
5544c1b
+DEF_HELPER_3(set_user_reg, void, env, i32, i32)
5544c1b
 
5544c1b
-DEF_HELPER_2(add_cc, i32, i32, i32)
5544c1b
-DEF_HELPER_2(adc_cc, i32, i32, i32)
5544c1b
-DEF_HELPER_2(sub_cc, i32, i32, i32)
5544c1b
-DEF_HELPER_2(sbc_cc, i32, i32, i32)
5544c1b
+DEF_HELPER_3(add_cc, i32, env, i32, i32)
5544c1b
+DEF_HELPER_3(adc_cc, i32, env, i32, i32)
5544c1b
+DEF_HELPER_3(sub_cc, i32, env, i32, i32)
5544c1b
+DEF_HELPER_3(sbc_cc, i32, env, i32, i32)
5544c1b
 
5544c1b
 DEF_HELPER_2(shl, i32, i32, i32)
5544c1b
 DEF_HELPER_2(shr, i32, i32, i32)
5544c1b
 DEF_HELPER_2(sar, i32, i32, i32)
5544c1b
-DEF_HELPER_2(shl_cc, i32, i32, i32)
5544c1b
-DEF_HELPER_2(shr_cc, i32, i32, i32)
5544c1b
-DEF_HELPER_2(sar_cc, i32, i32, i32)
5544c1b
-DEF_HELPER_2(ror_cc, i32, i32, i32)
5544c1b
+DEF_HELPER_3(shl_cc, i32, env, i32, i32)
5544c1b
+DEF_HELPER_3(shr_cc, i32, env, i32, i32)
5544c1b
+DEF_HELPER_3(sar_cc, i32, env, i32, i32)
5544c1b
+DEF_HELPER_3(ror_cc, i32, env, i32, i32)
5544c1b
 
5544c1b
 DEF_HELPER_1(ucf64_get_fpscr, i32, env)
5544c1b
 DEF_HELPER_2(ucf64_set_fpscr, void, env, i32)
5544c1b
diff --git a/target-unicore32/op_helper.c b/target-unicore32/op_helper.c
5544c1b
index c63789d..f474d1b 100644
5544c1b
--- a/target-unicore32/op_helper.c
5544c1b
+++ b/target-unicore32/op_helper.c
5544c1b
@@ -9,19 +9,18 @@
5544c1b
  * later version. See the COPYING file in the top-level directory.
5544c1b
  */
5544c1b
 #include "cpu.h"
5544c1b
-#include "dyngen-exec.h"
5544c1b
 #include "helper.h"
5544c1b
 
5544c1b
 #define SIGNBIT (uint32_t)0x80000000
5544c1b
 #define SIGNBIT64 ((uint64_t)1 << 63)
5544c1b
 
5544c1b
-void HELPER(exception)(uint32_t excp)
5544c1b
+void HELPER(exception)(CPUUniCore32State *env, uint32_t excp)
5544c1b
 {
5544c1b
     env->exception_index = excp;
5544c1b
     cpu_loop_exit(env);
5544c1b
 }
5544c1b
 
5544c1b
-static target_ulong asr_read(void)
5544c1b
+static target_ulong asr_read(CPUUniCore32State *env)
5544c1b
 {
5544c1b
     int ZF;
5544c1b
     ZF = (env->ZF == 0);
5544c1b
@@ -29,24 +28,18 @@ static target_ulong asr_read(void)
5544c1b
         (env->CF << 29) | ((env->VF & 0x80000000) >> 3);
5544c1b
 }
5544c1b
 
5544c1b
-target_ulong cpu_asr_read(CPUUniCore32State *env1)
5544c1b
+target_ulong cpu_asr_read(CPUUniCore32State *env)
5544c1b
 {
5544c1b
-    CPUUniCore32State *saved_env;
5544c1b
-    target_ulong ret;
5544c1b
-
5544c1b
-    saved_env = env;
5544c1b
-    env = env1;
5544c1b
-    ret = asr_read();
5544c1b
-    env = saved_env;
5544c1b
-    return ret;
5544c1b
+    return asr_read(env);
5544c1b
 }
5544c1b
 
5544c1b
-target_ulong HELPER(asr_read)(void)
5544c1b
+target_ulong HELPER(asr_read)(CPUUniCore32State *env)
5544c1b
 {
5544c1b
-    return asr_read();
5544c1b
+    return asr_read(env);
5544c1b
 }
5544c1b
 
5544c1b
-static void asr_write(target_ulong val, target_ulong mask)
5544c1b
+static void asr_write(CPUUniCore32State *env, target_ulong val,
5544c1b
+                      target_ulong mask)
5544c1b
 {
5544c1b
     if (mask & ASR_NZCV) {
5544c1b
         env->ZF = (~val) & ASR_Z;
5544c1b
@@ -62,23 +55,19 @@ static void asr_write(target_ulong val, target_ulong mask)
5544c1b
     env->uncached_asr = (env->uncached_asr & ~mask) | (val & mask);
5544c1b
 }
5544c1b
 
5544c1b
-void cpu_asr_write(CPUUniCore32State *env1, target_ulong val, target_ulong mask)
5544c1b
+void cpu_asr_write(CPUUniCore32State *env, target_ulong val, target_ulong mask)
5544c1b
 {
5544c1b
-    CPUUniCore32State *saved_env;
5544c1b
-
5544c1b
-    saved_env = env;
5544c1b
-    env = env1;
5544c1b
-    asr_write(val, mask);
5544c1b
-    env = saved_env;
5544c1b
+    asr_write(env, val, mask);
5544c1b
 }
5544c1b
 
5544c1b
-void HELPER(asr_write)(target_ulong val, target_ulong mask)
5544c1b
+void HELPER(asr_write)(CPUUniCore32State *env, target_ulong val,
5544c1b
+                       target_ulong mask)
5544c1b
 {
5544c1b
-    asr_write(val, mask);
5544c1b
+    asr_write(env, val, mask);
5544c1b
 }
5544c1b
 
5544c1b
 /* Access to user mode registers from privileged modes.  */
5544c1b
-uint32_t HELPER(get_user_reg)(uint32_t regno)
5544c1b
+uint32_t HELPER(get_user_reg)(CPUUniCore32State *env, uint32_t regno)
5544c1b
 {
5544c1b
     uint32_t val;
5544c1b
 
5544c1b
@@ -92,7 +81,7 @@ uint32_t HELPER(get_user_reg)(uint32_t regno)
5544c1b
     return val;
5544c1b
 }
5544c1b
 
5544c1b
-void HELPER(set_user_reg)(uint32_t regno, uint32_t val)
5544c1b
+void HELPER(set_user_reg)(CPUUniCore32State *env, uint32_t regno, uint32_t val)
5544c1b
 {
5544c1b
     if (regno == 29) {
5544c1b
         env->banked_r29[0] = val;
5544c1b
@@ -107,7 +96,7 @@ void HELPER(set_user_reg)(uint32_t regno, uint32_t val)
5544c1b
    The only way to do that in TCG is a conditional branch, which clobbers
5544c1b
    all our temporaries.  For now implement these as helper functions.  */
5544c1b
 
5544c1b
-uint32_t HELPER(add_cc)(uint32_t a, uint32_t b)
5544c1b
+uint32_t HELPER(add_cc)(CPUUniCore32State *env, uint32_t a, uint32_t b)
5544c1b
 {
5544c1b
     uint32_t result;
5544c1b
     result = a + b;
5544c1b
@@ -117,7 +106,7 @@ uint32_t HELPER(add_cc)(uint32_t a, uint32_t b)
5544c1b
     return result;
5544c1b
 }
5544c1b
 
5544c1b
-uint32_t HELPER(adc_cc)(uint32_t a, uint32_t b)
5544c1b
+uint32_t HELPER(adc_cc)(CPUUniCore32State *env, uint32_t a, uint32_t b)
5544c1b
 {
5544c1b
     uint32_t result;
5544c1b
     if (!env->CF) {
5544c1b
@@ -132,7 +121,7 @@ uint32_t HELPER(adc_cc)(uint32_t a, uint32_t b)
5544c1b
     return result;
5544c1b
 }
5544c1b
 
5544c1b
-uint32_t HELPER(sub_cc)(uint32_t a, uint32_t b)
5544c1b
+uint32_t HELPER(sub_cc)(CPUUniCore32State *env, uint32_t a, uint32_t b)
5544c1b
 {
5544c1b
     uint32_t result;
5544c1b
     result = a - b;
5544c1b
@@ -142,7 +131,7 @@ uint32_t HELPER(sub_cc)(uint32_t a, uint32_t b)
5544c1b
     return result;
5544c1b
 }
5544c1b
 
5544c1b
-uint32_t HELPER(sbc_cc)(uint32_t a, uint32_t b)
5544c1b
+uint32_t HELPER(sbc_cc)(CPUUniCore32State *env, uint32_t a, uint32_t b)
5544c1b
 {
5544c1b
     uint32_t result;
5544c1b
     if (!env->CF) {
5544c1b
@@ -186,7 +175,7 @@ uint32_t HELPER(sar)(uint32_t x, uint32_t i)
5544c1b
     return (int32_t)x >> shift;
5544c1b
 }
5544c1b
 
5544c1b
-uint32_t HELPER(shl_cc)(uint32_t x, uint32_t i)
5544c1b
+uint32_t HELPER(shl_cc)(CPUUniCore32State *env, uint32_t x, uint32_t i)
5544c1b
 {
5544c1b
     int shift = i & 0xff;
5544c1b
     if (shift >= 32) {
5544c1b
@@ -203,7 +192,7 @@ uint32_t HELPER(shl_cc)(uint32_t x, uint32_t i)
5544c1b
     return x;
5544c1b
 }
5544c1b
 
5544c1b
-uint32_t HELPER(shr_cc)(uint32_t x, uint32_t i)
5544c1b
+uint32_t HELPER(shr_cc)(CPUUniCore32State *env, uint32_t x, uint32_t i)
5544c1b
 {
5544c1b
     int shift = i & 0xff;
5544c1b
     if (shift >= 32) {
5544c1b
@@ -220,7 +209,7 @@ uint32_t HELPER(shr_cc)(uint32_t x, uint32_t i)
5544c1b
     return x;
5544c1b
 }
5544c1b
 
5544c1b
-uint32_t HELPER(sar_cc)(uint32_t x, uint32_t i)
5544c1b
+uint32_t HELPER(sar_cc)(CPUUniCore32State *env, uint32_t x, uint32_t i)
5544c1b
 {
5544c1b
     int shift = i & 0xff;
5544c1b
     if (shift >= 32) {
5544c1b
@@ -233,7 +222,7 @@ uint32_t HELPER(sar_cc)(uint32_t x, uint32_t i)
5544c1b
     return x;
5544c1b
 }
5544c1b
 
5544c1b
-uint32_t HELPER(ror_cc)(uint32_t x, uint32_t i)
5544c1b
+uint32_t HELPER(ror_cc)(CPUUniCore32State *env, uint32_t x, uint32_t i)
5544c1b
 {
5544c1b
     int shift1, shift;
5544c1b
     shift1 = i & 0xff;
5544c1b
@@ -264,16 +253,13 @@ uint32_t HELPER(ror_cc)(uint32_t x, uint32_t i)
5544c1b
 #define SHIFT 3
5544c1b
 #include "softmmu_template.h"
5544c1b
 
5544c1b
-void tlb_fill(CPUUniCore32State *env1, target_ulong addr, int is_write,
5544c1b
-        int mmu_idx, uintptr_t retaddr)
5544c1b
+void tlb_fill(CPUUniCore32State *env, target_ulong addr, int is_write,
5544c1b
+              int mmu_idx, uintptr_t retaddr)
5544c1b
 {
5544c1b
     TranslationBlock *tb;
5544c1b
-    CPUUniCore32State *saved_env;
5544c1b
     unsigned long pc;
5544c1b
     int ret;
5544c1b
 
5544c1b
-    saved_env = env;
5544c1b
-    env = env1;
5544c1b
     ret = uc32_cpu_handle_mmu_fault(env, addr, is_write, mmu_idx);
5544c1b
     if (unlikely(ret)) {
5544c1b
         if (retaddr) {
5544c1b
@@ -287,6 +273,5 @@ void tlb_fill(CPUUniCore32State *env1, target_ulong addr, int is_write,
5544c1b
         }
5544c1b
         cpu_loop_exit(env);
5544c1b
     }
5544c1b
-    env = saved_env;
5544c1b
 }
5544c1b
 #endif
5544c1b
diff --git a/target-unicore32/translate.c b/target-unicore32/translate.c
5544c1b
index 188bf8c..b786a6b 100644
5544c1b
--- a/target-unicore32/translate.c
5544c1b
+++ b/target-unicore32/translate.c
5544c1b
@@ -253,7 +253,7 @@ static void disas_ocd_insn(CPUUniCore32State *env, DisasContext *s,
5544c1b
 static inline void gen_set_asr(TCGv var, uint32_t mask)
5544c1b
 {
5544c1b
     TCGv tmp_mask = tcg_const_i32(mask);
5544c1b
-    gen_helper_asr_write(var, tmp_mask);
5544c1b
+    gen_helper_asr_write(cpu_env, var, tmp_mask);
5544c1b
     tcg_temp_free_i32(tmp_mask);
5544c1b
 }
5544c1b
 /* Set NZCV flags from the high 4 bits of var.  */
5544c1b
@@ -263,7 +263,7 @@ static void gen_exception(int excp)
5544c1b
 {
5544c1b
     TCGv tmp = new_tmp();
5544c1b
     tcg_gen_movi_i32(tmp, excp);
5544c1b
-    gen_helper_exception(tmp);
5544c1b
+    gen_helper_exception(cpu_env, tmp);
5544c1b
     dead_tmp(tmp);
5544c1b
 }
5544c1b
 
5544c1b
@@ -416,16 +416,16 @@ static inline void gen_uc32_shift_reg(TCGv var, int shiftop,
5544c1b
     if (flags) {
5544c1b
         switch (shiftop) {
5544c1b
         case 0:
5544c1b
-            gen_helper_shl_cc(var, var, shift);
5544c1b
+            gen_helper_shl_cc(var, cpu_env, var, shift);
5544c1b
             break;
5544c1b
         case 1:
5544c1b
-            gen_helper_shr_cc(var, var, shift);
5544c1b
+            gen_helper_shr_cc(var, cpu_env, var, shift);
5544c1b
             break;
5544c1b
         case 2:
5544c1b
-            gen_helper_sar_cc(var, var, shift);
5544c1b
+            gen_helper_sar_cc(var, cpu_env, var, shift);
5544c1b
             break;
5544c1b
         case 3:
5544c1b
-            gen_helper_ror_cc(var, var, shift);
5544c1b
+            gen_helper_ror_cc(var, cpu_env, var, shift);
5544c1b
             break;
5544c1b
         }
5544c1b
     } else {
5544c1b
@@ -1323,11 +1323,11 @@ static void do_datap(CPUUniCore32State *env, DisasContext *s, uint32_t insn)
5544c1b
             if (IS_USER(s)) {
5544c1b
                 ILLEGAL;
5544c1b
             }
5544c1b
-            gen_helper_sub_cc(tmp, tmp, tmp2);
5544c1b
+            gen_helper_sub_cc(tmp, cpu_env, tmp, tmp2);
5544c1b
             gen_exception_return(s, tmp);
5544c1b
         } else {
5544c1b
             if (UCOP_SET_S) {
5544c1b
-                gen_helper_sub_cc(tmp, tmp, tmp2);
5544c1b
+                gen_helper_sub_cc(tmp, cpu_env, tmp, tmp2);
5544c1b
             } else {
5544c1b
                 tcg_gen_sub_i32(tmp, tmp, tmp2);
5544c1b
             }
5544c1b
@@ -1336,7 +1336,7 @@ static void do_datap(CPUUniCore32State *env, DisasContext *s, uint32_t insn)
5544c1b
         break;
5544c1b
     case 0x03:
5544c1b
         if (UCOP_SET_S) {
5544c1b
-            gen_helper_sub_cc(tmp, tmp2, tmp);
5544c1b
+            gen_helper_sub_cc(tmp, cpu_env, tmp2, tmp);
5544c1b
         } else {
5544c1b
             tcg_gen_sub_i32(tmp, tmp2, tmp);
5544c1b
         }
5544c1b
@@ -1344,7 +1344,7 @@ static void do_datap(CPUUniCore32State *env, DisasContext *s, uint32_t insn)
5544c1b
         break;
5544c1b
     case 0x04:
5544c1b
         if (UCOP_SET_S) {
5544c1b
-            gen_helper_add_cc(tmp, tmp, tmp2);
5544c1b
+            gen_helper_add_cc(tmp, cpu_env, tmp, tmp2);
5544c1b
         } else {
5544c1b
             tcg_gen_add_i32(tmp, tmp, tmp2);
5544c1b
         }
5544c1b
@@ -1352,7 +1352,7 @@ static void do_datap(CPUUniCore32State *env, DisasContext *s, uint32_t insn)
5544c1b
         break;
5544c1b
     case 0x05:
5544c1b
         if (UCOP_SET_S) {
5544c1b
-            gen_helper_adc_cc(tmp, tmp, tmp2);
5544c1b
+            gen_helper_adc_cc(tmp, cpu_env, tmp, tmp2);
5544c1b
         } else {
5544c1b
             gen_add_carry(tmp, tmp, tmp2);
5544c1b
         }
5544c1b
@@ -1360,7 +1360,7 @@ static void do_datap(CPUUniCore32State *env, DisasContext *s, uint32_t insn)
5544c1b
         break;
5544c1b
     case 0x06:
5544c1b
         if (UCOP_SET_S) {
5544c1b
-            gen_helper_sbc_cc(tmp, tmp, tmp2);
5544c1b
+            gen_helper_sbc_cc(tmp, cpu_env, tmp, tmp2);
5544c1b
         } else {
5544c1b
             gen_sub_carry(tmp, tmp, tmp2);
5544c1b
         }
5544c1b
@@ -1368,7 +1368,7 @@ static void do_datap(CPUUniCore32State *env, DisasContext *s, uint32_t insn)
5544c1b
         break;
5544c1b
     case 0x07:
5544c1b
         if (UCOP_SET_S) {
5544c1b
-            gen_helper_sbc_cc(tmp, tmp2, tmp);
5544c1b
+            gen_helper_sbc_cc(tmp, cpu_env, tmp2, tmp);
5544c1b
         } else {
5544c1b
             gen_sub_carry(tmp, tmp2, tmp);
5544c1b
         }
5544c1b
@@ -1390,13 +1390,13 @@ static void do_datap(CPUUniCore32State *env, DisasContext *s, uint32_t insn)
5544c1b
         break;
5544c1b
     case 0x0a:
5544c1b
         if (UCOP_SET_S) {
5544c1b
-            gen_helper_sub_cc(tmp, tmp, tmp2);
5544c1b
+            gen_helper_sub_cc(tmp, cpu_env, tmp, tmp2);
5544c1b
         }
5544c1b
         dead_tmp(tmp);
5544c1b
         break;
5544c1b
     case 0x0b:
5544c1b
         if (UCOP_SET_S) {
5544c1b
-            gen_helper_add_cc(tmp, tmp, tmp2);
5544c1b
+            gen_helper_add_cc(tmp, cpu_env, tmp, tmp2);
5544c1b
         }
5544c1b
         dead_tmp(tmp);
5544c1b
         break;
5544c1b
@@ -1536,7 +1536,7 @@ static void do_misc(CPUUniCore32State *env, DisasContext *s, uint32_t insn)
5544c1b
             tmp = load_cpu_field(bsr);
5544c1b
         } else {
5544c1b
             tmp = new_tmp();
5544c1b
-            gen_helper_asr_read(tmp);
5544c1b
+            gen_helper_asr_read(tmp, cpu_env);
5544c1b
         }
5544c1b
         store_reg(s, UCOP_REG_D, tmp);
5544c1b
         return;
5544c1b
@@ -1760,7 +1760,7 @@ static void do_ldst_m(CPUUniCore32State *env, DisasContext *s, uint32_t insn)
5544c1b
                     gen_bx(s, tmp);
5544c1b
                 } else if (user) {
5544c1b
                     tmp2 = tcg_const_i32(reg);
5544c1b
-                    gen_helper_set_user_reg(tmp2, tmp);
5544c1b
+                    gen_helper_set_user_reg(cpu_env, tmp2, tmp);
5544c1b
                     tcg_temp_free_i32(tmp2);
5544c1b
                     dead_tmp(tmp);
5544c1b
                 } else if (reg == UCOP_REG_N) {
5544c1b
@@ -1778,7 +1778,7 @@ static void do_ldst_m(CPUUniCore32State *env, DisasContext *s, uint32_t insn)
5544c1b
                 } else if (user) {
5544c1b
                     tmp = new_tmp();
5544c1b
                     tmp2 = tcg_const_i32(reg);
5544c1b
-                    gen_helper_get_user_reg(tmp, tmp2);
5544c1b
+                    gen_helper_get_user_reg(tmp, cpu_env, tmp2);
5544c1b
                     tcg_temp_free_i32(tmp2);
5544c1b
                 } else {
5544c1b
                     tmp = load_reg(s, reg);
5544c1b
@@ -1861,7 +1861,7 @@ static void disas_uc32_insn(CPUUniCore32State *env, DisasContext *s)
5544c1b
 {
5544c1b
     unsigned int insn;
5544c1b
 
5544c1b
-    insn = ldl_code(s->pc);
5544c1b
+    insn = cpu_ldl_code(env, s->pc);
5544c1b
     s->pc += 4;
5544c1b
 
5544c1b
     /* UniCore instructions class:
5544c1b
-- 
5544c1b
1.7.12.1
5544c1b