4 * Generate inline load/store functions for all MMU modes (typically
5 * at least _user and _kernel) as well as _data versions, for all data
8 * Used by target op helpers.
10 * MMU mode suffixes are defined in target cpu.h.
13 /* XXX: find something cleaner.
14 * Furthermore, this is false for 64 bits targets
16 #define ldul_user ldl_user
17 #define ldul_kernel ldl_kernel
18 #define ldul_hypv ldl_hypv
19 #define ldul_executive ldl_executive
20 #define ldul_supervisor ldl_supervisor
22 #include "softmmu_defs.h"
25 #define MEMSUFFIX MMU_MODE0_SUFFIX
27 #include "softmmu_header.h"
30 #include "softmmu_header.h"
33 #include "softmmu_header.h"
36 #include "softmmu_header.h"
41 #define MEMSUFFIX MMU_MODE1_SUFFIX
43 #include "softmmu_header.h"
46 #include "softmmu_header.h"
49 #include "softmmu_header.h"
52 #include "softmmu_header.h"
56 #if (NB_MMU_MODES >= 3)
59 #define MEMSUFFIX MMU_MODE2_SUFFIX
61 #include "softmmu_header.h"
64 #include "softmmu_header.h"
67 #include "softmmu_header.h"
70 #include "softmmu_header.h"
73 #endif /* (NB_MMU_MODES >= 3) */
75 #if (NB_MMU_MODES >= 4)
78 #define MEMSUFFIX MMU_MODE3_SUFFIX
80 #include "softmmu_header.h"
83 #include "softmmu_header.h"
86 #include "softmmu_header.h"
89 #include "softmmu_header.h"
92 #endif /* (NB_MMU_MODES >= 4) */
94 #if (NB_MMU_MODES >= 5)
97 #define MEMSUFFIX MMU_MODE4_SUFFIX
99 #include "softmmu_header.h"
102 #include "softmmu_header.h"
105 #include "softmmu_header.h"
108 #include "softmmu_header.h"
111 #endif /* (NB_MMU_MODES >= 5) */
113 #if (NB_MMU_MODES >= 6)
115 #define ACCESS_TYPE 5
116 #define MEMSUFFIX MMU_MODE5_SUFFIX
118 #include "softmmu_header.h"
121 #include "softmmu_header.h"
124 #include "softmmu_header.h"
127 #include "softmmu_header.h"
130 #endif /* (NB_MMU_MODES >= 6) */
132 #if (NB_MMU_MODES > 6)
133 #error "NB_MMU_MODES > 6 is not supported for now"
134 #endif /* (NB_MMU_MODES > 6) */
136 /* these access are slower, they must be as rare as possible */
137 #define ACCESS_TYPE (NB_MMU_MODES)
138 #define MEMSUFFIX _data
140 #include "softmmu_header.h"
143 #include "softmmu_header.h"
146 #include "softmmu_header.h"
149 #include "softmmu_header.h"
153 #define ldub(p) ldub_data(p)
154 #define ldsb(p) ldsb_data(p)
155 #define lduw(p) lduw_data(p)
156 #define ldsw(p) ldsw_data(p)
157 #define ldl(p) ldl_data(p)
158 #define ldq(p) ldq_data(p)
160 #define stb(p, v) stb_data(p, v)
161 #define stw(p, v) stw_data(p, v)
162 #define stl(p, v) stl_data(p, v)
163 #define stq(p, v) stq_data(p, v)