diff mbox series

[v2,22/23] target/tricore: Use MMU_INDEX() helper

Message ID 20230806121732.91853-23-deller@gmx.de
State New
Headers show
Series Introduce MMU_INDEX() | expand

Commit Message

Helge Deller Aug. 6, 2023, 12:17 p.m. UTC
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 <deller@gmx.de>
---
 target/tricore/cpu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
2.41.0
diff mbox series

Patch

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"