diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index c964ca4f0b2fab1d5dfdd352d5f53799cddf2a82..8223fbf246eec082c1f1dfb445992f9b8d133164 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -351,6 +351,7 @@ uint64_t helper_ldq_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx); #define ACCESS_TYPE (NB_MMU_MODES + 1) #define MEMSUFFIX _code +#define SOFTMMU_CODE_ACCESS #define DATA_SIZE 1 #include "exec/softmmu_header.h" @@ -366,6 +367,7 @@ uint64_t helper_ldq_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx); #undef ACCESS_TYPE #undef MEMSUFFIX +#undef SOFTMMU_CODE_ACCESS #endif diff --git a/include/exec/softmmu_header.h b/include/exec/softmmu_header.h index d8d9c81b054977b7d84585c14ba4587eaaa1b647..087b2d4e1ee107092a63d2730c4f33c5b17aab5e 100644 --- a/include/exec/softmmu_header.h +++ b/include/exec/softmmu_header.h @@ -72,7 +72,7 @@ #define RES_TYPE uint32_t #endif -#if ACCESS_TYPE == (NB_MMU_MODES + 1) +#ifdef SOFTMMU_CODE_ACCESS #define ADDR_READ addr_code #else #define ADDR_READ addr_read @@ -124,7 +124,7 @@ glue(glue(cpu_lds, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr) } #endif -#if ACCESS_TYPE != (NB_MMU_MODES + 1) +#ifndef SOFTMMU_CODE_ACCESS /* generic store macro */ @@ -148,9 +148,7 @@ glue(glue(cpu_st, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr, } } -#endif /* ACCESS_TYPE != (NB_MMU_MODES + 1) */ -#if ACCESS_TYPE != (NB_MMU_MODES + 1) #if DATA_SIZE == 8 static inline float64 glue(cpu_ldfq, MEMSUFFIX)(CPUArchState *env, @@ -200,7 +198,7 @@ static inline void glue(cpu_stfl, MEMSUFFIX)(CPUArchState *env, } #endif /* DATA_SIZE == 4 */ -#endif /* ACCESS_TYPE != (NB_MMU_MODES + 1) */ +#endif /* !SOFTMMU_CODE_ACCESS */ #undef RES_TYPE #undef DATA_TYPE