Use the new MMU_INDEX() helper to specify the index of the CPUTLB which
should be used.  Additionally, in a follow-up patch this helper allows
then to optimize the tcg code generation.

Signed-off-by: Helge Deller <del...@gmx.de>
---
 target/tricore/cpu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h
index 3708405be8..6c8ba27737 100644
--- a/target/tricore/cpu.h
+++ b/target/tricore/cpu.h
@@ -366,7 +366,7 @@ int tricore_cpu_gdb_write_register(CPUState *cs, uint8_t 
*mem_buf, int n);

 void fpu_set_state(CPUTriCoreState *env);

-#define MMU_USER_IDX 2
+#define MMU_USER_IDX MMU_INDEX(2)

 void tricore_cpu_list(void);

@@ -374,7 +374,7 @@ void tricore_cpu_list(void);

 static inline int cpu_mmu_index(CPUTriCoreState *env, bool ifetch)
 {
-    return 0;
+    return MMU_INDEX(0);
 }

 #include "exec/cpu-all.h"
--
2.41.0


Reply via email to