softfloat: Add float16 <=> float64 conversion functions
[qemu/ar7.git] / include / exec / softmmu_exec.h
blob6fde154527c65d2442592942eb67bd2b69dccaba
1 /*
2 * Software MMU support
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
6 * sizes.
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 /* The memory helpers for tcg-generated code need tcg_target_long etc. */
23 #include "tcg.h"
25 #define ACCESS_TYPE 0
26 #define MEMSUFFIX MMU_MODE0_SUFFIX
27 #define DATA_SIZE 1
28 #include "exec/softmmu_header.h"
30 #define DATA_SIZE 2
31 #include "exec/softmmu_header.h"
33 #define DATA_SIZE 4
34 #include "exec/softmmu_header.h"
36 #define DATA_SIZE 8
37 #include "exec/softmmu_header.h"
38 #undef ACCESS_TYPE
39 #undef MEMSUFFIX
41 #define ACCESS_TYPE 1
42 #define MEMSUFFIX MMU_MODE1_SUFFIX
43 #define DATA_SIZE 1
44 #include "exec/softmmu_header.h"
46 #define DATA_SIZE 2
47 #include "exec/softmmu_header.h"
49 #define DATA_SIZE 4
50 #include "exec/softmmu_header.h"
52 #define DATA_SIZE 8
53 #include "exec/softmmu_header.h"
54 #undef ACCESS_TYPE
55 #undef MEMSUFFIX
57 #if (NB_MMU_MODES >= 3)
59 #define ACCESS_TYPE 2
60 #define MEMSUFFIX MMU_MODE2_SUFFIX
61 #define DATA_SIZE 1
62 #include "exec/softmmu_header.h"
64 #define DATA_SIZE 2
65 #include "exec/softmmu_header.h"
67 #define DATA_SIZE 4
68 #include "exec/softmmu_header.h"
70 #define DATA_SIZE 8
71 #include "exec/softmmu_header.h"
72 #undef ACCESS_TYPE
73 #undef MEMSUFFIX
74 #endif /* (NB_MMU_MODES >= 3) */
76 #if (NB_MMU_MODES >= 4)
78 #define ACCESS_TYPE 3
79 #define MEMSUFFIX MMU_MODE3_SUFFIX
80 #define DATA_SIZE 1
81 #include "exec/softmmu_header.h"
83 #define DATA_SIZE 2
84 #include "exec/softmmu_header.h"
86 #define DATA_SIZE 4
87 #include "exec/softmmu_header.h"
89 #define DATA_SIZE 8
90 #include "exec/softmmu_header.h"
91 #undef ACCESS_TYPE
92 #undef MEMSUFFIX
93 #endif /* (NB_MMU_MODES >= 4) */
95 #if (NB_MMU_MODES >= 5)
97 #define ACCESS_TYPE 4
98 #define MEMSUFFIX MMU_MODE4_SUFFIX
99 #define DATA_SIZE 1
100 #include "exec/softmmu_header.h"
102 #define DATA_SIZE 2
103 #include "exec/softmmu_header.h"
105 #define DATA_SIZE 4
106 #include "exec/softmmu_header.h"
108 #define DATA_SIZE 8
109 #include "exec/softmmu_header.h"
110 #undef ACCESS_TYPE
111 #undef MEMSUFFIX
112 #endif /* (NB_MMU_MODES >= 5) */
114 #if (NB_MMU_MODES >= 6)
116 #define ACCESS_TYPE 5
117 #define MEMSUFFIX MMU_MODE5_SUFFIX
118 #define DATA_SIZE 1
119 #include "exec/softmmu_header.h"
121 #define DATA_SIZE 2
122 #include "exec/softmmu_header.h"
124 #define DATA_SIZE 4
125 #include "exec/softmmu_header.h"
127 #define DATA_SIZE 8
128 #include "exec/softmmu_header.h"
129 #undef ACCESS_TYPE
130 #undef MEMSUFFIX
131 #endif /* (NB_MMU_MODES >= 6) */
133 #if (NB_MMU_MODES > 6)
134 #error "NB_MMU_MODES > 6 is not supported for now"
135 #endif /* (NB_MMU_MODES > 6) */
137 /* these access are slower, they must be as rare as possible */
138 #define ACCESS_TYPE (NB_MMU_MODES)
139 #define MEMSUFFIX _data
140 #define DATA_SIZE 1
141 #include "exec/softmmu_header.h"
143 #define DATA_SIZE 2
144 #include "exec/softmmu_header.h"
146 #define DATA_SIZE 4
147 #include "exec/softmmu_header.h"
149 #define DATA_SIZE 8
150 #include "exec/softmmu_header.h"
151 #undef ACCESS_TYPE
152 #undef MEMSUFFIX
154 #define ldub(p) ldub_data(p)
155 #define ldsb(p) ldsb_data(p)
156 #define lduw(p) lduw_data(p)
157 #define ldsw(p) ldsw_data(p)
158 #define ldl(p) ldl_data(p)
159 #define ldq(p) ldq_data(p)
161 #define stb(p, v) stb_data(p, v)
162 #define stw(p, v) stw_data(p, v)
163 #define stl(p, v) stl_data(p, v)
164 #define stq(p, v) stq_data(p, v)