1 /* Common softmmu definitions and inline routines. */
3 /* XXX: find something cleaner.
4 * Furthermore, this is false for 64 bits targets
6 #define ldul_user ldl_user
7 #define ldul_kernel ldl_kernel
8 #define ldul_hypv ldl_hypv
9 #define ldul_executive ldl_executive
10 #define ldul_supervisor ldl_supervisor
12 #include "softmmu_defs.h"
15 #define MEMSUFFIX MMU_MODE0_SUFFIX
17 #include "softmmu_header.h"
20 #include "softmmu_header.h"
23 #include "softmmu_header.h"
26 #include "softmmu_header.h"
31 #define MEMSUFFIX MMU_MODE1_SUFFIX
33 #include "softmmu_header.h"
36 #include "softmmu_header.h"
39 #include "softmmu_header.h"
42 #include "softmmu_header.h"
46 #if (NB_MMU_MODES >= 3)
49 #define MEMSUFFIX MMU_MODE2_SUFFIX
51 #include "softmmu_header.h"
54 #include "softmmu_header.h"
57 #include "softmmu_header.h"
60 #include "softmmu_header.h"
64 #if (NB_MMU_MODES >= 4)
67 #define MEMSUFFIX MMU_MODE3_SUFFIX
69 #include "softmmu_header.h"
72 #include "softmmu_header.h"
75 #include "softmmu_header.h"
78 #include "softmmu_header.h"
82 #if (NB_MMU_MODES > 4)
83 #error "NB_MMU_MODES > 4 is not supported for now"
84 #endif /* (NB_MMU_MODES > 4) */
85 #endif /* (NB_MMU_MODES == 4) */
86 #endif /* (NB_MMU_MODES >= 3) */
88 /* these access are slower, they must be as rare as possible */
89 #define ACCESS_TYPE (NB_MMU_MODES)
90 #define MEMSUFFIX _data
92 #include "softmmu_header.h"
95 #include "softmmu_header.h"
98 #include "softmmu_header.h"
101 #include "softmmu_header.h"
105 #define ldub(p) ldub_data(p)
106 #define ldsb(p) ldsb_data(p)
107 #define lduw(p) lduw_data(p)
108 #define ldsw(p) ldsw_data(p)
109 #define ldl(p) ldl_data(p)
110 #define ldq(p) ldq_data(p)
112 #define stb(p, v) stb_data(p, v)
113 #define stw(p, v) stw_data(p, v)
114 #define stl(p, v) stl_data(p, v)
115 #define stq(p, v) stq_data(p, v)