]>
git.proxmox.com Git - qemu.git/blob - softmmu_exec.h
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"
63 #endif /* (NB_MMU_MODES >= 3) */
65 #if (NB_MMU_MODES >= 4)
68 #define MEMSUFFIX MMU_MODE3_SUFFIX
70 #include "softmmu_header.h"
73 #include "softmmu_header.h"
76 #include "softmmu_header.h"
79 #include "softmmu_header.h"
82 #endif /* (NB_MMU_MODES >= 4) */
84 #if (NB_MMU_MODES >= 5)
87 #define MEMSUFFIX MMU_MODE4_SUFFIX
89 #include "softmmu_header.h"
92 #include "softmmu_header.h"
95 #include "softmmu_header.h"
98 #include "softmmu_header.h"
101 #endif /* (NB_MMU_MODES >= 5) */
103 #if (NB_MMU_MODES >= 6)
105 #define ACCESS_TYPE 5
106 #define MEMSUFFIX MMU_MODE5_SUFFIX
108 #include "softmmu_header.h"
111 #include "softmmu_header.h"
114 #include "softmmu_header.h"
117 #include "softmmu_header.h"
120 #endif /* (NB_MMU_MODES >= 6) */
122 #if (NB_MMU_MODES > 6)
123 #error "NB_MMU_MODES > 6 is not supported for now"
124 #endif /* (NB_MMU_MODES > 6) */
126 /* these access are slower, they must be as rare as possible */
127 #define ACCESS_TYPE (NB_MMU_MODES)
128 #define MEMSUFFIX _data
130 #include "softmmu_header.h"
133 #include "softmmu_header.h"
136 #include "softmmu_header.h"
139 #include "softmmu_header.h"
143 #define ldub(p) ldub_data(p)
144 #define ldsb(p) ldsb_data(p)
145 #define lduw(p) lduw_data(p)
146 #define ldsw(p) ldsw_data(p)
147 #define ldl(p) ldl_data(p)
148 #define ldq(p) ldq_data(p)
150 #define stb(p, v) stb_data(p, v)
151 #define stw(p, v) stw_data(p, v)
152 #define stl(p, v) stl_data(p, v)
153 #define stq(p, v) stq_data(p, v)