]>
Commit | Line | Data |
---|---|---|
c906108c SS |
1 | /* This file is part of the program psim. |
2 | ||
3 | Copyright (C) 1994-1995, Andrew Cagney <[email protected]> | |
4 | ||
5 | This program is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
3fd725ef | 7 | the Free Software Foundation; either version 3 of the License, or |
c906108c SS |
8 | (at your option) any later version. |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
51b318de | 16 | along with this program; if not, see <http://www.gnu.org/licenses/>. |
c906108c SS |
17 | |
18 | */ | |
19 | ||
20 | ||
21 | #ifndef _INLINE_H_ | |
22 | #define _INLINE_H_ | |
23 | ||
f6428ce4 | 24 | #include "ansidecl.h" |
c906108c SS |
25 | |
26 | #define STATIC(TYPE) static TYPE | |
27 | ||
28 | ||
29 | /* sim_endian is always inlined */ | |
30 | ||
31 | #if !defined(_SIM_ENDIAN_C_) && (SIM_ENDIAN_INLINE & INCLUDE_MODULE) | |
32 | # if (SIM_ENDIAN_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
33 | # define INLINE_PSIM_ENDIAN(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
34 | # define EXTERN_PSIM_ENDIAN(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 35 | # else |
f6428ce4 MF |
36 | # define INLINE_PSIM_ENDIAN(TYPE) ATTRIBUTE_UNUSED static TYPE |
37 | # define EXTERN_PSIM_ENDIAN(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
38 | # endif |
39 | #else | |
d29d5195 MG |
40 | # define INLINE_PSIM_ENDIAN(TYPE) TYPE |
41 | # define EXTERN_PSIM_ENDIAN(TYPE) TYPE | |
c906108c SS |
42 | #endif |
43 | ||
54c47dfb | 44 | #if (SIM_ENDIAN_INLINE & INLINE_LOCALS) |
d29d5195 | 45 | # define STATIC_INLINE_PSIM_ENDIAN(TYPE) static INLINE TYPE |
c906108c | 46 | #else |
d29d5195 | 47 | # define STATIC_INLINE_PSIM_ENDIAN(TYPE) static TYPE |
c906108c SS |
48 | #endif |
49 | ||
50 | ||
51 | /* bits is always inlined */ | |
52 | ||
53 | #if !defined(_BITS_C_) && (BITS_INLINE & INCLUDE_MODULE) | |
54 | # if (BITS_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
55 | # define INLINE_BITS(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
56 | # define EXTERN_BITS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 57 | # else |
f6428ce4 MF |
58 | # define INLINE_BITS(TYPE) ATTRIBUTE_UNUSED static TYPE |
59 | # define EXTERN_BITS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
60 | # endif |
61 | #else | |
62 | # define INLINE_BITS(TYPE) TYPE | |
63 | # define EXTERN_BITS(TYPE) TYPE | |
64 | #endif | |
65 | ||
54c47dfb | 66 | #if (BITS_INLINE & INLINE_LOCALS) |
c906108c SS |
67 | # define STATIC_INLINE_BITS(TYPE) static INLINE TYPE |
68 | #else | |
69 | # define STATIC_INLINE_BITS(TYPE) static TYPE | |
70 | #endif | |
71 | ||
72 | ||
73 | /* core is inlined with inline.c */ | |
74 | ||
75 | #if defined(_INLINE_C_) && !defined(_CORE_C_) && (CORE_INLINE & INCLUDE_MODULE) | |
76 | # if (CORE_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
77 | # define INLINE_CORE(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
78 | # define EXTERN_CORE(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 79 | #else |
f6428ce4 MF |
80 | # define INLINE_CORE(TYPE) ATTRIBUTE_UNUSED static TYPE |
81 | # define EXTERN_CORE(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
82 | #endif |
83 | #else | |
84 | # define INLINE_CORE(TYPE) TYPE | |
85 | # define EXTERN_CORE(TYPE) TYPE | |
86 | #endif | |
87 | ||
54c47dfb | 88 | #if (CORE_INLINE & INLINE_LOCALS) |
c906108c SS |
89 | # define STATIC_INLINE_CORE(TYPE) static INLINE TYPE |
90 | #else | |
91 | # define STATIC_INLINE_CORE(TYPE) static TYPE | |
92 | #endif | |
93 | ||
94 | ||
95 | /* vm is inlined with inline.c */ | |
96 | ||
97 | #if defined(_INLINE_C_) && !defined(_VM_C_) && (VM_INLINE & INCLUDE_MODULE) | |
98 | # if (VM_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
99 | # define INLINE_VM(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
100 | # define EXTERN_VM(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 101 | #else |
f6428ce4 MF |
102 | # define INLINE_VM(TYPE) ATTRIBUTE_UNUSED static TYPE |
103 | # define EXTERN_VM(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
104 | #endif |
105 | #else | |
106 | # define INLINE_VM(TYPE) TYPE | |
107 | # define EXTERN_VM(TYPE) TYPE | |
108 | #endif | |
109 | ||
54c47dfb | 110 | #if (VM_INLINE & INLINE_LOCALS) |
c906108c SS |
111 | # define STATIC_INLINE_VM(TYPE) static INLINE TYPE |
112 | #else | |
113 | # define STATIC_INLINE_VM(TYPE) static TYPE | |
114 | #endif | |
115 | ||
116 | ||
117 | /* cpu is always inlined */ | |
118 | ||
119 | #if !defined(_CPU_C_) && (CPU_INLINE & INCLUDE_MODULE) | |
120 | # if (CPU_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
121 | # define INLINE_CPU(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
122 | # define EXTERN_CPU(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 123 | #else |
f6428ce4 MF |
124 | # define INLINE_CPU(TYPE) ATTRIBUTE_UNUSED static TYPE |
125 | # define EXTERN_CPU(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
126 | #endif |
127 | #else | |
128 | # define INLINE_CPU(TYPE) TYPE | |
129 | # define EXTERN_CPU(TYPE) TYPE | |
130 | #endif | |
131 | ||
54c47dfb | 132 | #if (CPU_INLINE & INLINE_LOCALS) |
c906108c SS |
133 | # define STATIC_INLINE_CPU(TYPE) static INLINE TYPE |
134 | #else | |
135 | # define STATIC_INLINE_CPU(TYPE) static TYPE | |
136 | #endif | |
137 | ||
138 | ||
139 | /* model is inlined with inline.c */ | |
140 | ||
141 | #if defined(_INLINE_C_) && !defined(_MODEL_C_) && (MODEL_INLINE & INCLUDE_MODULE) | |
142 | # if (MODEL_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
143 | # define INLINE_MODEL(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
144 | # define EXTERN_MODEL(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 145 | #else |
f6428ce4 MF |
146 | # define INLINE_MODEL(TYPE) ATTRIBUTE_UNUSED static TYPE |
147 | # define EXTERN_MODEL(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
148 | #endif |
149 | #else | |
150 | # define INLINE_MODEL(TYPE) TYPE | |
151 | # define EXTERN_MODEL(TYPE) TYPE | |
152 | #endif | |
153 | ||
54c47dfb | 154 | #if (MODEL_INLINE & INLINE_LOCALS) |
c906108c SS |
155 | # define STATIC_INLINE_MODEL(TYPE) static INLINE TYPE |
156 | #else | |
157 | # define STATIC_INLINE_MODEL(TYPE) static TYPE | |
158 | #endif | |
159 | ||
160 | ||
161 | /* events is inlined with inline.c */ | |
162 | ||
163 | #if defined(_INLINE_C_) && !defined(_EVENTS_C_) && (EVENTS_INLINE & INCLUDE_MODULE) | |
164 | # if (EVENTS_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
165 | # define INLINE_EVENTS(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
166 | # define EXTERN_EVENTS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 167 | #else |
f6428ce4 MF |
168 | # define INLINE_EVENTS(TYPE) ATTRIBUTE_UNUSED static TYPE |
169 | # define EXTERN_EVENTS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
170 | #endif |
171 | #else | |
172 | # define INLINE_EVENTS(TYPE) TYPE | |
173 | # define EXTERN_EVENTS(TYPE) TYPE | |
174 | #endif | |
175 | ||
54c47dfb | 176 | #if (EVENTS_INLINE & INLINE_LOCALS) |
c906108c SS |
177 | # define STATIC_INLINE_EVENTS(TYPE) static INLINE TYPE |
178 | #else | |
179 | # define STATIC_INLINE_EVENTS(TYPE) static TYPE | |
180 | #endif | |
181 | ||
182 | ||
183 | /* mon is inlined with inline.c */ | |
184 | ||
185 | #if defined(_INLINE_C_) && !defined(_MON_C_) && (MON_INLINE & INCLUDE_MODULE) | |
186 | # if (MON_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
187 | # define INLINE_MON(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
188 | # define EXTERN_MON(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 189 | #else |
f6428ce4 MF |
190 | # define INLINE_MON(TYPE) ATTRIBUTE_UNUSED static TYPE |
191 | # define EXTERN_MON(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
192 | #endif |
193 | #else | |
194 | # define INLINE_MON(TYPE) TYPE | |
195 | # define EXTERN_MON(TYPE) TYPE | |
196 | #endif | |
197 | ||
54c47dfb | 198 | #if (MON_INLINE & INLINE_LOCALS) |
c906108c SS |
199 | # define STATIC_INLINE_MON(TYPE) static INLINE TYPE |
200 | #else | |
201 | # define STATIC_INLINE_MON(TYPE) static TYPE | |
202 | #endif | |
203 | ||
204 | ||
205 | /* registers is inlined with inline.c */ | |
206 | ||
207 | #if defined(_INLINE_C_) && !defined(_REGISTERS_C_) && (REGISTERS_INLINE & INCLUDE_MODULE) | |
208 | # if (REGISTERS_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
209 | # define INLINE_REGISTERS(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
210 | # define EXTERN_REGISTERS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 211 | #else |
f6428ce4 MF |
212 | # define INLINE_REGISTERS(TYPE) ATTRIBUTE_UNUSED static TYPE |
213 | # define EXTERN_REGISTERS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
214 | #endif |
215 | #else | |
216 | # define INLINE_REGISTERS(TYPE) TYPE | |
217 | # define EXTERN_REGISTERS(TYPE) TYPE | |
218 | #endif | |
219 | ||
54c47dfb | 220 | #if (REGISTERS_INLINE & INLINE_LOCALS) |
c906108c SS |
221 | # define STATIC_INLINE_REGISTERS(TYPE) static INLINE TYPE |
222 | #else | |
223 | # define STATIC_INLINE_REGISTERS(TYPE) static TYPE | |
224 | #endif | |
225 | ||
226 | ||
227 | /* interrupts is inlined with inline.c */ | |
228 | ||
229 | #if defined(_INLINE_C_) && !defined(_INTERRUPTS_C_) && (INTERRUPTS_INLINE & INCLUDE_MODULE) | |
230 | # if (INTERRUPTS_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
231 | # define INLINE_INTERRUPTS(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
232 | # define EXTERN_INTERRUPTS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 233 | #else |
f6428ce4 MF |
234 | # define INLINE_INTERRUPTS(TYPE) ATTRIBUTE_UNUSED static TYPE |
235 | # define EXTERN_INTERRUPTS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
236 | #endif |
237 | #else | |
238 | # define INLINE_INTERRUPTS(TYPE) TYPE | |
239 | # define EXTERN_INTERRUPTS(TYPE) TYPE | |
240 | #endif | |
241 | ||
54c47dfb | 242 | #if (INTERRUPTS_INLINE & INLINE_LOCALS) |
c906108c SS |
243 | # define STATIC_INLINE_INTERRUPTS(TYPE) static INLINE TYPE |
244 | #else | |
245 | # define STATIC_INLINE_INTERRUPTS(TYPE) static TYPE | |
246 | #endif | |
247 | ||
248 | ||
249 | /* device is inlined with inline.c */ | |
250 | ||
251 | #if defined(_INLINE_C_) && !defined(_DEVICE_C_) && (DEVICE_INLINE & INCLUDE_MODULE) | |
252 | # if (DEVICE_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
253 | # define INLINE_DEVICE(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
254 | # define EXTERN_DEVICE(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 255 | #else |
f6428ce4 MF |
256 | # define INLINE_DEVICE(TYPE) ATTRIBUTE_UNUSED static TYPE |
257 | # define EXTERN_DEVICE(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
258 | #endif |
259 | #else | |
260 | # define INLINE_DEVICE(TYPE) TYPE | |
261 | # define EXTERN_DEVICE(TYPE) TYPE | |
262 | #endif | |
263 | ||
54c47dfb | 264 | #if (DEVICE_INLINE & INLINE_LOCALS) |
c906108c SS |
265 | # define STATIC_INLINE_DEVICE(TYPE) static INLINE TYPE |
266 | #else | |
267 | # define STATIC_INLINE_DEVICE(TYPE) static TYPE | |
268 | #endif | |
269 | ||
270 | ||
271 | /* tree is inlined with inline.c */ | |
272 | ||
273 | #if defined(_INLINE_C_) && !defined(_TREE_C_) && (TREE_INLINE & INCLUDE_MODULE) | |
274 | # if (TREE_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
275 | # define INLINE_TREE(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
276 | # define EXTERN_TREE(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 277 | #else |
f6428ce4 MF |
278 | # define INLINE_TREE(TYPE) ATTRIBUTE_UNUSED static TYPE |
279 | # define EXTERN_TREE(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
280 | #endif |
281 | #else | |
282 | # define INLINE_TREE(TYPE) TYPE | |
283 | # define EXTERN_TREE(TYPE) TYPE | |
284 | #endif | |
285 | ||
54c47dfb | 286 | #if (TREE_INLINE & INLINE_LOCALS) |
c906108c SS |
287 | # define STATIC_INLINE_TREE(TYPE) static INLINE TYPE |
288 | #else | |
289 | # define STATIC_INLINE_TREE(TYPE) static TYPE | |
290 | #endif | |
291 | ||
292 | ||
293 | /* spreg is inlined with inline.c */ | |
294 | ||
295 | #if defined(_INLINE_C_) && !defined(_SPREG_C_) && (SPREG_INLINE & INCLUDE_MODULE) | |
296 | # if (SPREG_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
297 | # define INLINE_SPREG(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
298 | # define EXTERN_SPREG(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 299 | #else |
f6428ce4 MF |
300 | # define INLINE_SPREG(TYPE) ATTRIBUTE_UNUSED static TYPE |
301 | # define EXTERN_SPREG(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
302 | #endif |
303 | #else | |
304 | # define INLINE_SPREG(TYPE) TYPE | |
305 | # define EXTERN_SPREG(TYPE) TYPE | |
306 | #endif | |
307 | ||
54c47dfb | 308 | #if (SPREG_INLINE & INLINE_LOCALS) |
c906108c SS |
309 | # define STATIC_INLINE_SPREG(TYPE) static INLINE TYPE |
310 | #else | |
311 | # define STATIC_INLINE_SPREG(TYPE) static TYPE | |
312 | #endif | |
313 | ||
314 | ||
315 | /* semantics is inlined with inline.c */ | |
316 | ||
317 | #if defined(_INLINE_C_) && !defined(_SEMANTICS_C_) && (SEMANTICS_INLINE & INCLUDE_MODULE) | |
318 | # if (SEMANTICS_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
319 | # define PSIM_INLINE_SEMANTICS(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
320 | # define PSIM_EXTERN_SEMANTICS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 321 | #else |
f6428ce4 MF |
322 | # define PSIM_INLINE_SEMANTICS(TYPE) ATTRIBUTE_UNUSED static TYPE |
323 | # define PSIM_EXTERN_SEMANTICS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
324 | #endif |
325 | #else | |
0dc73ef7 MF |
326 | # define PSIM_INLINE_SEMANTICS(TYPE) TYPE |
327 | # define PSIM_EXTERN_SEMANTICS(TYPE) TYPE | |
c906108c SS |
328 | #endif |
329 | ||
d29d5195 | 330 | #if 0 /* this isn't used */ |
54c47dfb | 331 | #if (SEMANTICS_INLINE & INLINE_LOCALS) |
c906108c SS |
332 | # define STATIC_INLINE_SEMANTICS(TYPE) static INLINE TYPE |
333 | #else | |
0dc73ef7 | 334 | # define STATIC_INLINE_SEMANTICS(TYPE) static TYPE |
c906108c | 335 | #endif |
d29d5195 | 336 | #endif |
c906108c SS |
337 | |
338 | ||
339 | /* idecode is actually not inlined */ | |
340 | ||
341 | #if defined(_INLINE_C_) && !defined(_IDECODE_C_) && (IDECODE_INLINE & INCLUDE_MODULE) | |
342 | # if (IDECODE_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
343 | # define PSIM_INLINE_IDECODE(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
344 | # define EXTERN_IDECODE(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 345 | #else |
f6428ce4 MF |
346 | # define PSIM_INLINE_IDECODE(TYPE) ATTRIBUTE_UNUSED static TYPE |
347 | # define EXTERN_IDECODE(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
348 | #endif |
349 | #else | |
0dc73ef7 MF |
350 | # define PSIM_INLINE_IDECODE(TYPE) TYPE |
351 | # define EXTERN_IDECODE(TYPE) TYPE | |
c906108c SS |
352 | #endif |
353 | ||
d29d5195 | 354 | #if 0 /* this isn't used */ |
54c47dfb | 355 | #if (IDECODE_INLINE & INLINE_LOCALS) |
c906108c SS |
356 | # define STATIC_INLINE_IDECODE(TYPE) static INLINE TYPE |
357 | #else | |
0dc73ef7 | 358 | # define STATIC_INLINE_IDECODE(TYPE) static TYPE |
c906108c | 359 | #endif |
d29d5195 | 360 | #endif |
c906108c SS |
361 | |
362 | ||
363 | /* icache is inlined with inline.c */ | |
364 | ||
365 | #if defined(_INLINE_C_) && !defined(_ICACHE_C_) && (ICACHE_INLINE & INCLUDE_MODULE) | |
366 | # if (ICACHE_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
367 | # define PSIM_INLINE_ICACHE(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
368 | # define EXTERN_ICACHE(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 369 | #else |
f6428ce4 MF |
370 | # define PSIM_INLINE_ICACHE(TYPE) ATTRIBUTE_UNUSED static TYPE |
371 | # define EXTERN_ICACHE(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
372 | #endif |
373 | #else | |
0dc73ef7 MF |
374 | # define PSIM_INLINE_ICACHE(TYPE) TYPE |
375 | # define EXTERN_ICACHE(TYPE) TYPE | |
c906108c SS |
376 | #endif |
377 | ||
d29d5195 | 378 | #if 0 /* this isn't used */ |
54c47dfb | 379 | #if (ICACHE_INLINE & INLINE_LOCALS) |
c906108c SS |
380 | # define STATIC_INLINE_ICACHE(TYPE) static INLINE TYPE |
381 | #else | |
0dc73ef7 | 382 | # define STATIC_INLINE_ICACHE(TYPE) static TYPE |
c906108c | 383 | #endif |
d29d5195 | 384 | #endif |
c906108c SS |
385 | |
386 | ||
387 | /* support is always inlined */ | |
388 | ||
389 | #if !defined(_SUPPORT_C_) && (SUPPORT_INLINE & INCLUDE_MODULE) | |
390 | # if (SUPPORT_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
391 | # define PSIM_INLINE_SUPPORT(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
392 | # define EXTERN_SUPPORT(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 393 | #else |
f6428ce4 MF |
394 | # define PSIM_INLINE_SUPPORT(TYPE) ATTRIBUTE_UNUSED static TYPE |
395 | # define EXTERN_SUPPORT(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
396 | #endif |
397 | #else | |
d29d5195 | 398 | # define PSIM_INLINE_SUPPORT(TYPE) TYPE |
c906108c SS |
399 | # define EXTERN_SUPPORT(TYPE) TYPE |
400 | #endif | |
401 | ||
d29d5195 | 402 | #if 0 /* this isn't used */ |
54c47dfb | 403 | #if (SUPPORT_INLINE & INLINE_LOCALS) |
c906108c SS |
404 | # define STATIC_INLINE_SUPPORT(TYPE) static INLINE TYPE |
405 | #else | |
406 | # define STATIC_INLINE_SUPPORT(TYPE) static TYPE | |
407 | #endif | |
d29d5195 | 408 | #endif |
c906108c SS |
409 | |
410 | ||
411 | /* options is inlined with inline.c */ | |
412 | ||
413 | #if defined(_INLINE_C_) && !defined(_OPTIONS_C_) && (OPTIONS_INLINE & INCLUDE_MODULE) | |
414 | # if (OPTIONS_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
415 | # define INLINE_OPTIONS(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
416 | # define EXTERN_OPTIONS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 417 | #else |
f6428ce4 MF |
418 | # define INLINE_OPTIONS(TYPE) ATTRIBUTE_UNUSED static TYPE |
419 | # define EXTERN_OPTIONS(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
420 | #endif |
421 | #else | |
422 | # define INLINE_OPTIONS(TYPE) TYPE | |
423 | # define EXTERN_OPTIONS(TYPE) TYPE | |
424 | #endif | |
425 | ||
54c47dfb | 426 | #if (OPTIONS_INLINE & INLINE_LOCALS) |
c906108c SS |
427 | # define STATIC_INLINE_OPTIONS(TYPE) static INLINE TYPE |
428 | #else | |
429 | # define STATIC_INLINE_OPTIONS(TYPE) static TYPE | |
430 | #endif | |
431 | ||
432 | ||
433 | /* os_emul is inlined with inline.c */ | |
434 | ||
435 | #if defined(_INLINE_C_) && !defined(_OS_EMUL_C_) && (OS_EMUL_INLINE & INCLUDE_MODULE) | |
436 | # if (OS_EMUL_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
437 | # define INLINE_OS_EMUL(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
438 | # define EXTERN_OS_EMUL(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 439 | #else |
f6428ce4 MF |
440 | # define INLINE_OS_EMUL(TYPE) ATTRIBUTE_UNUSED static TYPE |
441 | # define EXTERN_OS_EMUL(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
442 | #endif |
443 | #else | |
444 | # define INLINE_OS_EMUL(TYPE) TYPE | |
445 | # define EXTERN_OS_EMUL(TYPE) TYPE | |
446 | #endif | |
447 | ||
54c47dfb | 448 | #if (OS_EMUL_INLINE & INLINE_LOCALS) |
c906108c SS |
449 | # define STATIC_INLINE_OS_EMUL(TYPE) static INLINE TYPE |
450 | #else | |
451 | # define STATIC_INLINE_OS_EMUL(TYPE) static TYPE | |
452 | #endif | |
453 | ||
454 | ||
455 | /* psim is actually not inlined */ | |
456 | ||
457 | #if defined(_INLINE_C_) && !defined(_PSIM_C_) && (PSIM_INLINE & INCLUDE_MODULE) | |
458 | # if (PSIM_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
459 | # define INLINE_PSIM(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
460 | # define EXTERN_PSIM(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 461 | #else |
f6428ce4 MF |
462 | # define INLINE_PSIM(TYPE) ATTRIBUTE_UNUSED static TYPE |
463 | # define EXTERN_PSIM(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
464 | #endif |
465 | #else | |
466 | # define INLINE_PSIM(TYPE) TYPE | |
467 | # define EXTERN_PSIM(TYPE) TYPE | |
468 | #endif | |
469 | ||
54c47dfb | 470 | #if (PSIM_INLINE & INLINE_LOCALS) |
c906108c SS |
471 | # define STATIC_INLINE_PSIM(TYPE) static INLINE TYPE |
472 | #else | |
473 | # define STATIC_INLINE_PSIM(TYPE) static TYPE | |
474 | #endif | |
475 | ||
476 | ||
477 | /* cap is inlined with inline.c */ | |
478 | ||
479 | #if defined(_INLINE_C_) && !defined(_CAP_C_) && (CAP_INLINE & INCLUDE_MODULE) | |
480 | # if (CAP_INLINE & INLINE_MODULE) | |
f6428ce4 MF |
481 | # define INLINE_CAP(TYPE) ATTRIBUTE_UNUSED static INLINE TYPE |
482 | # define EXTERN_CAP(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c | 483 | #else |
f6428ce4 MF |
484 | # define INLINE_CAP(TYPE) ATTRIBUTE_UNUSED static TYPE |
485 | # define EXTERN_CAP(TYPE) ATTRIBUTE_UNUSED static TYPE | |
c906108c SS |
486 | #endif |
487 | #else | |
488 | # define INLINE_CAP(TYPE) TYPE | |
489 | # define EXTERN_CAP(TYPE) TYPE | |
490 | #endif | |
491 | ||
54c47dfb | 492 | #if (CAP_INLINE & INLINE_LOCALS) |
c906108c SS |
493 | # define STATIC_INLINE_CAP(TYPE) static INLINE TYPE |
494 | #else | |
495 | # define STATIC_INLINE_CAP(TYPE) static TYPE | |
496 | #endif | |
497 | ||
498 | #endif |