root / softmmu_exec.h @ 5d794885
History | View | Annotate | Download (2.3 kB)
1 |
/* Common softmmu definitions and inline routines. */
|
---|---|
2 |
|
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
|
11 |
|
12 |
#define ACCESS_TYPE 0 |
13 |
#define MEMSUFFIX MMU_MODE0_SUFFIX
|
14 |
#define DATA_SIZE 1 |
15 |
#include "softmmu_header.h" |
16 |
|
17 |
#define DATA_SIZE 2 |
18 |
#include "softmmu_header.h" |
19 |
|
20 |
#define DATA_SIZE 4 |
21 |
#include "softmmu_header.h" |
22 |
|
23 |
#define DATA_SIZE 8 |
24 |
#include "softmmu_header.h" |
25 |
#undef ACCESS_TYPE
|
26 |
#undef MEMSUFFIX
|
27 |
|
28 |
#define ACCESS_TYPE 1 |
29 |
#define MEMSUFFIX MMU_MODE1_SUFFIX
|
30 |
#define DATA_SIZE 1 |
31 |
#include "softmmu_header.h" |
32 |
|
33 |
#define DATA_SIZE 2 |
34 |
#include "softmmu_header.h" |
35 |
|
36 |
#define DATA_SIZE 4 |
37 |
#include "softmmu_header.h" |
38 |
|
39 |
#define DATA_SIZE 8 |
40 |
#include "softmmu_header.h" |
41 |
#undef ACCESS_TYPE
|
42 |
#undef MEMSUFFIX
|
43 |
|
44 |
#if (NB_MMU_MODES >= 3) |
45 |
|
46 |
#define ACCESS_TYPE 2 |
47 |
#define MEMSUFFIX MMU_MODE2_SUFFIX
|
48 |
#define DATA_SIZE 1 |
49 |
#include "softmmu_header.h" |
50 |
|
51 |
#define DATA_SIZE 2 |
52 |
#include "softmmu_header.h" |
53 |
|
54 |
#define DATA_SIZE 4 |
55 |
#include "softmmu_header.h" |
56 |
|
57 |
#define DATA_SIZE 8 |
58 |
#include "softmmu_header.h" |
59 |
#undef ACCESS_TYPE
|
60 |
#undef MEMSUFFIX
|
61 |
|
62 |
#if (NB_MMU_MODES >= 4) |
63 |
|
64 |
#define ACCESS_TYPE 3 |
65 |
#define MEMSUFFIX MMU_MODE3_SUFFIX
|
66 |
#define DATA_SIZE 1 |
67 |
#include "softmmu_header.h" |
68 |
|
69 |
#define DATA_SIZE 2 |
70 |
#include "softmmu_header.h" |
71 |
|
72 |
#define DATA_SIZE 4 |
73 |
#include "softmmu_header.h" |
74 |
|
75 |
#define DATA_SIZE 8 |
76 |
#include "softmmu_header.h" |
77 |
#undef ACCESS_TYPE
|
78 |
#undef MEMSUFFIX
|
79 |
|
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) */ |
85 |
|
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" |
91 |
|
92 |
#define DATA_SIZE 2 |
93 |
#include "softmmu_header.h" |
94 |
|
95 |
#define DATA_SIZE 4 |
96 |
#include "softmmu_header.h" |
97 |
|
98 |
#define DATA_SIZE 8 |
99 |
#include "softmmu_header.h" |
100 |
#undef ACCESS_TYPE
|
101 |
#undef MEMSUFFIX
|
102 |
|
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)
|
109 |
|
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)
|