root / softmmu_header.h @ e6bb7d7e
History | View | Annotate | Download (9.8 kB)
1 | b92e5a22 | bellard | /*
|
---|---|---|---|
2 | b92e5a22 | bellard | * Software MMU support
|
3 | 5fafdf24 | ths | *
|
4 | b92e5a22 | bellard | * Copyright (c) 2003 Fabrice Bellard
|
5 | b92e5a22 | bellard | *
|
6 | b92e5a22 | bellard | * This library is free software; you can redistribute it and/or
|
7 | b92e5a22 | bellard | * modify it under the terms of the GNU Lesser General Public
|
8 | b92e5a22 | bellard | * License as published by the Free Software Foundation; either
|
9 | b92e5a22 | bellard | * version 2 of the License, or (at your option) any later version.
|
10 | b92e5a22 | bellard | *
|
11 | b92e5a22 | bellard | * This library is distributed in the hope that it will be useful,
|
12 | b92e5a22 | bellard | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | b92e5a22 | bellard | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | b92e5a22 | bellard | * Lesser General Public License for more details.
|
15 | b92e5a22 | bellard | *
|
16 | b92e5a22 | bellard | * You should have received a copy of the GNU Lesser General Public
|
17 | b92e5a22 | bellard | * License along with this library; if not, write to the Free Software
|
18 | b92e5a22 | bellard | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19 | b92e5a22 | bellard | */
|
20 | b92e5a22 | bellard | #if DATA_SIZE == 8 |
21 | b92e5a22 | bellard | #define SUFFIX q
|
22 | 61382a50 | bellard | #define USUFFIX q
|
23 | b92e5a22 | bellard | #define DATA_TYPE uint64_t
|
24 | b92e5a22 | bellard | #elif DATA_SIZE == 4 |
25 | b92e5a22 | bellard | #define SUFFIX l
|
26 | 61382a50 | bellard | #define USUFFIX l
|
27 | b92e5a22 | bellard | #define DATA_TYPE uint32_t
|
28 | b92e5a22 | bellard | #elif DATA_SIZE == 2 |
29 | b92e5a22 | bellard | #define SUFFIX w
|
30 | 61382a50 | bellard | #define USUFFIX uw
|
31 | b92e5a22 | bellard | #define DATA_TYPE uint16_t
|
32 | b92e5a22 | bellard | #define DATA_STYPE int16_t
|
33 | b92e5a22 | bellard | #elif DATA_SIZE == 1 |
34 | b92e5a22 | bellard | #define SUFFIX b
|
35 | 61382a50 | bellard | #define USUFFIX ub
|
36 | b92e5a22 | bellard | #define DATA_TYPE uint8_t
|
37 | b92e5a22 | bellard | #define DATA_STYPE int8_t
|
38 | b92e5a22 | bellard | #else
|
39 | b92e5a22 | bellard | #error unsupported data size
|
40 | b92e5a22 | bellard | #endif
|
41 | b92e5a22 | bellard | |
42 | 6ebbf390 | j_mayer | #if ACCESS_TYPE < (NB_MMU_MODES)
|
43 | 61382a50 | bellard | |
44 | 6ebbf390 | j_mayer | #define CPU_MMU_INDEX ACCESS_TYPE
|
45 | 61382a50 | bellard | #define MMUSUFFIX _mmu
|
46 | 61382a50 | bellard | |
47 | 6ebbf390 | j_mayer | #elif ACCESS_TYPE == (NB_MMU_MODES)
|
48 | 61382a50 | bellard | |
49 | 6ebbf390 | j_mayer | #define CPU_MMU_INDEX (cpu_mmu_index(env))
|
50 | 61382a50 | bellard | #define MMUSUFFIX _mmu
|
51 | 61382a50 | bellard | |
52 | 6ebbf390 | j_mayer | #elif ACCESS_TYPE == (NB_MMU_MODES + 1) |
53 | 61382a50 | bellard | |
54 | 6ebbf390 | j_mayer | #define CPU_MMU_INDEX (cpu_mmu_index(env))
|
55 | 61382a50 | bellard | #define MMUSUFFIX _cmmu
|
56 | 61382a50 | bellard | |
57 | b92e5a22 | bellard | #else
|
58 | 61382a50 | bellard | #error invalid ACCESS_TYPE
|
59 | b92e5a22 | bellard | #endif
|
60 | b92e5a22 | bellard | |
61 | b92e5a22 | bellard | #if DATA_SIZE == 8 |
62 | b92e5a22 | bellard | #define RES_TYPE uint64_t
|
63 | b92e5a22 | bellard | #else
|
64 | b92e5a22 | bellard | #define RES_TYPE int |
65 | b92e5a22 | bellard | #endif
|
66 | b92e5a22 | bellard | |
67 | 6ebbf390 | j_mayer | #if ACCESS_TYPE == (NB_MMU_MODES + 1) |
68 | 84b7b8e7 | bellard | #define ADDR_READ addr_code
|
69 | 84b7b8e7 | bellard | #else
|
70 | 84b7b8e7 | bellard | #define ADDR_READ addr_read
|
71 | 84b7b8e7 | bellard | #endif
|
72 | b92e5a22 | bellard | |
73 | d656469f | bellard | DATA_TYPE REGPARM glue(glue(__ld, SUFFIX), MMUSUFFIX)(target_ulong addr, |
74 | 6ebbf390 | j_mayer | int mmu_idx);
|
75 | d656469f | bellard | void REGPARM glue(glue(__st, SUFFIX), MMUSUFFIX)(target_ulong addr, DATA_TYPE v, int mmu_idx); |
76 | b92e5a22 | bellard | |
77 | c27004ec | bellard | #if (DATA_SIZE <= 4) && (TARGET_LONG_BITS == 32) && defined(__i386__) && \ |
78 | 6ebbf390 | j_mayer | (ACCESS_TYPE < NB_MMU_MODES) && defined(ASM_SOFTMMU) |
79 | e16c53fa | bellard | |
80 | c27004ec | bellard | static inline RES_TYPE glue(glue(ld, USUFFIX), MEMSUFFIX)(target_ulong ptr) |
81 | e16c53fa | bellard | { |
82 | e16c53fa | bellard | int res;
|
83 | e16c53fa | bellard | |
84 | e16c53fa | bellard | asm volatile ("movl %1, %%edx\n" |
85 | e16c53fa | bellard | "movl %1, %%eax\n"
|
86 | e16c53fa | bellard | "shrl %3, %%edx\n"
|
87 | e16c53fa | bellard | "andl %4, %%eax\n"
|
88 | e16c53fa | bellard | "andl %2, %%edx\n"
|
89 | e16c53fa | bellard | "leal %5(%%edx, %%ebp), %%edx\n"
|
90 | e16c53fa | bellard | "cmpl (%%edx), %%eax\n"
|
91 | e16c53fa | bellard | "movl %1, %%eax\n"
|
92 | e16c53fa | bellard | "je 1f\n"
|
93 | d656469f | bellard | "movl %6, %%edx\n"
|
94 | e16c53fa | bellard | "call %7\n"
|
95 | e16c53fa | bellard | "movl %%eax, %0\n"
|
96 | e16c53fa | bellard | "jmp 2f\n"
|
97 | e16c53fa | bellard | "1:\n"
|
98 | 84b7b8e7 | bellard | "addl 12(%%edx), %%eax\n"
|
99 | e16c53fa | bellard | #if DATA_SIZE == 1 |
100 | e16c53fa | bellard | "movzbl (%%eax), %0\n"
|
101 | e16c53fa | bellard | #elif DATA_SIZE == 2 |
102 | e16c53fa | bellard | "movzwl (%%eax), %0\n"
|
103 | e16c53fa | bellard | #elif DATA_SIZE == 4 |
104 | e16c53fa | bellard | "movl (%%eax), %0\n"
|
105 | e16c53fa | bellard | #else
|
106 | e16c53fa | bellard | #error unsupported size
|
107 | e16c53fa | bellard | #endif
|
108 | e16c53fa | bellard | "2:\n"
|
109 | e16c53fa | bellard | : "=r" (res)
|
110 | 5fafdf24 | ths | : "r" (ptr),
|
111 | 5fafdf24 | ths | "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS), |
112 | 5fafdf24 | ths | "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS),
|
113 | e16c53fa | bellard | "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)), |
114 | 6ebbf390 | j_mayer | "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MMU_INDEX][0].addr_read)), |
115 | 6ebbf390 | j_mayer | "i" (CPU_MMU_INDEX),
|
116 | e16c53fa | bellard | "m" (*(uint8_t *)&glue(glue(__ld, SUFFIX), MMUSUFFIX))
|
117 | e16c53fa | bellard | : "%eax", "%ecx", "%edx", "memory", "cc"); |
118 | e16c53fa | bellard | return res;
|
119 | e16c53fa | bellard | } |
120 | e16c53fa | bellard | |
121 | e16c53fa | bellard | #if DATA_SIZE <= 2 |
122 | c27004ec | bellard | static inline int glue(glue(lds, SUFFIX), MEMSUFFIX)(target_ulong ptr) |
123 | e16c53fa | bellard | { |
124 | e16c53fa | bellard | int res;
|
125 | e16c53fa | bellard | |
126 | e16c53fa | bellard | asm volatile ("movl %1, %%edx\n" |
127 | e16c53fa | bellard | "movl %1, %%eax\n"
|
128 | e16c53fa | bellard | "shrl %3, %%edx\n"
|
129 | e16c53fa | bellard | "andl %4, %%eax\n"
|
130 | e16c53fa | bellard | "andl %2, %%edx\n"
|
131 | e16c53fa | bellard | "leal %5(%%edx, %%ebp), %%edx\n"
|
132 | e16c53fa | bellard | "cmpl (%%edx), %%eax\n"
|
133 | e16c53fa | bellard | "movl %1, %%eax\n"
|
134 | e16c53fa | bellard | "je 1f\n"
|
135 | d656469f | bellard | "movl %6, %%edx\n"
|
136 | e16c53fa | bellard | "call %7\n"
|
137 | e16c53fa | bellard | #if DATA_SIZE == 1 |
138 | e16c53fa | bellard | "movsbl %%al, %0\n"
|
139 | e16c53fa | bellard | #elif DATA_SIZE == 2 |
140 | e16c53fa | bellard | "movswl %%ax, %0\n"
|
141 | e16c53fa | bellard | #else
|
142 | e16c53fa | bellard | #error unsupported size
|
143 | e16c53fa | bellard | #endif
|
144 | e16c53fa | bellard | "jmp 2f\n"
|
145 | e16c53fa | bellard | "1:\n"
|
146 | 84b7b8e7 | bellard | "addl 12(%%edx), %%eax\n"
|
147 | e16c53fa | bellard | #if DATA_SIZE == 1 |
148 | e16c53fa | bellard | "movsbl (%%eax), %0\n"
|
149 | e16c53fa | bellard | #elif DATA_SIZE == 2 |
150 | e16c53fa | bellard | "movswl (%%eax), %0\n"
|
151 | e16c53fa | bellard | #else
|
152 | e16c53fa | bellard | #error unsupported size
|
153 | e16c53fa | bellard | #endif
|
154 | e16c53fa | bellard | "2:\n"
|
155 | e16c53fa | bellard | : "=r" (res)
|
156 | 5fafdf24 | ths | : "r" (ptr),
|
157 | 5fafdf24 | ths | "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS), |
158 | 5fafdf24 | ths | "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS),
|
159 | e16c53fa | bellard | "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)), |
160 | 6ebbf390 | j_mayer | "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MMU_INDEX][0].addr_read)), |
161 | 6ebbf390 | j_mayer | "i" (CPU_MMU_INDEX),
|
162 | e16c53fa | bellard | "m" (*(uint8_t *)&glue(glue(__ld, SUFFIX), MMUSUFFIX))
|
163 | e16c53fa | bellard | : "%eax", "%ecx", "%edx", "memory", "cc"); |
164 | e16c53fa | bellard | return res;
|
165 | e16c53fa | bellard | } |
166 | e16c53fa | bellard | #endif
|
167 | e16c53fa | bellard | |
168 | c27004ec | bellard | static inline void glue(glue(st, SUFFIX), MEMSUFFIX)(target_ulong ptr, RES_TYPE v) |
169 | e16c53fa | bellard | { |
170 | e16c53fa | bellard | asm volatile ("movl %0, %%edx\n" |
171 | e16c53fa | bellard | "movl %0, %%eax\n"
|
172 | e16c53fa | bellard | "shrl %3, %%edx\n"
|
173 | e16c53fa | bellard | "andl %4, %%eax\n"
|
174 | e16c53fa | bellard | "andl %2, %%edx\n"
|
175 | e16c53fa | bellard | "leal %5(%%edx, %%ebp), %%edx\n"
|
176 | e16c53fa | bellard | "cmpl (%%edx), %%eax\n"
|
177 | e16c53fa | bellard | "movl %0, %%eax\n"
|
178 | e16c53fa | bellard | "je 1f\n"
|
179 | e16c53fa | bellard | #if DATA_SIZE == 1 |
180 | e16c53fa | bellard | "movzbl %b1, %%edx\n"
|
181 | e16c53fa | bellard | #elif DATA_SIZE == 2 |
182 | e16c53fa | bellard | "movzwl %w1, %%edx\n"
|
183 | e16c53fa | bellard | #elif DATA_SIZE == 4 |
184 | e16c53fa | bellard | "movl %1, %%edx\n"
|
185 | e16c53fa | bellard | #else
|
186 | e16c53fa | bellard | #error unsupported size
|
187 | e16c53fa | bellard | #endif
|
188 | d656469f | bellard | "movl %6, %%ecx\n"
|
189 | e16c53fa | bellard | "call %7\n"
|
190 | e16c53fa | bellard | "jmp 2f\n"
|
191 | e16c53fa | bellard | "1:\n"
|
192 | 84b7b8e7 | bellard | "addl 8(%%edx), %%eax\n"
|
193 | e16c53fa | bellard | #if DATA_SIZE == 1 |
194 | e16c53fa | bellard | "movb %b1, (%%eax)\n"
|
195 | e16c53fa | bellard | #elif DATA_SIZE == 2 |
196 | e16c53fa | bellard | "movw %w1, (%%eax)\n"
|
197 | e16c53fa | bellard | #elif DATA_SIZE == 4 |
198 | e16c53fa | bellard | "movl %1, (%%eax)\n"
|
199 | e16c53fa | bellard | #else
|
200 | e16c53fa | bellard | #error unsupported size
|
201 | e16c53fa | bellard | #endif
|
202 | e16c53fa | bellard | "2:\n"
|
203 | 5fafdf24 | ths | : |
204 | 5fafdf24 | ths | : "r" (ptr),
|
205 | f220f4e3 | bellard | #if DATA_SIZE == 1 |
206 | f220f4e3 | bellard | "q" (v),
|
207 | f220f4e3 | bellard | #else
|
208 | 5fafdf24 | ths | "r" (v),
|
209 | f220f4e3 | bellard | #endif
|
210 | 5fafdf24 | ths | "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS), |
211 | 5fafdf24 | ths | "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS),
|
212 | e16c53fa | bellard | "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)), |
213 | 6ebbf390 | j_mayer | "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MMU_INDEX][0].addr_write)), |
214 | 6ebbf390 | j_mayer | "i" (CPU_MMU_INDEX),
|
215 | e16c53fa | bellard | "m" (*(uint8_t *)&glue(glue(__st, SUFFIX), MMUSUFFIX))
|
216 | e16c53fa | bellard | : "%eax", "%ecx", "%edx", "memory", "cc"); |
217 | e16c53fa | bellard | } |
218 | e16c53fa | bellard | |
219 | e16c53fa | bellard | #else
|
220 | e16c53fa | bellard | |
221 | e16c53fa | bellard | /* generic load/store macros */
|
222 | e16c53fa | bellard | |
223 | c27004ec | bellard | static inline RES_TYPE glue(glue(ld, USUFFIX), MEMSUFFIX)(target_ulong ptr) |
224 | b92e5a22 | bellard | { |
225 | 4d7a0880 | blueswir1 | int page_index;
|
226 | b92e5a22 | bellard | RES_TYPE res; |
227 | c27004ec | bellard | target_ulong addr; |
228 | c27004ec | bellard | unsigned long physaddr; |
229 | 6ebbf390 | j_mayer | int mmu_idx;
|
230 | 61382a50 | bellard | |
231 | c27004ec | bellard | addr = ptr; |
232 | 4d7a0880 | blueswir1 | page_index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
|
233 | 6ebbf390 | j_mayer | mmu_idx = CPU_MMU_INDEX; |
234 | 4d7a0880 | blueswir1 | if (__builtin_expect(env->tlb_table[mmu_idx][page_index].ADDR_READ !=
|
235 | b92e5a22 | bellard | (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))), 0)) { |
236 | 6ebbf390 | j_mayer | res = glue(glue(__ld, SUFFIX), MMUSUFFIX)(addr, mmu_idx); |
237 | b92e5a22 | bellard | } else {
|
238 | 4d7a0880 | blueswir1 | physaddr = addr + env->tlb_table[mmu_idx][page_index].addend; |
239 | 61382a50 | bellard | res = glue(glue(ld, USUFFIX), _raw)((uint8_t *)physaddr); |
240 | b92e5a22 | bellard | } |
241 | b92e5a22 | bellard | return res;
|
242 | b92e5a22 | bellard | } |
243 | b92e5a22 | bellard | |
244 | b92e5a22 | bellard | #if DATA_SIZE <= 2 |
245 | c27004ec | bellard | static inline int glue(glue(lds, SUFFIX), MEMSUFFIX)(target_ulong ptr) |
246 | b92e5a22 | bellard | { |
247 | 4d7a0880 | blueswir1 | int res, page_index;
|
248 | c27004ec | bellard | target_ulong addr; |
249 | c27004ec | bellard | unsigned long physaddr; |
250 | 6ebbf390 | j_mayer | int mmu_idx;
|
251 | 61382a50 | bellard | |
252 | c27004ec | bellard | addr = ptr; |
253 | 4d7a0880 | blueswir1 | page_index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
|
254 | 6ebbf390 | j_mayer | mmu_idx = CPU_MMU_INDEX; |
255 | 4d7a0880 | blueswir1 | if (__builtin_expect(env->tlb_table[mmu_idx][page_index].ADDR_READ !=
|
256 | b92e5a22 | bellard | (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))), 0)) { |
257 | 6ebbf390 | j_mayer | res = (DATA_STYPE)glue(glue(__ld, SUFFIX), MMUSUFFIX)(addr, mmu_idx); |
258 | b92e5a22 | bellard | } else {
|
259 | 4d7a0880 | blueswir1 | physaddr = addr + env->tlb_table[mmu_idx][page_index].addend; |
260 | b92e5a22 | bellard | res = glue(glue(lds, SUFFIX), _raw)((uint8_t *)physaddr); |
261 | b92e5a22 | bellard | } |
262 | b92e5a22 | bellard | return res;
|
263 | b92e5a22 | bellard | } |
264 | b92e5a22 | bellard | #endif
|
265 | b92e5a22 | bellard | |
266 | 6ebbf390 | j_mayer | #if ACCESS_TYPE != (NB_MMU_MODES + 1) |
267 | 84b7b8e7 | bellard | |
268 | e16c53fa | bellard | /* generic store macro */
|
269 | e16c53fa | bellard | |
270 | c27004ec | bellard | static inline void glue(glue(st, SUFFIX), MEMSUFFIX)(target_ulong ptr, RES_TYPE v) |
271 | b92e5a22 | bellard | { |
272 | 4d7a0880 | blueswir1 | int page_index;
|
273 | c27004ec | bellard | target_ulong addr; |
274 | c27004ec | bellard | unsigned long physaddr; |
275 | 6ebbf390 | j_mayer | int mmu_idx;
|
276 | 61382a50 | bellard | |
277 | c27004ec | bellard | addr = ptr; |
278 | 4d7a0880 | blueswir1 | page_index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
|
279 | 6ebbf390 | j_mayer | mmu_idx = CPU_MMU_INDEX; |
280 | 4d7a0880 | blueswir1 | if (__builtin_expect(env->tlb_table[mmu_idx][page_index].addr_write !=
|
281 | b92e5a22 | bellard | (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))), 0)) { |
282 | 6ebbf390 | j_mayer | glue(glue(__st, SUFFIX), MMUSUFFIX)(addr, v, mmu_idx); |
283 | b92e5a22 | bellard | } else {
|
284 | 4d7a0880 | blueswir1 | physaddr = addr + env->tlb_table[mmu_idx][page_index].addend; |
285 | b92e5a22 | bellard | glue(glue(st, SUFFIX), _raw)((uint8_t *)physaddr, v); |
286 | b92e5a22 | bellard | } |
287 | b92e5a22 | bellard | } |
288 | b92e5a22 | bellard | |
289 | 6ebbf390 | j_mayer | #endif /* ACCESS_TYPE != (NB_MMU_MODES + 1) */ |
290 | 84b7b8e7 | bellard | |
291 | 84b7b8e7 | bellard | #endif /* !asm */ |
292 | 84b7b8e7 | bellard | |
293 | 6ebbf390 | j_mayer | #if ACCESS_TYPE != (NB_MMU_MODES + 1) |
294 | e16c53fa | bellard | |
295 | 2d603d22 | bellard | #if DATA_SIZE == 8 |
296 | 3f87bf69 | bellard | static inline float64 glue(ldfq, MEMSUFFIX)(target_ulong ptr) |
297 | 2d603d22 | bellard | { |
298 | 2d603d22 | bellard | union {
|
299 | 3f87bf69 | bellard | float64 d; |
300 | 2d603d22 | bellard | uint64_t i; |
301 | 2d603d22 | bellard | } u; |
302 | 2d603d22 | bellard | u.i = glue(ldq, MEMSUFFIX)(ptr); |
303 | 2d603d22 | bellard | return u.d;
|
304 | 2d603d22 | bellard | } |
305 | 2d603d22 | bellard | |
306 | 3f87bf69 | bellard | static inline void glue(stfq, MEMSUFFIX)(target_ulong ptr, float64 v) |
307 | 2d603d22 | bellard | { |
308 | 2d603d22 | bellard | union {
|
309 | 3f87bf69 | bellard | float64 d; |
310 | 2d603d22 | bellard | uint64_t i; |
311 | 2d603d22 | bellard | } u; |
312 | 2d603d22 | bellard | u.d = v; |
313 | 2d603d22 | bellard | glue(stq, MEMSUFFIX)(ptr, u.i); |
314 | 2d603d22 | bellard | } |
315 | 2d603d22 | bellard | #endif /* DATA_SIZE == 8 */ |
316 | 2d603d22 | bellard | |
317 | 2d603d22 | bellard | #if DATA_SIZE == 4 |
318 | 3f87bf69 | bellard | static inline float32 glue(ldfl, MEMSUFFIX)(target_ulong ptr) |
319 | 2d603d22 | bellard | { |
320 | 2d603d22 | bellard | union {
|
321 | 3f87bf69 | bellard | float32 f; |
322 | 2d603d22 | bellard | uint32_t i; |
323 | 2d603d22 | bellard | } u; |
324 | 2d603d22 | bellard | u.i = glue(ldl, MEMSUFFIX)(ptr); |
325 | 2d603d22 | bellard | return u.f;
|
326 | 2d603d22 | bellard | } |
327 | 2d603d22 | bellard | |
328 | 3f87bf69 | bellard | static inline void glue(stfl, MEMSUFFIX)(target_ulong ptr, float32 v) |
329 | 2d603d22 | bellard | { |
330 | 2d603d22 | bellard | union {
|
331 | 3f87bf69 | bellard | float32 f; |
332 | 2d603d22 | bellard | uint32_t i; |
333 | 2d603d22 | bellard | } u; |
334 | 2d603d22 | bellard | u.f = v; |
335 | 2d603d22 | bellard | glue(stl, MEMSUFFIX)(ptr, u.i); |
336 | 2d603d22 | bellard | } |
337 | 2d603d22 | bellard | #endif /* DATA_SIZE == 4 */ |
338 | 2d603d22 | bellard | |
339 | 6ebbf390 | j_mayer | #endif /* ACCESS_TYPE != (NB_MMU_MODES + 1) */ |
340 | 84b7b8e7 | bellard | |
341 | b92e5a22 | bellard | #undef RES_TYPE
|
342 | b92e5a22 | bellard | #undef DATA_TYPE
|
343 | b92e5a22 | bellard | #undef DATA_STYPE
|
344 | b92e5a22 | bellard | #undef SUFFIX
|
345 | 61382a50 | bellard | #undef USUFFIX
|
346 | b92e5a22 | bellard | #undef DATA_SIZE
|
347 | 6ebbf390 | j_mayer | #undef CPU_MMU_INDEX
|
348 | 61382a50 | bellard | #undef MMUSUFFIX
|
349 | 84b7b8e7 | bellard | #undef ADDR_READ |