revert between 56095 -> 55830 in arch
[AROS.git] / tools / fd2inline / cross / share / ppc-morphos / macros.h
bloba13ea6debb0ae38e0aeb40c52c2bbda7548ffb20
1 #ifndef __INLINE_MACROS_H
2 #define __INLINE_MACROS_H
4 #include <emul/emulregs.h> /* Emm */
5 #include <emul/emulinterface.h>
8 #define __CACHE_START(start) ((void *) ((unsigned long int) (start) & ~31))
9 #define __CACHE_LENGTH(start,length) ((((length) + (unsigned long int) (start) + 31) & ~31) - ((unsigned long int) (start) & ~31))
13 #ifndef __INLINE_STUB_H
14 #include <inline/stubs.h>
15 #endif
18 #ifdef __MORPHOS_DIRECTCALL
20 #define REG_d0 REG_D0
21 #define REG_d1 REG_D1
22 #define REG_d2 REG_D2
23 #define REG_d3 REG_D3
24 #define REG_d4 REG_D4
25 #define REG_d5 REG_D5
26 #define REG_d6 REG_D6
27 #define REG_d7 REG_D7
28 #define REG_a0 REG_A0
29 #define REG_a1 REG_A1
30 #define REG_a2 REG_A2
31 #define REG_a3 REG_A3
32 #define REG_a4 REG_A4
33 #define REG_a5 REG_A5
34 #define REG_a6 REG_A6
35 #define REG_a7 REG_A7
38 #define LP0(offs, rt, name, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
39 ({ \
40 rt _##name##_re; \
41 REG_A6 = (ULONG) (bn); \
42 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
43 _##name##_re; \
46 #define LP0NR(offs, name, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
47 ({ \
48 REG_A6 = (ULONG) (bn); \
49 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
52 #define LP1(offs, rt, name, t1, v1, r1, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
53 ({ \
54 rt _##name##_re; \
55 REG_##r1 = (ULONG) (v1); \
56 REG_A6 = (ULONG) (bn); \
57 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
58 _##name##_re; \
61 #define LP1NR(offs, name, t1, v1, r1, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
62 ({ \
63 REG_##r1 = (ULONG) (v1); \
64 REG_A6 = (ULONG) (bn); \
65 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
68 #define LP1FP(offs, rt, name, t1, v1, r1, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
69 ({ \
70 typedef fpt; \
71 rt _##name##_re; \
72 REG_##r1 = (ULONG) (v1); \
73 REG_A6 = (ULONG) (bn); \
74 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
75 _##name##_re; \
78 #if 0
81 #define LP1A5(offs, rt, name, t1, v1, r1, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
82 ({ \
83 rt _##name##_re; \
84 REG_##r1 = (ULONG) (v1); \
85 REG_A6 = (ULONG) (bn); \
86 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
87 _##name##_re; \
91 #define LP1NRA5(offs, name, t1, v1, r1, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
92 ({ \
93 REG_##r1 = (ULONG) (v1); \
94 REG_A6 = (ULONG) (bn); \
95 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
99 #define LP1A5FP(offs, rt, name, t1, v1, r1, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
100 ({ \
101 typedef fpt; \
102 rt _##name##_re; \
103 REG_A5 = (ULONG) (v1); \
104 REG_A6 = (ULONG) (bn); \
105 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
106 _##name##_re; \
109 #endif
112 #define LP2(offs, rt, name, t1, v1, r1, t2, v2, r2, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
113 ({ \
114 ULONG _##name##_v2=(ULONG)(v2); \
115 rt _##name##_re; \
116 REG_##r1 = (ULONG) (v1); \
117 REG_##r2 = _##name##_v2; \
118 REG_A6 = (ULONG) (bn); \
119 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
120 _##name##_re; \
123 #define LP2NR(offs, name, t1, v1, r1, t2, v2, r2, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
124 ({ \
125 ULONG _##name##_v2=(ULONG)(v2); \
126 REG_##r1 = (ULONG) (v1); \
127 REG_##r2 = _##name##_v2; \
128 REG_A6 = (ULONG) (bn); \
129 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
133 #define LP2UB(offs, rt, name, t1, v1, r1, t2, v2, r2, cm1, cs1, cl1, cm2, cs2, cl2 ) \
134 ({ \
135 ULONG _##name##_v2=(ULONG)(v2); \
136 rt _##name##_re; \
137 REG_##r1 = (ULONG) (v1); \
138 REG_##r2 = _##name##_v2; \
139 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
140 _##name##_re; \
144 #define LP2FP(offs, rt, name, t1, v1, r1, t2, v2, r2, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
145 ({ \
146 typedef fpt; \
147 ULONG _##name##_v2=(ULONG)(v2); \
148 rt _##name##_re; \
149 REG_##r1 = (ULONG) (v1); \
150 REG_##r2 = _##name##_v2; \
151 REG_A6 = (ULONG) (bn); \
152 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
153 _##name##_re; \
156 #define LP3(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
157 ({ \
158 ULONG _##name##_v2=(ULONG)(v2); \
159 ULONG _##name##_v3=(ULONG)(v3); \
160 rt _##name##_re; \
161 REG_##r1 = (ULONG) (v1); \
162 REG_##r2 = _##name##_v2; \
163 REG_##r3 = _##name##_v3; \
164 REG_A6 = (ULONG) (bn); \
165 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
166 _##name##_re; \
169 #define LP3NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
170 ({ \
171 ULONG _##name##_v2=(ULONG)(v2); \
172 ULONG _##name##_v3=(ULONG)(v3); \
173 REG_##r1 = (ULONG) (v1); \
174 REG_##r2 = _##name##_v2; \
175 REG_##r3 = _##name##_v3; \
176 REG_A6 = (ULONG) (bn); \
177 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
181 #define LP3UB(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, cm1, cs1, cl1, cm2, cs2, cl2 ) \
182 ({ \
183 ULONG _##name##_v2=(ULONG)(v2); \
184 ULONG _##name##_v3=(ULONG)(v3); \
185 rt _##name##_re; \
186 REG_##r1 = (ULONG) (v1); \
187 REG_##r2 = _##name##_v2; \
188 REG_##r3 = _##name##_v3; \
189 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
190 _##name##_re; \
194 #define LP3NRUB(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, cm1, cs1, cl1, cm2, cs2, cl2 ) \
195 ({ \
196 ULONG _##name##_v2=(ULONG)(v2); \
197 ULONG _##name##_v3=(ULONG)(v3); \
198 REG_##r1 = (ULONG) (v1); \
199 REG_##r2 = _##name##_v2; \
200 REG_##r3 = _##name##_v3; \
201 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
205 #define LP3FP(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
206 ({ \
207 typedef fpt; \
208 ULONG _##name##_v2=(ULONG)(v2); \
209 ULONG _##name##_v3=(ULONG)(v3); \
210 rt _##name##_re; \
211 REG_##r1 = (ULONG) (v1); \
212 REG_##r2 = _##name##_v2; \
213 REG_##r3 = _##name##_v3; \
214 REG_A6 = (ULONG) (bn); \
215 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
216 _##name##_re; \
220 #define LP3NRFP(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
221 ({ \
222 typedef fpt; \
223 ULONG _##name##_v2=(ULONG)(v2); \
224 ULONG _##name##_v3=(ULONG)(v3); \
225 REG_##r1 = (ULONG) (v1); \
226 REG_##r2 = _##name##_v2; \
227 REG_##r3 = _##name##_v3; \
228 REG_A6 = (ULONG) (bn); \
229 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
232 #define LP4(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
233 ({ \
234 ULONG _##name##_v2=(ULONG)(v2); \
235 ULONG _##name##_v3=(ULONG)(v3); \
236 ULONG _##name##_v4=(ULONG)(v4); \
237 rt _##name##_re; \
238 REG_##r1 = (ULONG) (v1); \
239 REG_##r2 = _##name##_v2; \
240 REG_##r3 = _##name##_v3; \
241 REG_##r4 = _##name##_v4; \
242 REG_A6 = (ULONG) (bn); \
243 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
244 _##name##_re; \
247 #define LP4NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
248 ({ \
249 ULONG _##name##_v2=(ULONG)(v2); \
250 ULONG _##name##_v3=(ULONG)(v3); \
251 ULONG _##name##_v4=(ULONG)(v4); \
252 REG_##r1 = (ULONG) (v1); \
253 REG_##r2 = _##name##_v2; \
254 REG_##r3 = _##name##_v3; \
255 REG_##r4 = _##name##_v4; \
256 REG_A6 = (ULONG) (bn); \
257 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
261 #define LP4FP(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
262 ({ \
263 typedef fpt; \
264 ULONG _##name##_v2=(ULONG)(v2); \
265 ULONG _##name##_v3=(ULONG)(v3); \
266 ULONG _##name##_v4=(ULONG)(v4); \
267 rt _##name##_re; \
268 REG_##r1 = (ULONG) (v1); \
269 REG_##r2 = _##name##_v2; \
270 REG_##r3 = _##name##_v3; \
271 REG_##r4 = _##name##_v4; \
272 REG_A6 = (ULONG) (bn); \
273 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
274 _##name##_re; \
277 #define LP5(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
278 ({ \
279 ULONG _##name##_v2=(ULONG)(v2); \
280 ULONG _##name##_v3=(ULONG)(v3); \
281 ULONG _##name##_v4=(ULONG)(v4); \
282 ULONG _##name##_v5=(ULONG)(v5); \
283 rt _##name##_re; \
284 REG_##r1 = (ULONG) (v1); \
285 REG_##r2 = _##name##_v2; \
286 REG_##r3 = _##name##_v3; \
287 REG_##r4 = _##name##_v4; \
288 REG_##r5 = _##name##_v5; \
289 REG_A6 = (ULONG) (bn); \
290 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
291 _##name##_re; \
294 #define LP5NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
295 ({ \
296 ULONG _##name##_v2=(ULONG)(v2); \
297 ULONG _##name##_v3=(ULONG)(v3); \
298 ULONG _##name##_v4=(ULONG)(v4); \
299 ULONG _##name##_v5=(ULONG)(v5); \
300 REG_##r1 = (ULONG) (v1); \
301 REG_##r2 = _##name##_v2; \
302 REG_##r3 = _##name##_v3; \
303 REG_##r4 = _##name##_v4; \
304 REG_##r5 = _##name##_v5; \
305 REG_A6 = (ULONG) (bn); \
306 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
310 #define LP5FP(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
311 ({ \
312 typedef fpt; \
313 ULONG _##name##_v2=(ULONG)(v2); \
314 ULONG _##name##_v3=(ULONG)(v3); \
315 ULONG _##name##_v4=(ULONG)(v4); \
316 ULONG _##name##_v5=(ULONG)(v5); \
317 rt _##name##_re; \
318 REG_##r1 = (ULONG) (v1); \
319 REG_##r2 = _##name##_v2; \
320 REG_##r3 = _##name##_v3; \
321 REG_##r4 = _##name##_v4; \
322 REG_##r5 = _##name##_v5; \
323 REG_A6 = (ULONG) (bn); \
324 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
325 _##name##_re; \
328 #define LP6(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
329 ({ \
330 ULONG _##name##_v2=(ULONG)(v2); \
331 ULONG _##name##_v3=(ULONG)(v3); \
332 ULONG _##name##_v4=(ULONG)(v4); \
333 ULONG _##name##_v5=(ULONG)(v5); \
334 ULONG _##name##_v6=(ULONG)(v6); \
335 rt _##name##_re; \
336 REG_##r1 = (ULONG) (v1); \
337 REG_##r2 = _##name##_v2; \
338 REG_##r3 = _##name##_v3; \
339 REG_##r4 = _##name##_v4; \
340 REG_##r5 = _##name##_v5; \
341 REG_##r6 = _##name##_v6; \
342 REG_A6 = (ULONG) (bn); \
343 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
344 _##name##_re; \
347 #if 0
349 #define LP6A4(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
350 ({ \
351 ULONG _##name##_v2=(ULONG)(v2); \
352 ULONG _##name##_v3=(ULONG)(v3); \
353 ULONG _##name##_v4=(ULONG)(v4); \
354 ULONG _##name##_v5=(ULONG)(v5); \
355 ULONG _##name##_v6=(ULONG)(v6); \
356 rt _##name##_re; \
357 REG_##r1 = (ULONG) (v1); \
358 REG_##r2 = _##name##_v2; \
359 REG_##r3 = _##name##_v3; \
360 REG_##r4 = _##name##_v4; \
361 REG_##r5 = _##name##_v5; \
362 REG_##r6 = _##name##_v6; \
363 REG_A6 = (ULONG) (bn); \
364 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
365 _##name##_re; \
368 #endif
370 #define LP6NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
371 ({ \
372 ULONG _##name##_v2=(ULONG)(v2); \
373 ULONG _##name##_v3=(ULONG)(v3); \
374 ULONG _##name##_v4=(ULONG)(v4); \
375 ULONG _##name##_v5=(ULONG)(v5); \
376 ULONG _##name##_v6=(ULONG)(v6); \
377 REG_##r1 = (ULONG) (v1); \
378 REG_##r2 = _##name##_v2; \
379 REG_##r3 = _##name##_v3; \
380 REG_##r4 = _##name##_v4; \
381 REG_##r5 = _##name##_v5; \
382 REG_##r6 = _##name##_v6; \
383 REG_A6 = (ULONG) (bn); \
384 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
387 #define LP7(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
388 ({ \
389 ULONG _##name##_v2=(ULONG)(v2); \
390 ULONG _##name##_v3=(ULONG)(v3); \
391 ULONG _##name##_v4=(ULONG)(v4); \
392 ULONG _##name##_v5=(ULONG)(v5); \
393 ULONG _##name##_v6=(ULONG)(v6); \
394 ULONG _##name##_v7=(ULONG)(v7); \
395 rt _##name##_re; \
396 REG_##r1 = (ULONG) (v1); \
397 REG_##r2 = _##name##_v2; \
398 REG_##r3 = _##name##_v3; \
399 REG_##r4 = _##name##_v4; \
400 REG_##r5 = _##name##_v5; \
401 REG_##r6 = _##name##_v6; \
402 REG_##r7 = _##name##_v7; \
403 REG_A6 = (ULONG) (bn); \
404 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
405 _##name##_re; \
408 #define LP7NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
409 ({ \
410 ULONG _##name##_v2=(ULONG)(v2); \
411 ULONG _##name##_v3=(ULONG)(v3); \
412 ULONG _##name##_v4=(ULONG)(v4); \
413 ULONG _##name##_v5=(ULONG)(v5); \
414 ULONG _##name##_v6=(ULONG)(v6); \
415 ULONG _##name##_v7=(ULONG)(v7); \
416 REG_##r1 = (ULONG) (v1); \
417 REG_##r2 = _##name##_v2; \
418 REG_##r3 = _##name##_v3; \
419 REG_##r4 = _##name##_v4; \
420 REG_##r5 = _##name##_v5; \
421 REG_##r6 = _##name##_v6; \
422 REG_##r7 = _##name##_v7; \
423 REG_A6 = (ULONG) (bn); \
424 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
427 #if 0
430 #define LP7A4(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
431 ({ \
432 ULONG _##name##_v2=(ULONG)(v2); \
433 ULONG _##name##_v3=(ULONG)(v3); \
434 ULONG _##name##_v4=(ULONG)(v4); \
435 ULONG _##name##_v5=(ULONG)(v5); \
436 ULONG _##name##_v6=(ULONG)(v6); \
437 ULONG _##name##_v7=(ULONG)(v7); \
438 rt _##name##_re; \
439 REG_##r1 = (ULONG) (v1); \
440 REG_##r2 = _##name##_v2; \
441 REG_##r3 = _##name##_v3; \
442 REG_##r4 = _##name##_v4; \
443 REG_##r5 = _##name##_v5; \
444 REG_##r6 = _##name##_v6; \
445 REG_##r7 = _##name##_v7; \
446 REG_A6 = (ULONG) (bn); \
447 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
448 _##name##_re; \
451 #endif
456 #define LP8(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
457 ({ \
458 ULONG _##name##_v2=(ULONG)(v2); \
459 ULONG _##name##_v3=(ULONG)(v3); \
460 ULONG _##name##_v4=(ULONG)(v4); \
461 ULONG _##name##_v5=(ULONG)(v5); \
462 ULONG _##name##_v6=(ULONG)(v6); \
463 ULONG _##name##_v7=(ULONG)(v7); \
464 ULONG _##name##_v8=(ULONG)(v8); \
465 rt _##name##_re; \
466 REG_##r1 = (ULONG) (v1); \
467 REG_##r2 = _##name##_v2; \
468 REG_##r3 = _##name##_v3; \
469 REG_##r4 = _##name##_v4; \
470 REG_##r5 = _##name##_v5; \
471 REG_##r6 = _##name##_v6; \
472 REG_##r7 = _##name##_v7; \
473 REG_##r8 = _##name##_v8; \
474 REG_A6 = (ULONG) (bn); \
475 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
476 _##name##_re; \
480 #define LP8NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
481 ({ \
482 ULONG _##name##_v2=(ULONG)(v2); \
483 ULONG _##name##_v3=(ULONG)(v3); \
484 ULONG _##name##_v4=(ULONG)(v4); \
485 ULONG _##name##_v5=(ULONG)(v5); \
486 ULONG _##name##_v6=(ULONG)(v6); \
487 ULONG _##name##_v7=(ULONG)(v7); \
488 ULONG _##name##_v8=(ULONG)(v8); \
489 REG_##r1 = (ULONG) (v1); \
490 REG_##r2 = _##name##_v2; \
491 REG_##r3 = _##name##_v3; \
492 REG_##r4 = _##name##_v4; \
493 REG_##r5 = _##name##_v5; \
494 REG_##r6 = _##name##_v6; \
495 REG_##r7 = _##name##_v7; \
496 REG_##r8 = _##name##_v8; \
497 REG_A6 = (ULONG) (bn); \
498 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
502 #define LP9(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
503 ({ \
504 ULONG _##name##_v2=(ULONG)(v2); \
505 ULONG _##name##_v3=(ULONG)(v3); \
506 ULONG _##name##_v4=(ULONG)(v4); \
507 ULONG _##name##_v5=(ULONG)(v5); \
508 ULONG _##name##_v6=(ULONG)(v6); \
509 ULONG _##name##_v7=(ULONG)(v7); \
510 ULONG _##name##_v8=(ULONG)(v8); \
511 ULONG _##name##_v9=(ULONG)(v9); \
512 rt _##name##_re; \
513 REG_##r1 = (ULONG) (v1); \
514 REG_##r2 = _##name##_v2; \
515 REG_##r3 = _##name##_v3; \
516 REG_##r4 = _##name##_v4; \
517 REG_##r5 = _##name##_v5; \
518 REG_##r6 = _##name##_v6; \
519 REG_##r7 = _##name##_v7; \
520 REG_##r8 = _##name##_v8; \
521 REG_##r9 = _##name##_v9; \
522 REG_A6 = (ULONG) (bn); \
523 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
524 _##name##_re; \
528 #define LP9NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
529 ({ \
530 ULONG _##name##_v2=(ULONG)(v2); \
531 ULONG _##name##_v3=(ULONG)(v3); \
532 ULONG _##name##_v4=(ULONG)(v4); \
533 ULONG _##name##_v5=(ULONG)(v5); \
534 ULONG _##name##_v6=(ULONG)(v6); \
535 ULONG _##name##_v7=(ULONG)(v7); \
536 ULONG _##name##_v8=(ULONG)(v8); \
537 ULONG _##name##_v9=(ULONG)(v9); \
538 REG_##r1 = (ULONG) (v1); \
539 REG_##r2 = _##name##_v2; \
540 REG_##r3 = _##name##_v3; \
541 REG_##r4 = _##name##_v4; \
542 REG_##r5 = _##name##_v5; \
543 REG_##r6 = _##name##_v6; \
544 REG_##r7 = _##name##_v7; \
545 REG_##r8 = _##name##_v8; \
546 REG_##r9 = _##name##_v9; \
547 REG_A6 = (ULONG) (bn); \
548 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
553 #define LP10(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, t10, v10, r10, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
554 ({ \
555 ULONG _##name##_v2=(ULONG)(v2); \
556 ULONG _##name##_v3=(ULONG)(v3); \
557 ULONG _##name##_v4=(ULONG)(v4); \
558 ULONG _##name##_v5=(ULONG)(v5); \
559 ULONG _##name##_v6=(ULONG)(v6); \
560 ULONG _##name##_v7=(ULONG)(v7); \
561 ULONG _##name##_v8=(ULONG)(v8); \
562 ULONG _##name##_v9=(ULONG)(v9); \
563 ULONG _##name##_v10=(ULONG)(v10); \
564 rt _##name##_re; \
565 REG_##r1 = (ULONG) (v1); \
566 REG_##r2 = _##name##_v2; \
567 REG_##r3 = _##name##_v3; \
568 REG_##r4 = _##name##_v4; \
569 REG_##r5 = _##name##_v5; \
570 REG_##r6 = _##name##_v6; \
571 REG_##r7 = _##name##_v7; \
572 REG_##r8 = _##name##_v8; \
573 REG_##r9 = _##name##_v9; \
574 REG_##r10 = _##name##_v10; \
575 REG_A6 = (ULONG) (bn); \
576 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
577 _##name##_re; \
581 #define LP10NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, t10, v10, r10, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
582 ({ \
583 ULONG _##name##_v2=(ULONG)(v2); \
584 ULONG _##name##_v3=(ULONG)(v3); \
585 ULONG _##name##_v4=(ULONG)(v4); \
586 ULONG _##name##_v5=(ULONG)(v5); \
587 ULONG _##name##_v6=(ULONG)(v6); \
588 ULONG _##name##_v7=(ULONG)(v7); \
589 ULONG _##name##_v8=(ULONG)(v8); \
590 ULONG _##name##_v9=(ULONG)(v9); \
591 ULONG _##name##_v10=(ULONG)(v10); \
592 REG_##r1 = (ULONG) (v1); \
593 REG_##r2 = _##name##_v2; \
594 REG_##r3 = _##name##_v3; \
595 REG_##r4 = _##name##_v4; \
596 REG_##r5 = _##name##_v5; \
597 REG_##r6 = _##name##_v6; \
598 REG_##r7 = _##name##_v7; \
599 REG_##r8 = _##name##_v8; \
600 REG_##r9 = _##name##_v9; \
601 REG_##r10 = _##name##_v10; \
602 REG_A6 = (ULONG) (bn); \
603 (*MyEmulHandle->EmulCallDirectOS)(-offs); \
607 #define LP11(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, t10, v10, r10, t11, v11, r11, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
608 ({ \
609 ULONG _##name##_v2=(ULONG)(v2); \
610 ULONG _##name##_v3=(ULONG)(v3); \
611 ULONG _##name##_v4=(ULONG)(v4); \
612 ULONG _##name##_v5=(ULONG)(v5); \
613 ULONG _##name##_v6=(ULONG)(v6); \
614 ULONG _##name##_v7=(ULONG)(v7); \
615 ULONG _##name##_v8=(ULONG)(v8); \
616 ULONG _##name##_v9=(ULONG)(v9); \
617 ULONG _##name##_v10=(ULONG)(v10); \
618 ULONG _##name##_v11=(ULONG)(v11); \
619 rt _##name##_re; \
620 REG_##r1 = (ULONG) (v1); \
621 REG_##r2 = _##name##_v2; \
622 REG_##r3 = _##name##_v3; \
623 REG_##r4 = _##name##_v4; \
624 REG_##r5 = _##name##_v5; \
625 REG_##r6 = _##name##_v6; \
626 REG_##r7 = _##name##_v7; \
627 REG_##r8 = _##name##_v8; \
628 REG_##r9 = _##name##_v9; \
629 REG_##r10 = _##name##_v10; \
630 REG_##r11 = _##name##_v11; \
631 REG_A6 = (ULONG) (bn); \
632 _##name##_re = (rt) (*MyEmulHandle->EmulCallDirectOS)(-offs); \
633 _##name##_re; \
636 #else
638 #define LP0(offs, rt, name, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
639 ({ \
640 struct EmulCaos MyCaos; \
641 rt _##name##_re; \
642 MyCaos.reg_a6 = (ULONG) (bn); \
643 MyCaos.caos_Un.Offset = -(offs); \
644 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
645 _##name##_re; \
648 #define LP0NR(offs, name, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
649 ({ \
650 struct EmulCaos MyCaos; \
651 MyCaos.reg_a6 = (ULONG) (bn); \
652 MyCaos.caos_Un.Offset = -(offs); \
653 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
656 #define LP1(offs, rt, name, t1, v1, r1, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
657 ({ \
658 struct EmulCaos MyCaos; \
659 rt _##name##_re; \
660 MyCaos.reg_##r1 = (ULONG) (v1); \
661 MyCaos.reg_a6 = (ULONG) (bn); \
662 MyCaos.caos_Un.Offset = -(offs); \
663 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
664 _##name##_re; \
667 #define LP1NR(offs, name, t1, v1, r1, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
668 ({ \
669 struct EmulCaos MyCaos; \
670 MyCaos.reg_##r1 = (ULONG) (v1); \
671 MyCaos.reg_a6 = (ULONG) (bn); \
672 MyCaos.caos_Un.Offset = -(offs); \
673 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
676 #define LP1FP(offs, rt, name, t1, v1, r1, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
677 ({ \
678 typedef fpt; \
679 struct EmulCaos MyCaos; \
680 rt _##name##_re; \
681 MyCaos.reg_##r1 = (ULONG) (v1); \
682 MyCaos.reg_a6 = (ULONG) (bn); \
683 MyCaos.caos_Un.Offset = -(offs); \
684 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
685 _##name##_re; \
688 #if 0
691 #define LP1A5(offs, rt, name, t1, v1, r1, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
692 ({ \
693 struct EmulCaos MyCaos; \
694 rt _##name##_re; \
695 MyCaos.reg_##r1 = (ULONG) (v1); \
696 MyCaos.reg_a6 = (ULONG) (bn); \
697 MyCaos.caos_Un.Offset = -(offs); \
698 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
699 _##name##_re; \
703 #define LP1NRA5(offs, name, t1, v1, r1, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
704 ({ \
705 struct EmulCaos MyCaos; \
706 MyCaos.reg_##r1 = (ULONG) (v1); \
707 MyCaos.reg_a6 = (ULONG) (bn); \
708 MyCaos.caos_Un.Offset = -(offs); \
709 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
713 #define LP1A5FP(offs, rt, name, t1, v1, r1, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
714 ({ \
715 typedef fpt; \
716 struct EmulCaos MyCaos; \
717 rt _##name##_re; \
718 MyCaos.reg_a5 = (ULONG) (v1); \
719 MyCaos.reg_a6 = (ULONG) (bn); \
720 MyCaos.caos_Un.Offset = -(offs); \
721 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
722 _##name##_re; \
725 #endif
728 #define LP2(offs, rt, name, t1, v1, r1, t2, v2, r2, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
729 ({ \
730 struct EmulCaos MyCaos; \
731 rt _##name##_re; \
732 MyCaos.reg_##r1 = (ULONG) (v1); \
733 MyCaos.reg_##r2 = (ULONG) (v2); \
734 MyCaos.reg_a6 = (ULONG) (bn); \
735 MyCaos.caos_Un.Offset = -(offs); \
736 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
737 _##name##_re; \
740 #define LP2NR(offs, name, t1, v1, r1, t2, v2, r2, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
741 ({ \
742 struct EmulCaos MyCaos; \
743 MyCaos.reg_##r1 = (ULONG) (v1); \
744 MyCaos.reg_##r2 = (ULONG) (v2); \
745 MyCaos.reg_a6 = (ULONG) (bn); \
746 MyCaos.caos_Un.Offset = -(offs); \
747 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
751 #define LP2UB(offs, rt, name, t1, v1, r1, t2, v2, r2, cm1, cs1, cl1, cm2, cs2, cl2 ) \
752 ({ \
753 struct EmulCaos MyCaos; \
754 rt _##name##_re; \
755 MyCaos.reg_##r1 = (ULONG) (v1); \
756 MyCaos.reg_##r2 = (ULONG) (v2); \
757 MyCaos.caos_Un.Offset = -(offs); \
758 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
759 _##name##_re; \
763 #define LP2FP(offs, rt, name, t1, v1, r1, t2, v2, r2, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
764 ({ \
765 typedef fpt; \
766 struct EmulCaos MyCaos; \
767 rt _##name##_re; \
768 MyCaos.reg_##r1 = (ULONG) (v1); \
769 MyCaos.reg_##r2 = (ULONG) (v2); \
770 MyCaos.reg_a6 = (ULONG) (bn); \
771 MyCaos.caos_Un.Offset = -(offs); \
772 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
773 _##name##_re; \
776 #define LP3(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
777 ({ \
778 struct EmulCaos MyCaos; \
779 rt _##name##_re; \
780 MyCaos.reg_##r1 = (ULONG) (v1); \
781 MyCaos.reg_##r2 = (ULONG) (v2); \
782 MyCaos.reg_##r3 = (ULONG) (v3); \
783 MyCaos.reg_a6 = (ULONG) (bn); \
784 MyCaos.caos_Un.Offset = -(offs); \
785 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
786 _##name##_re; \
789 #define LP3NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
790 ({ \
791 struct EmulCaos MyCaos; \
792 MyCaos.reg_##r1 = (ULONG) (v1); \
793 MyCaos.reg_##r2 = (ULONG) (v2); \
794 MyCaos.reg_##r3 = (ULONG) (v3); \
795 MyCaos.reg_a6 = (ULONG) (bn); \
796 MyCaos.caos_Un.Offset = -(offs); \
797 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
801 #define LP3UB(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, cm1, cs1, cl1, cm2, cs2, cl2 ) \
802 ({ \
803 struct EmulCaos MyCaos; \
804 rt _##name##_re; \
805 MyCaos.reg_##r1 = (ULONG) (v1); \
806 MyCaos.reg_##r2 = (ULONG) (v2); \
807 MyCaos.reg_##r3 = (ULONG) (v3); \
808 MyCaos.caos_Un.Offset = -(offs); \
809 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
810 _##name##_re; \
814 #define LP3NRUB(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, cm1, cs1, cl1, cm2, cs2, cl2 ) \
815 ({ \
816 struct EmulCaos MyCaos; \
817 MyCaos.reg_##r1 = (ULONG) (v1); \
818 MyCaos.reg_##r2 = (ULONG) (v2); \
819 MyCaos.reg_##r3 = (ULONG) (v3); \
820 MyCaos.caos_Un.Offset = -(offs); \
821 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
825 #define LP3FP(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
826 ({ \
827 typedef fpt; \
828 struct EmulCaos MyCaos; \
829 rt _##name##_re; \
830 MyCaos.reg_##r1 = (ULONG) (v1); \
831 MyCaos.reg_##r2 = (ULONG) (v2); \
832 MyCaos.reg_##r3 = (ULONG) (v3); \
833 MyCaos.reg_a6 = (ULONG) (bn); \
834 MyCaos.caos_Un.Offset = -(offs); \
835 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
836 _##name##_re; \
840 #define LP3NRFP(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
841 ({ \
842 typedef fpt; \
843 struct EmulCaos MyCaos; \
844 MyCaos.reg_##r1 = (ULONG) (v1); \
845 MyCaos.reg_##r2 = (ULONG) (v2); \
846 MyCaos.reg_##r3 = (ULONG) (v3); \
847 MyCaos.reg_a6 = (ULONG) (bn); \
848 MyCaos.caos_Un.Offset = -(offs); \
849 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
852 #define LP4(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
853 ({ \
854 struct EmulCaos MyCaos; \
855 rt _##name##_re; \
856 MyCaos.reg_##r1 = (ULONG) (v1); \
857 MyCaos.reg_##r2 = (ULONG) (v2); \
858 MyCaos.reg_##r3 = (ULONG) (v3); \
859 MyCaos.reg_##r4 = (ULONG) (v4); \
860 MyCaos.reg_a6 = (ULONG) (bn); \
861 MyCaos.caos_Un.Offset = -(offs); \
862 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
863 _##name##_re; \
866 #define LP4NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
867 ({ \
868 struct EmulCaos MyCaos; \
869 MyCaos.reg_##r1 = (ULONG) (v1); \
870 MyCaos.reg_##r2 = (ULONG) (v2); \
871 MyCaos.reg_##r3 = (ULONG) (v3); \
872 MyCaos.reg_##r4 = (ULONG) (v4); \
873 MyCaos.reg_a6 = (ULONG) (bn); \
874 MyCaos.caos_Un.Offset = -(offs); \
875 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
879 #define LP4FP(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
880 ({ \
881 typedef fpt; \
882 struct EmulCaos MyCaos; \
883 rt _##name##_re; \
884 MyCaos.reg_##r1 = (ULONG) (v1); \
885 MyCaos.reg_##r2 = (ULONG) (v2); \
886 MyCaos.reg_##r3 = (ULONG) (v3); \
887 MyCaos.reg_##r4 = (ULONG) (v4); \
888 MyCaos.reg_a6 = (ULONG) (bn); \
889 MyCaos.caos_Un.Offset = -(offs); \
890 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
891 _##name##_re; \
894 #define LP5(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
895 ({ \
896 struct EmulCaos MyCaos; \
897 rt _##name##_re; \
898 MyCaos.reg_##r1 = (ULONG) (v1); \
899 MyCaos.reg_##r2 = (ULONG) (v2); \
900 MyCaos.reg_##r3 = (ULONG) (v3); \
901 MyCaos.reg_##r4 = (ULONG) (v4); \
902 MyCaos.reg_##r5 = (ULONG) (v5); \
903 MyCaos.reg_a6 = (ULONG) (bn); \
904 MyCaos.caos_Un.Offset = -(offs); \
905 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
906 _##name##_re; \
909 #define LP5NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
910 ({ \
911 struct EmulCaos MyCaos; \
912 MyCaos.reg_##r1 = (ULONG) (v1); \
913 MyCaos.reg_##r2 = (ULONG) (v2); \
914 MyCaos.reg_##r3 = (ULONG) (v3); \
915 MyCaos.reg_##r4 = (ULONG) (v4); \
916 MyCaos.reg_##r5 = (ULONG) (v5); \
917 MyCaos.reg_a6 = (ULONG) (bn); \
918 MyCaos.caos_Un.Offset = -(offs); \
919 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
923 #define LP5FP(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, bt, bn, fpt, cm1, cs1, cl1, cm2, cs2, cl2 ) \
924 ({ \
925 typedef fpt; \
926 struct EmulCaos MyCaos; \
927 rt _##name##_re; \
928 MyCaos.reg_##r1 = (ULONG) (v1); \
929 MyCaos.reg_##r2 = (ULONG) (v2); \
930 MyCaos.reg_##r3 = (ULONG) (v3); \
931 MyCaos.reg_##r4 = (ULONG) (v4); \
932 MyCaos.reg_##r5 = (ULONG) (v5); \
933 MyCaos.reg_a6 = (ULONG) (bn); \
934 MyCaos.caos_Un.Offset = -(offs); \
935 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
936 _##name##_re; \
939 #define LP6(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
940 ({ \
941 struct EmulCaos MyCaos; \
942 rt _##name##_re; \
943 MyCaos.reg_##r1 = (ULONG) (v1); \
944 MyCaos.reg_##r2 = (ULONG) (v2); \
945 MyCaos.reg_##r3 = (ULONG) (v3); \
946 MyCaos.reg_##r4 = (ULONG) (v4); \
947 MyCaos.reg_##r5 = (ULONG) (v5); \
948 MyCaos.reg_##r6 = (ULONG) (v6); \
949 MyCaos.reg_a6 = (ULONG) (bn); \
950 MyCaos.caos_Un.Offset = -(offs); \
951 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
952 _##name##_re; \
955 #if 0
957 #define LP6A4(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
958 ({ \
959 struct EmulCaos MyCaos; \
960 rt _##name##_re; \
961 MyCaos.reg_##r1 = (ULONG) (v1); \
962 MyCaos.reg_##r2 = (ULONG) (v2); \
963 MyCaos.reg_##r3 = (ULONG) (v3); \
964 MyCaos.reg_##r4 = (ULONG) (v4); \
965 MyCaos.reg_##r5 = (ULONG) (v5); \
966 MyCaos.reg_##r6 = (ULONG) (v6); \
967 MyCaos.reg_a6 = (ULONG) (bn); \
968 MyCaos.caos_Un.Offset = -(offs); \
969 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
970 _##name##_re; \
973 #endif
975 #define LP6NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
976 ({ \
977 struct EmulCaos MyCaos; \
978 MyCaos.reg_##r1 = (ULONG) (v1); \
979 MyCaos.reg_##r2 = (ULONG) (v2); \
980 MyCaos.reg_##r3 = (ULONG) (v3); \
981 MyCaos.reg_##r4 = (ULONG) (v4); \
982 MyCaos.reg_##r5 = (ULONG) (v5); \
983 MyCaos.reg_##r6 = (ULONG) (v6); \
984 MyCaos.reg_a6 = (ULONG) (bn); \
985 MyCaos.caos_Un.Offset = -(offs); \
986 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
989 #define LP7(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
990 ({ \
991 struct EmulCaos MyCaos; \
992 rt _##name##_re; \
993 MyCaos.reg_##r1 = (ULONG) (v1); \
994 MyCaos.reg_##r2 = (ULONG) (v2); \
995 MyCaos.reg_##r3 = (ULONG) (v3); \
996 MyCaos.reg_##r4 = (ULONG) (v4); \
997 MyCaos.reg_##r5 = (ULONG) (v5); \
998 MyCaos.reg_##r6 = (ULONG) (v6); \
999 MyCaos.reg_##r7 = (ULONG) (v7); \
1000 MyCaos.reg_a6 = (ULONG) (bn); \
1001 MyCaos.caos_Un.Offset = -(offs); \
1002 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
1003 _##name##_re; \
1006 #define LP7NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
1007 ({ \
1008 struct EmulCaos MyCaos; \
1009 MyCaos.reg_##r1 = (ULONG) (v1); \
1010 MyCaos.reg_##r2 = (ULONG) (v2); \
1011 MyCaos.reg_##r3 = (ULONG) (v3); \
1012 MyCaos.reg_##r4 = (ULONG) (v4); \
1013 MyCaos.reg_##r5 = (ULONG) (v5); \
1014 MyCaos.reg_##r6 = (ULONG) (v6); \
1015 MyCaos.reg_##r7 = (ULONG) (v7); \
1016 MyCaos.reg_a6 = (ULONG) (bn); \
1017 MyCaos.caos_Un.Offset = -(offs); \
1018 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
1021 #if 0
1024 #define LP7A4(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
1025 ({ \
1026 struct EmulCaos MyCaos; \
1027 rt _##name##_re; \
1028 MyCaos.reg_##r1 = (ULONG) (v1); \
1029 MyCaos.reg_##r2 = (ULONG) (v2); \
1030 MyCaos.reg_##r3 = (ULONG) (v3); \
1031 MyCaos.reg_##r4 = (ULONG) (v4); \
1032 MyCaos.reg_##r5 = (ULONG) (v5); \
1033 MyCaos.reg_##r6 = (ULONG) (v6); \
1034 MyCaos.reg_##r7 = (ULONG) (v7); \
1035 MyCaos.reg_a6 = (ULONG) (bn); \
1036 MyCaos.caos_Un.Offset = -(offs); \
1037 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
1038 _##name##_re; \
1041 #endif
1046 #define LP8(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
1047 ({ \
1048 struct EmulCaos MyCaos; \
1049 rt _##name##_re; \
1050 MyCaos.reg_##r1 = (ULONG) (v1); \
1051 MyCaos.reg_##r2 = (ULONG) (v2); \
1052 MyCaos.reg_##r3 = (ULONG) (v3); \
1053 MyCaos.reg_##r4 = (ULONG) (v4); \
1054 MyCaos.reg_##r5 = (ULONG) (v5); \
1055 MyCaos.reg_##r6 = (ULONG) (v6); \
1056 MyCaos.reg_##r7 = (ULONG) (v7); \
1057 MyCaos.reg_##r8 = (ULONG) (v8); \
1058 MyCaos.reg_a6 = (ULONG) (bn); \
1059 MyCaos.caos_Un.Offset = -(offs); \
1060 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
1061 _##name##_re; \
1065 #define LP8NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
1066 ({ \
1067 struct EmulCaos MyCaos; \
1068 MyCaos.reg_##r1 = (ULONG) (v1); \
1069 MyCaos.reg_##r2 = (ULONG) (v2); \
1070 MyCaos.reg_##r3 = (ULONG) (v3); \
1071 MyCaos.reg_##r4 = (ULONG) (v4); \
1072 MyCaos.reg_##r5 = (ULONG) (v5); \
1073 MyCaos.reg_##r6 = (ULONG) (v6); \
1074 MyCaos.reg_##r7 = (ULONG) (v7); \
1075 MyCaos.reg_##r8 = (ULONG) (v8); \
1076 MyCaos.reg_a6 = (ULONG) (bn); \
1077 MyCaos.caos_Un.Offset = -(offs); \
1078 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
1082 #define LP9(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
1083 ({ \
1084 struct EmulCaos MyCaos; \
1085 rt _##name##_re; \
1086 MyCaos.reg_##r1 = (ULONG) (v1); \
1087 MyCaos.reg_##r2 = (ULONG) (v2); \
1088 MyCaos.reg_##r3 = (ULONG) (v3); \
1089 MyCaos.reg_##r4 = (ULONG) (v4); \
1090 MyCaos.reg_##r5 = (ULONG) (v5); \
1091 MyCaos.reg_##r6 = (ULONG) (v6); \
1092 MyCaos.reg_##r7 = (ULONG) (v7); \
1093 MyCaos.reg_##r8 = (ULONG) (v8); \
1094 MyCaos.reg_##r9 = (ULONG) (v9); \
1095 MyCaos.reg_a6 = (ULONG) (bn); \
1096 MyCaos.caos_Un.Offset = -(offs); \
1097 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
1098 _##name##_re; \
1102 #define LP9NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
1103 ({ \
1104 struct EmulCaos MyCaos; \
1105 MyCaos.reg_##r1 = (ULONG) (v1); \
1106 MyCaos.reg_##r2 = (ULONG) (v2); \
1107 MyCaos.reg_##r3 = (ULONG) (v3); \
1108 MyCaos.reg_##r4 = (ULONG) (v4); \
1109 MyCaos.reg_##r5 = (ULONG) (v5); \
1110 MyCaos.reg_##r6 = (ULONG) (v6); \
1111 MyCaos.reg_##r7 = (ULONG) (v7); \
1112 MyCaos.reg_##r8 = (ULONG) (v8); \
1113 MyCaos.reg_##r9 = (ULONG) (v9); \
1114 MyCaos.reg_a6 = (ULONG) (bn); \
1115 MyCaos.caos_Un.Offset = -(offs); \
1116 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
1121 #define LP10(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, t10, v10, r10, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
1122 ({ \
1123 struct EmulCaos MyCaos; \
1124 rt _##name##_re; \
1125 MyCaos.reg_##r1 = (ULONG) (v1); \
1126 MyCaos.reg_##r2 = (ULONG) (v2); \
1127 MyCaos.reg_##r3 = (ULONG) (v3); \
1128 MyCaos.reg_##r4 = (ULONG) (v4); \
1129 MyCaos.reg_##r5 = (ULONG) (v5); \
1130 MyCaos.reg_##r6 = (ULONG) (v6); \
1131 MyCaos.reg_##r7 = (ULONG) (v7); \
1132 MyCaos.reg_##r8 = (ULONG) (v8); \
1133 MyCaos.reg_##r9 = (ULONG) (v9); \
1134 MyCaos.reg_##r10 = (ULONG) (v10); \
1135 MyCaos.reg_a6 = (ULONG) (bn); \
1136 MyCaos.caos_Un.Offset = -(offs); \
1137 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
1138 _##name##_re; \
1142 #define LP10NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, t10, v10, r10, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
1143 ({ \
1144 struct EmulCaos MyCaos; \
1145 MyCaos.reg_##r1 = (ULONG) (v1); \
1146 MyCaos.reg_##r2 = (ULONG) (v2); \
1147 MyCaos.reg_##r3 = (ULONG) (v3); \
1148 MyCaos.reg_##r4 = (ULONG) (v4); \
1149 MyCaos.reg_##r5 = (ULONG) (v5); \
1150 MyCaos.reg_##r6 = (ULONG) (v6); \
1151 MyCaos.reg_##r7 = (ULONG) (v7); \
1152 MyCaos.reg_##r8 = (ULONG) (v8); \
1153 MyCaos.reg_##r9 = (ULONG) (v9); \
1154 MyCaos.reg_##r10 = (ULONG) (v10); \
1155 MyCaos.reg_a6 = (ULONG) (bn); \
1156 MyCaos.caos_Un.Offset = -(offs); \
1157 (*MyEmulHandle->EmulCallOS)(&MyCaos); \
1161 #define LP11(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, t10, v10, r10, t11, v11, r11, bt, bn, cm1, cs1, cl1, cm2, cs2, cl2 ) \
1162 ({ \
1163 struct EmulCaos MyCaos; \
1164 rt _##name##_re; \
1165 MyCaos.reg_##r1 = (ULONG) (v1); \
1166 MyCaos.reg_##r2 = (ULONG) (v2); \
1167 MyCaos.reg_##r3 = (ULONG) (v3); \
1168 MyCaos.reg_##r4 = (ULONG) (v4); \
1169 MyCaos.reg_##r5 = (ULONG) (v5); \
1170 MyCaos.reg_##r6 = (ULONG) (v6); \
1171 MyCaos.reg_##r7 = (ULONG) (v7); \
1172 MyCaos.reg_##r8 = (ULONG) (v8); \
1173 MyCaos.reg_##r9 = (ULONG) (v9); \
1174 MyCaos.reg_##r10 = (ULONG) (v10); \
1175 MyCaos.reg_##r11 = (ULONG) (v11); \
1176 MyCaos.reg_a6 = (ULONG) (bn); \
1177 MyCaos.caos_Un.Offset = -(offs); \
1178 _##name##_re = (rt) (*MyEmulHandle->EmulCallOS)(&MyCaos); \
1179 _##name##_re; \
1182 #endif
1183 #endif