Add new files fir strace support, missed in earlier commit.
[qemu/qemu_0_9_1_stable.git] / softmmu_exec.h
blobb6e484918558b7587caebb48f1f029b93f685a14
1 /* Common softmmu definitions and inline routines. */
3 /* XXX: find something cleaner.
4 * Furthermore, this is false for 64 bits targets
5 */
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 #define ACCESS_TYPE 0
13 #define MEMSUFFIX MMU_MODE0_SUFFIX
14 #define DATA_SIZE 1
15 #include "softmmu_header.h"
17 #define DATA_SIZE 2
18 #include "softmmu_header.h"
20 #define DATA_SIZE 4
21 #include "softmmu_header.h"
23 #define DATA_SIZE 8
24 #include "softmmu_header.h"
25 #undef ACCESS_TYPE
26 #undef MEMSUFFIX
28 #define ACCESS_TYPE 1
29 #define MEMSUFFIX MMU_MODE1_SUFFIX
30 #define DATA_SIZE 1
31 #include "softmmu_header.h"
33 #define DATA_SIZE 2
34 #include "softmmu_header.h"
36 #define DATA_SIZE 4
37 #include "softmmu_header.h"
39 #define DATA_SIZE 8
40 #include "softmmu_header.h"
41 #undef ACCESS_TYPE
42 #undef MEMSUFFIX
44 #if (NB_MMU_MODES >= 3)
46 #define ACCESS_TYPE 2
47 #define MEMSUFFIX MMU_MODE2_SUFFIX
48 #define DATA_SIZE 1
49 #include "softmmu_header.h"
51 #define DATA_SIZE 2
52 #include "softmmu_header.h"
54 #define DATA_SIZE 4
55 #include "softmmu_header.h"
57 #define DATA_SIZE 8
58 #include "softmmu_header.h"
59 #undef ACCESS_TYPE
60 #undef MEMSUFFIX
62 #if (NB_MMU_MODES >= 4)
64 #define ACCESS_TYPE 3
65 #define MEMSUFFIX MMU_MODE3_SUFFIX
66 #define DATA_SIZE 1
67 #include "softmmu_header.h"
69 #define DATA_SIZE 2
70 #include "softmmu_header.h"
72 #define DATA_SIZE 4
73 #include "softmmu_header.h"
75 #define DATA_SIZE 8
76 #include "softmmu_header.h"
77 #undef ACCESS_TYPE
78 #undef MEMSUFFIX
80 #if (NB_MMU_MODES > 4)
81 #error "NB_MMU_MODES > 4 is not supported for now"
82 #endif /* (NB_MMU_MODES > 4) */
83 #endif /* (NB_MMU_MODES == 4) */
84 #endif /* (NB_MMU_MODES >= 3) */
86 /* these access are slower, they must be as rare as possible */
87 #define ACCESS_TYPE (NB_MMU_MODES)
88 #define MEMSUFFIX _data
89 #define DATA_SIZE 1
90 #include "softmmu_header.h"
92 #define DATA_SIZE 2
93 #include "softmmu_header.h"
95 #define DATA_SIZE 4
96 #include "softmmu_header.h"
98 #define DATA_SIZE 8
99 #include "softmmu_header.h"
100 #undef ACCESS_TYPE
101 #undef MEMSUFFIX
103 #define ldub(p) ldub_data(p)
104 #define ldsb(p) ldsb_data(p)
105 #define lduw(p) lduw_data(p)
106 #define ldsw(p) ldsw_data(p)
107 #define ldl(p) ldl_data(p)
108 #define ldq(p) ldq_data(p)
110 #define stb(p, v) stb_data(p, v)
111 #define stw(p, v) stw_data(p, v)
112 #define stl(p, v) stl_data(p, v)
113 #define stq(p, v) stq_data(p, v)