root / softmmu_exec.h @ 4870852c
History | View | Annotate | Download (2.7 kB)
1 | a9049a07 | bellard | /* Common softmmu definitions and inline routines. */
|
---|---|---|---|
2 | a9049a07 | bellard | |
3 | 6ebbf390 | j_mayer | /* XXX: find something cleaner.
|
4 | 6ebbf390 | j_mayer | * Furthermore, this is false for 64 bits targets
|
5 | 6ebbf390 | j_mayer | */
|
6 | 6ebbf390 | j_mayer | #define ldul_user ldl_user
|
7 | 6ebbf390 | j_mayer | #define ldul_kernel ldl_kernel
|
8 | 6ebbf390 | j_mayer | #define ldul_hypv ldl_hypv
|
9 | 6ebbf390 | j_mayer | #define ldul_executive ldl_executive
|
10 | 6ebbf390 | j_mayer | #define ldul_supervisor ldl_supervisor
|
11 | a9049a07 | bellard | |
12 | 79383c9c | blueswir1 | #include "softmmu_defs.h" |
13 | 79383c9c | blueswir1 | |
14 | a9049a07 | bellard | #define ACCESS_TYPE 0 |
15 | 6ebbf390 | j_mayer | #define MEMSUFFIX MMU_MODE0_SUFFIX
|
16 | a9049a07 | bellard | #define DATA_SIZE 1 |
17 | a9049a07 | bellard | #include "softmmu_header.h" |
18 | a9049a07 | bellard | |
19 | a9049a07 | bellard | #define DATA_SIZE 2 |
20 | a9049a07 | bellard | #include "softmmu_header.h" |
21 | a9049a07 | bellard | |
22 | a9049a07 | bellard | #define DATA_SIZE 4 |
23 | a9049a07 | bellard | #include "softmmu_header.h" |
24 | a9049a07 | bellard | |
25 | a9049a07 | bellard | #define DATA_SIZE 8 |
26 | a9049a07 | bellard | #include "softmmu_header.h" |
27 | a9049a07 | bellard | #undef ACCESS_TYPE
|
28 | a9049a07 | bellard | #undef MEMSUFFIX
|
29 | a9049a07 | bellard | |
30 | a9049a07 | bellard | #define ACCESS_TYPE 1 |
31 | 6ebbf390 | j_mayer | #define MEMSUFFIX MMU_MODE1_SUFFIX
|
32 | a9049a07 | bellard | #define DATA_SIZE 1 |
33 | a9049a07 | bellard | #include "softmmu_header.h" |
34 | a9049a07 | bellard | |
35 | a9049a07 | bellard | #define DATA_SIZE 2 |
36 | a9049a07 | bellard | #include "softmmu_header.h" |
37 | a9049a07 | bellard | |
38 | a9049a07 | bellard | #define DATA_SIZE 4 |
39 | a9049a07 | bellard | #include "softmmu_header.h" |
40 | a9049a07 | bellard | |
41 | a9049a07 | bellard | #define DATA_SIZE 8 |
42 | a9049a07 | bellard | #include "softmmu_header.h" |
43 | a9049a07 | bellard | #undef ACCESS_TYPE
|
44 | a9049a07 | bellard | #undef MEMSUFFIX
|
45 | a9049a07 | bellard | |
46 | 6ebbf390 | j_mayer | #if (NB_MMU_MODES >= 3) |
47 | 6ebbf390 | j_mayer | |
48 | a9049a07 | bellard | #define ACCESS_TYPE 2 |
49 | 6ebbf390 | j_mayer | #define MEMSUFFIX MMU_MODE2_SUFFIX
|
50 | 6ebbf390 | j_mayer | #define DATA_SIZE 1 |
51 | 6ebbf390 | j_mayer | #include "softmmu_header.h" |
52 | 6ebbf390 | j_mayer | |
53 | 6ebbf390 | j_mayer | #define DATA_SIZE 2 |
54 | 6ebbf390 | j_mayer | #include "softmmu_header.h" |
55 | 6ebbf390 | j_mayer | |
56 | 6ebbf390 | j_mayer | #define DATA_SIZE 4 |
57 | 6ebbf390 | j_mayer | #include "softmmu_header.h" |
58 | 6ebbf390 | j_mayer | |
59 | 6ebbf390 | j_mayer | #define DATA_SIZE 8 |
60 | 6ebbf390 | j_mayer | #include "softmmu_header.h" |
61 | 6ebbf390 | j_mayer | #undef ACCESS_TYPE
|
62 | 6ebbf390 | j_mayer | #undef MEMSUFFIX
|
63 | e37e6ee6 | aurel32 | #endif /* (NB_MMU_MODES >= 3) */ |
64 | 6ebbf390 | j_mayer | |
65 | 6ebbf390 | j_mayer | #if (NB_MMU_MODES >= 4) |
66 | 6ebbf390 | j_mayer | |
67 | 6ebbf390 | j_mayer | #define ACCESS_TYPE 3 |
68 | 6ebbf390 | j_mayer | #define MEMSUFFIX MMU_MODE3_SUFFIX
|
69 | 6ebbf390 | j_mayer | #define DATA_SIZE 1 |
70 | 6ebbf390 | j_mayer | #include "softmmu_header.h" |
71 | 6ebbf390 | j_mayer | |
72 | 6ebbf390 | j_mayer | #define DATA_SIZE 2 |
73 | 6ebbf390 | j_mayer | #include "softmmu_header.h" |
74 | 6ebbf390 | j_mayer | |
75 | 6ebbf390 | j_mayer | #define DATA_SIZE 4 |
76 | 6ebbf390 | j_mayer | #include "softmmu_header.h" |
77 | 6ebbf390 | j_mayer | |
78 | 6ebbf390 | j_mayer | #define DATA_SIZE 8 |
79 | 6ebbf390 | j_mayer | #include "softmmu_header.h" |
80 | 6ebbf390 | j_mayer | #undef ACCESS_TYPE
|
81 | 6ebbf390 | j_mayer | #undef MEMSUFFIX
|
82 | e37e6ee6 | aurel32 | #endif /* (NB_MMU_MODES >= 4) */ |
83 | 6ebbf390 | j_mayer | |
84 | e37e6ee6 | aurel32 | #if (NB_MMU_MODES >= 5) |
85 | e37e6ee6 | aurel32 | |
86 | e37e6ee6 | aurel32 | #define ACCESS_TYPE 4 |
87 | e37e6ee6 | aurel32 | #define MEMSUFFIX MMU_MODE4_SUFFIX
|
88 | e37e6ee6 | aurel32 | #define DATA_SIZE 1 |
89 | e37e6ee6 | aurel32 | #include "softmmu_header.h" |
90 | e37e6ee6 | aurel32 | |
91 | e37e6ee6 | aurel32 | #define DATA_SIZE 2 |
92 | e37e6ee6 | aurel32 | #include "softmmu_header.h" |
93 | e37e6ee6 | aurel32 | |
94 | e37e6ee6 | aurel32 | #define DATA_SIZE 4 |
95 | e37e6ee6 | aurel32 | #include "softmmu_header.h" |
96 | e37e6ee6 | aurel32 | |
97 | e37e6ee6 | aurel32 | #define DATA_SIZE 8 |
98 | e37e6ee6 | aurel32 | #include "softmmu_header.h" |
99 | e37e6ee6 | aurel32 | #undef ACCESS_TYPE
|
100 | e37e6ee6 | aurel32 | #undef MEMSUFFIX
|
101 | e37e6ee6 | aurel32 | #endif /* (NB_MMU_MODES >= 5) */ |
102 | e37e6ee6 | aurel32 | |
103 | e37e6ee6 | aurel32 | #if (NB_MMU_MODES > 5) |
104 | e37e6ee6 | aurel32 | #error "NB_MMU_MODES > 5 is not supported for now" |
105 | e37e6ee6 | aurel32 | #endif /* (NB_MMU_MODES > 5) */ |
106 | 6ebbf390 | j_mayer | |
107 | 6ebbf390 | j_mayer | /* these access are slower, they must be as rare as possible */
|
108 | 6ebbf390 | j_mayer | #define ACCESS_TYPE (NB_MMU_MODES)
|
109 | a9049a07 | bellard | #define MEMSUFFIX _data
|
110 | a9049a07 | bellard | #define DATA_SIZE 1 |
111 | a9049a07 | bellard | #include "softmmu_header.h" |
112 | a9049a07 | bellard | |
113 | a9049a07 | bellard | #define DATA_SIZE 2 |
114 | a9049a07 | bellard | #include "softmmu_header.h" |
115 | a9049a07 | bellard | |
116 | a9049a07 | bellard | #define DATA_SIZE 4 |
117 | a9049a07 | bellard | #include "softmmu_header.h" |
118 | a9049a07 | bellard | |
119 | a9049a07 | bellard | #define DATA_SIZE 8 |
120 | a9049a07 | bellard | #include "softmmu_header.h" |
121 | a9049a07 | bellard | #undef ACCESS_TYPE
|
122 | a9049a07 | bellard | #undef MEMSUFFIX
|
123 | a9049a07 | bellard | |
124 | a9049a07 | bellard | #define ldub(p) ldub_data(p)
|
125 | a9049a07 | bellard | #define ldsb(p) ldsb_data(p)
|
126 | a9049a07 | bellard | #define lduw(p) lduw_data(p)
|
127 | a9049a07 | bellard | #define ldsw(p) ldsw_data(p)
|
128 | a9049a07 | bellard | #define ldl(p) ldl_data(p)
|
129 | a9049a07 | bellard | #define ldq(p) ldq_data(p)
|
130 | a9049a07 | bellard | |
131 | a9049a07 | bellard | #define stb(p, v) stb_data(p, v)
|
132 | a9049a07 | bellard | #define stw(p, v) stw_data(p, v)
|
133 | a9049a07 | bellard | #define stl(p, v) stl_data(p, v)
|
134 | a9049a07 | bellard | #define stq(p, v) stq_data(p, v) |