qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 15/23] target/cris: Use MMU_INDEX() helper


From: Helge Deller
Subject: [PATCH v2 15/23] target/cris: Use MMU_INDEX() helper
Date: Sun, 6 Aug 2023 14:17:24 +0200

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/cris/cpu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/cris/cpu.h b/target/cris/cpu.h
index 8e37c6e50d..4064a16564 100644
--- a/target/cris/cpu.h
+++ b/target/cris/cpu.h
@@ -248,10 +248,10 @@ enum {
 #define CPU_RESOLVING_TYPE TYPE_CRIS_CPU

 /* MMU modes definitions */
-#define MMU_USER_IDX 1
+#define MMU_USER_IDX MMU_INDEX(1)
 static inline int cpu_mmu_index (CPUCRISState *env, bool ifetch)
 {
-       return !!(env->pregs[PR_CCS] & U_FLAG);
+       return MMU_INDEX(!!(env->pregs[PR_CCS] & U_FLAG));
 }

 /* Support function regs.  */
--
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]