[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/33] softmmu: start introducing SOFTMMU_CODE_ACCESS
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 04/33] softmmu: start introducing SOFTMMU_CODE_ACCESS in softmmu_header.h |
Date: |
Thu, 5 Jun 2014 16:21:54 +0200 |
This preprocessor symbol is already used in softmmu_template.h. We
will use it to distinguish the two "fake" ACCESS_TYPEs
NB_MMU_MODES and NB_MMU_MODES + 1.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/exec/exec-all.h | 2 ++
include/exec/softmmu_header.h | 8 +++-----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index c964ca4..8223fbf 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 d8d9c81..087b2d4 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
--
1.8.3.1
- [Qemu-devel] [PULL 00/33] softmmu cleanups and target-i386 paging fixes, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 01/33] cputlb: Fix regression with TCG interpreter (bug 1310324), Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 02/33] nseries: clean up coding style, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 03/33] hw: use ld_p/st_p instead of ld_raw/st_raw, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 04/33] softmmu: start introducing SOFTMMU_CODE_ACCESS in softmmu_header.h,
Paolo Bonzini <=
- [Qemu-devel] [PULL 06/33] softmmu: move definition of CPU_MMU_INDEX to inclusion site, drop ACCESS_TYPE, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 07/33] softmmu: make do_unaligned_access a method of CPU, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 08/33] softmmu: move ALIGNED_ONLY to cpu.h, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 05/33] softmmu: move MMUSUFFIX under SOFTMMU_CODE_ACCESS, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 09/33] softmmu: commonize helper definitions, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 12/33] softmmu: introduce cpu_ldst.h, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 10/33] softmmu: move softmmu_template.h out of include/, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 11/33] target-arm: move arm_*_code to a separate file, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 13/33] softmmu: move all load/store functions to cpu_ldst.h, Paolo Bonzini, 2014/06/05
- [Qemu-devel] [PULL 16/33] target-i386: fix kernel accesses with SMAP and CPL = 3, Paolo Bonzini, 2014/06/05