1 |
106 |
markom |
/* This file is part of the program psim.
|
2 |
|
|
|
3 |
|
|
Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
|
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
|
7 |
|
|
the Free Software Foundation; either version 2 of the License, or
|
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
|
16 |
|
|
along with this program; if not, write to the Free Software
|
17 |
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
18 |
|
|
|
19 |
|
|
*/
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
#ifndef _INLINE_H_
|
23 |
|
|
#define _INLINE_H_
|
24 |
|
|
|
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)
|
33 |
|
|
# define INLINE_SIM_ENDIAN(TYPE) static INLINE TYPE UNUSED
|
34 |
|
|
# define EXTERN_SIM_ENDIAN(TYPE) static TYPE UNUSED
|
35 |
|
|
# else
|
36 |
|
|
# define INLINE_SIM_ENDIAN(TYPE) static TYPE UNUSED
|
37 |
|
|
# define EXTERN_SIM_ENDIAN(TYPE) static TYPE UNUSED
|
38 |
|
|
# endif
|
39 |
|
|
#else
|
40 |
|
|
# define INLINE_SIM_ENDIAN(TYPE) TYPE
|
41 |
|
|
# define EXTERN_SIM_ENDIAN(TYPE) TYPE
|
42 |
|
|
#endif
|
43 |
|
|
|
44 |
|
|
#if (SIM_ENDIAN_INLINE & INLINE_LOCALS)
|
45 |
|
|
# define STATIC_INLINE_SIM_ENDIAN(TYPE) static INLINE TYPE
|
46 |
|
|
#else
|
47 |
|
|
# define STATIC_INLINE_SIM_ENDIAN(TYPE) static TYPE
|
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)
|
55 |
|
|
# define INLINE_BITS(TYPE) static INLINE TYPE UNUSED
|
56 |
|
|
# define EXTERN_BITS(TYPE) static TYPE UNUSED
|
57 |
|
|
# else
|
58 |
|
|
# define INLINE_BITS(TYPE) static TYPE UNUSED
|
59 |
|
|
# define EXTERN_BITS(TYPE) static TYPE UNUSED
|
60 |
|
|
# endif
|
61 |
|
|
#else
|
62 |
|
|
# define INLINE_BITS(TYPE) TYPE
|
63 |
|
|
# define EXTERN_BITS(TYPE) TYPE
|
64 |
|
|
#endif
|
65 |
|
|
|
66 |
|
|
#if (BITS_INLINE & INLINE_LOCALS)
|
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)
|
77 |
|
|
# define INLINE_CORE(TYPE) static INLINE TYPE UNUSED
|
78 |
|
|
# define EXTERN_CORE(TYPE) static TYPE UNUSED
|
79 |
|
|
#else
|
80 |
|
|
# define INLINE_CORE(TYPE) static TYPE UNUSED
|
81 |
|
|
# define EXTERN_CORE(TYPE) static TYPE UNUSED
|
82 |
|
|
#endif
|
83 |
|
|
#else
|
84 |
|
|
# define INLINE_CORE(TYPE) TYPE
|
85 |
|
|
# define EXTERN_CORE(TYPE) TYPE
|
86 |
|
|
#endif
|
87 |
|
|
|
88 |
|
|
#if (CORE_INLINE & INLINE_LOCALS)
|
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)
|
99 |
|
|
# define INLINE_VM(TYPE) static INLINE TYPE UNUSED
|
100 |
|
|
# define EXTERN_VM(TYPE) static TYPE UNUSED
|
101 |
|
|
#else
|
102 |
|
|
# define INLINE_VM(TYPE) static TYPE UNUSED
|
103 |
|
|
# define EXTERN_VM(TYPE) static TYPE UNUSED
|
104 |
|
|
#endif
|
105 |
|
|
#else
|
106 |
|
|
# define INLINE_VM(TYPE) TYPE
|
107 |
|
|
# define EXTERN_VM(TYPE) TYPE
|
108 |
|
|
#endif
|
109 |
|
|
|
110 |
|
|
#if (VM_INLINE & INLINE_LOCALS)
|
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)
|
121 |
|
|
# define INLINE_CPU(TYPE) static INLINE TYPE UNUSED
|
122 |
|
|
# define EXTERN_CPU(TYPE) static TYPE UNUSED
|
123 |
|
|
#else
|
124 |
|
|
# define INLINE_CPU(TYPE) static TYPE UNUSED
|
125 |
|
|
# define EXTERN_CPU(TYPE) static TYPE UNUSED
|
126 |
|
|
#endif
|
127 |
|
|
#else
|
128 |
|
|
# define INLINE_CPU(TYPE) TYPE
|
129 |
|
|
# define EXTERN_CPU(TYPE) TYPE
|
130 |
|
|
#endif
|
131 |
|
|
|
132 |
|
|
#if (CPU_INLINE & INLINE_LOCALS)
|
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)
|
143 |
|
|
# define INLINE_MODEL(TYPE) static INLINE TYPE UNUSED
|
144 |
|
|
# define EXTERN_MODEL(TYPE) static TYPE UNUSED
|
145 |
|
|
#else
|
146 |
|
|
# define INLINE_MODEL(TYPE) static TYPE UNUSED
|
147 |
|
|
# define EXTERN_MODEL(TYPE) static TYPE UNUSED
|
148 |
|
|
#endif
|
149 |
|
|
#else
|
150 |
|
|
# define INLINE_MODEL(TYPE) TYPE
|
151 |
|
|
# define EXTERN_MODEL(TYPE) TYPE
|
152 |
|
|
#endif
|
153 |
|
|
|
154 |
|
|
#if (MODEL_INLINE & INLINE_LOCALS)
|
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)
|
165 |
|
|
# define INLINE_EVENTS(TYPE) static INLINE TYPE UNUSED
|
166 |
|
|
# define EXTERN_EVENTS(TYPE) static TYPE UNUSED
|
167 |
|
|
#else
|
168 |
|
|
# define INLINE_EVENTS(TYPE) static TYPE UNUSED
|
169 |
|
|
# define EXTERN_EVENTS(TYPE) static TYPE UNUSED
|
170 |
|
|
#endif
|
171 |
|
|
#else
|
172 |
|
|
# define INLINE_EVENTS(TYPE) TYPE
|
173 |
|
|
# define EXTERN_EVENTS(TYPE) TYPE
|
174 |
|
|
#endif
|
175 |
|
|
|
176 |
|
|
#if (EVENTS_INLINE & INLINE_LOCALS)
|
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)
|
187 |
|
|
# define INLINE_MON(TYPE) static INLINE TYPE UNUSED
|
188 |
|
|
# define EXTERN_MON(TYPE) static TYPE UNUSED
|
189 |
|
|
#else
|
190 |
|
|
# define INLINE_MON(TYPE) static TYPE UNUSED
|
191 |
|
|
# define EXTERN_MON(TYPE) static TYPE UNUSED
|
192 |
|
|
#endif
|
193 |
|
|
#else
|
194 |
|
|
# define INLINE_MON(TYPE) TYPE
|
195 |
|
|
# define EXTERN_MON(TYPE) TYPE
|
196 |
|
|
#endif
|
197 |
|
|
|
198 |
|
|
#if (MON_INLINE & INLINE_LOCALS)
|
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)
|
209 |
|
|
# define INLINE_REGISTERS(TYPE) static INLINE TYPE UNUSED
|
210 |
|
|
# define EXTERN_REGISTERS(TYPE) static TYPE UNUSED
|
211 |
|
|
#else
|
212 |
|
|
# define INLINE_REGISTERS(TYPE) static TYPE UNUSED
|
213 |
|
|
# define EXTERN_REGISTERS(TYPE) static TYPE UNUSED
|
214 |
|
|
#endif
|
215 |
|
|
#else
|
216 |
|
|
# define INLINE_REGISTERS(TYPE) TYPE
|
217 |
|
|
# define EXTERN_REGISTERS(TYPE) TYPE
|
218 |
|
|
#endif
|
219 |
|
|
|
220 |
|
|
#if (REGISTERS_INLINE & INLINE_LOCALS)
|
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)
|
231 |
|
|
# define INLINE_INTERRUPTS(TYPE) static INLINE TYPE UNUSED
|
232 |
|
|
# define EXTERN_INTERRUPTS(TYPE) static TYPE UNUSED
|
233 |
|
|
#else
|
234 |
|
|
# define INLINE_INTERRUPTS(TYPE) static TYPE UNUSED
|
235 |
|
|
# define EXTERN_INTERRUPTS(TYPE) static TYPE UNUSED
|
236 |
|
|
#endif
|
237 |
|
|
#else
|
238 |
|
|
# define INLINE_INTERRUPTS(TYPE) TYPE
|
239 |
|
|
# define EXTERN_INTERRUPTS(TYPE) TYPE
|
240 |
|
|
#endif
|
241 |
|
|
|
242 |
|
|
#if (INTERRUPTS_INLINE & INLINE_LOCALS)
|
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)
|
253 |
|
|
# define INLINE_DEVICE(TYPE) static INLINE TYPE UNUSED
|
254 |
|
|
# define EXTERN_DEVICE(TYPE) static TYPE UNUSED
|
255 |
|
|
#else
|
256 |
|
|
# define INLINE_DEVICE(TYPE) static TYPE UNUSED
|
257 |
|
|
# define EXTERN_DEVICE(TYPE) static TYPE UNUSED
|
258 |
|
|
#endif
|
259 |
|
|
#else
|
260 |
|
|
# define INLINE_DEVICE(TYPE) TYPE
|
261 |
|
|
# define EXTERN_DEVICE(TYPE) TYPE
|
262 |
|
|
#endif
|
263 |
|
|
|
264 |
|
|
#if (DEVICE_INLINE & INLINE_LOCALS)
|
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)
|
275 |
|
|
# define INLINE_TREE(TYPE) static INLINE TYPE UNUSED
|
276 |
|
|
# define EXTERN_TREE(TYPE) static TYPE UNUSED
|
277 |
|
|
#else
|
278 |
|
|
# define INLINE_TREE(TYPE) static TYPE UNUSED
|
279 |
|
|
# define EXTERN_TREE(TYPE) static TYPE UNUSED
|
280 |
|
|
#endif
|
281 |
|
|
#else
|
282 |
|
|
# define INLINE_TREE(TYPE) TYPE
|
283 |
|
|
# define EXTERN_TREE(TYPE) TYPE
|
284 |
|
|
#endif
|
285 |
|
|
|
286 |
|
|
#if (TREE_INLINE & INLINE_LOCALS)
|
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)
|
297 |
|
|
# define INLINE_SPREG(TYPE) static INLINE TYPE UNUSED
|
298 |
|
|
# define EXTERN_SPREG(TYPE) static TYPE UNUSED
|
299 |
|
|
#else
|
300 |
|
|
# define INLINE_SPREG(TYPE) static TYPE UNUSED
|
301 |
|
|
# define EXTERN_SPREG(TYPE) static TYPE UNUSED
|
302 |
|
|
#endif
|
303 |
|
|
#else
|
304 |
|
|
# define INLINE_SPREG(TYPE) TYPE
|
305 |
|
|
# define EXTERN_SPREG(TYPE) TYPE
|
306 |
|
|
#endif
|
307 |
|
|
|
308 |
|
|
#if (SPREG_INLINE & INLINE_LOCALS)
|
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)
|
319 |
|
|
# define INLINE_SEMANTICS(TYPE) static INLINE TYPE UNUSED
|
320 |
|
|
# define EXTERN_SEMANTICS(TYPE) static TYPE UNUSED REGPARM
|
321 |
|
|
#else
|
322 |
|
|
# define INLINE_SEMANTICS(TYPE) static TYPE UNUSED REGPARM
|
323 |
|
|
# define EXTERN_SEMANTICS(TYPE) static TYPE UNUSED REGPARM
|
324 |
|
|
#endif
|
325 |
|
|
#else
|
326 |
|
|
# define INLINE_SEMANTICS(TYPE) TYPE REGPARM
|
327 |
|
|
# define EXTERN_SEMANTICS(TYPE) TYPE REGPARM
|
328 |
|
|
#endif
|
329 |
|
|
|
330 |
|
|
#if (SEMANTICS_INLINE & INLINE_LOCALS)
|
331 |
|
|
# define STATIC_INLINE_SEMANTICS(TYPE) static INLINE TYPE
|
332 |
|
|
#else
|
333 |
|
|
# define STATIC_INLINE_SEMANTICS(TYPE) static TYPE REGPARM
|
334 |
|
|
#endif
|
335 |
|
|
|
336 |
|
|
|
337 |
|
|
/* idecode is actually not inlined */
|
338 |
|
|
|
339 |
|
|
#if defined(_INLINE_C_) && !defined(_IDECODE_C_) && (IDECODE_INLINE & INCLUDE_MODULE)
|
340 |
|
|
# if (IDECODE_INLINE & INLINE_MODULE)
|
341 |
|
|
# define INLINE_IDECODE(TYPE) static INLINE TYPE UNUSED
|
342 |
|
|
# define EXTERN_IDECODE(TYPE) static TYPE UNUSED REGPARM
|
343 |
|
|
#else
|
344 |
|
|
# define INLINE_IDECODE(TYPE) static TYPE UNUSED REGPARM
|
345 |
|
|
# define EXTERN_IDECODE(TYPE) static TYPE UNUSED REGPARM
|
346 |
|
|
#endif
|
347 |
|
|
#else
|
348 |
|
|
# define INLINE_IDECODE(TYPE) TYPE REGPARM
|
349 |
|
|
# define EXTERN_IDECODE(TYPE) TYPE REGPARM
|
350 |
|
|
#endif
|
351 |
|
|
|
352 |
|
|
#if (IDECODE_INLINE & INLINE_LOCALS)
|
353 |
|
|
# define STATIC_INLINE_IDECODE(TYPE) static INLINE TYPE
|
354 |
|
|
#else
|
355 |
|
|
# define STATIC_INLINE_IDECODE(TYPE) static TYPE REGPARM
|
356 |
|
|
#endif
|
357 |
|
|
|
358 |
|
|
|
359 |
|
|
/* icache is inlined with inline.c */
|
360 |
|
|
|
361 |
|
|
#if defined(_INLINE_C_) && !defined(_ICACHE_C_) && (ICACHE_INLINE & INCLUDE_MODULE)
|
362 |
|
|
# if (ICACHE_INLINE & INLINE_MODULE)
|
363 |
|
|
# define INLINE_ICACHE(TYPE) static INLINE TYPE UNUSED
|
364 |
|
|
# define EXTERN_ICACHE(TYPE) static TYPE UNUSED REGPARM
|
365 |
|
|
#else
|
366 |
|
|
# define INLINE_ICACHE(TYPE) static TYPE UNUSED REGPARM
|
367 |
|
|
# define EXTERN_ICACHE(TYPE) static TYPE UNUSED REGPARM
|
368 |
|
|
#endif
|
369 |
|
|
#else
|
370 |
|
|
# define INLINE_ICACHE(TYPE) TYPE REGPARM
|
371 |
|
|
# define EXTERN_ICACHE(TYPE) TYPE REGPARM
|
372 |
|
|
#endif
|
373 |
|
|
|
374 |
|
|
#if (ICACHE_INLINE & INLINE_LOCALS)
|
375 |
|
|
# define STATIC_INLINE_ICACHE(TYPE) static INLINE TYPE
|
376 |
|
|
#else
|
377 |
|
|
# define STATIC_INLINE_ICACHE(TYPE) static TYPE REGPARM
|
378 |
|
|
#endif
|
379 |
|
|
|
380 |
|
|
|
381 |
|
|
/* support is always inlined */
|
382 |
|
|
|
383 |
|
|
#if !defined(_SUPPORT_C_) && (SUPPORT_INLINE & INCLUDE_MODULE)
|
384 |
|
|
# if (SUPPORT_INLINE & INLINE_MODULE)
|
385 |
|
|
# define INLINE_SUPPORT(TYPE) static INLINE TYPE UNUSED
|
386 |
|
|
# define EXTERN_SUPPORT(TYPE) static TYPE UNUSED
|
387 |
|
|
#else
|
388 |
|
|
# define INLINE_SUPPORT(TYPE) static TYPE UNUSED
|
389 |
|
|
# define EXTERN_SUPPORT(TYPE) static TYPE UNUSED
|
390 |
|
|
#endif
|
391 |
|
|
#else
|
392 |
|
|
# define INLINE_SUPPORT(TYPE) TYPE
|
393 |
|
|
# define EXTERN_SUPPORT(TYPE) TYPE
|
394 |
|
|
#endif
|
395 |
|
|
|
396 |
|
|
#if (SUPPORT_INLINE & INLINE_LOCALS)
|
397 |
|
|
# define STATIC_INLINE_SUPPORT(TYPE) static INLINE TYPE
|
398 |
|
|
#else
|
399 |
|
|
# define STATIC_INLINE_SUPPORT(TYPE) static TYPE
|
400 |
|
|
#endif
|
401 |
|
|
|
402 |
|
|
|
403 |
|
|
/* options is inlined with inline.c */
|
404 |
|
|
|
405 |
|
|
#if defined(_INLINE_C_) && !defined(_OPTIONS_C_) && (OPTIONS_INLINE & INCLUDE_MODULE)
|
406 |
|
|
# if (OPTIONS_INLINE & INLINE_MODULE)
|
407 |
|
|
# define INLINE_OPTIONS(TYPE) static INLINE TYPE UNUSED
|
408 |
|
|
# define EXTERN_OPTIONS(TYPE) static TYPE UNUSED
|
409 |
|
|
#else
|
410 |
|
|
# define INLINE_OPTIONS(TYPE) static TYPE UNUSED
|
411 |
|
|
# define EXTERN_OPTIONS(TYPE) static TYPE UNUSED
|
412 |
|
|
#endif
|
413 |
|
|
#else
|
414 |
|
|
# define INLINE_OPTIONS(TYPE) TYPE
|
415 |
|
|
# define EXTERN_OPTIONS(TYPE) TYPE
|
416 |
|
|
#endif
|
417 |
|
|
|
418 |
|
|
#if (OPTIONS_INLINE & INLINE_LOCALS)
|
419 |
|
|
# define STATIC_INLINE_OPTIONS(TYPE) static INLINE TYPE
|
420 |
|
|
#else
|
421 |
|
|
# define STATIC_INLINE_OPTIONS(TYPE) static TYPE
|
422 |
|
|
#endif
|
423 |
|
|
|
424 |
|
|
|
425 |
|
|
/* os_emul is inlined with inline.c */
|
426 |
|
|
|
427 |
|
|
#if defined(_INLINE_C_) && !defined(_OS_EMUL_C_) && (OS_EMUL_INLINE & INCLUDE_MODULE)
|
428 |
|
|
# if (OS_EMUL_INLINE & INLINE_MODULE)
|
429 |
|
|
# define INLINE_OS_EMUL(TYPE) static INLINE TYPE UNUSED
|
430 |
|
|
# define EXTERN_OS_EMUL(TYPE) static TYPE UNUSED
|
431 |
|
|
#else
|
432 |
|
|
# define INLINE_OS_EMUL(TYPE) static TYPE UNUSED
|
433 |
|
|
# define EXTERN_OS_EMUL(TYPE) static TYPE UNUSED
|
434 |
|
|
#endif
|
435 |
|
|
#else
|
436 |
|
|
# define INLINE_OS_EMUL(TYPE) TYPE
|
437 |
|
|
# define EXTERN_OS_EMUL(TYPE) TYPE
|
438 |
|
|
#endif
|
439 |
|
|
|
440 |
|
|
#if (OS_EMUL_INLINE & INLINE_LOCALS)
|
441 |
|
|
# define STATIC_INLINE_OS_EMUL(TYPE) static INLINE TYPE
|
442 |
|
|
#else
|
443 |
|
|
# define STATIC_INLINE_OS_EMUL(TYPE) static TYPE
|
444 |
|
|
#endif
|
445 |
|
|
|
446 |
|
|
|
447 |
|
|
/* psim is actually not inlined */
|
448 |
|
|
|
449 |
|
|
#if defined(_INLINE_C_) && !defined(_PSIM_C_) && (PSIM_INLINE & INCLUDE_MODULE)
|
450 |
|
|
# if (PSIM_INLINE & INLINE_MODULE)
|
451 |
|
|
# define INLINE_PSIM(TYPE) static INLINE TYPE UNUSED
|
452 |
|
|
# define EXTERN_PSIM(TYPE) static TYPE UNUSED
|
453 |
|
|
#else
|
454 |
|
|
# define INLINE_PSIM(TYPE) static TYPE UNUSED
|
455 |
|
|
# define EXTERN_PSIM(TYPE) static TYPE UNUSED
|
456 |
|
|
#endif
|
457 |
|
|
#else
|
458 |
|
|
# define INLINE_PSIM(TYPE) TYPE
|
459 |
|
|
# define EXTERN_PSIM(TYPE) TYPE
|
460 |
|
|
#endif
|
461 |
|
|
|
462 |
|
|
#if (PSIM_INLINE & INLINE_LOCALS)
|
463 |
|
|
# define STATIC_INLINE_PSIM(TYPE) static INLINE TYPE
|
464 |
|
|
#else
|
465 |
|
|
# define STATIC_INLINE_PSIM(TYPE) static TYPE
|
466 |
|
|
#endif
|
467 |
|
|
|
468 |
|
|
|
469 |
|
|
/* cap is inlined with inline.c */
|
470 |
|
|
|
471 |
|
|
#if defined(_INLINE_C_) && !defined(_CAP_C_) && (CAP_INLINE & INCLUDE_MODULE)
|
472 |
|
|
# if (CAP_INLINE & INLINE_MODULE)
|
473 |
|
|
# define INLINE_CAP(TYPE) static INLINE TYPE UNUSED
|
474 |
|
|
# define EXTERN_CAP(TYPE) static TYPE UNUSED
|
475 |
|
|
#else
|
476 |
|
|
# define INLINE_CAP(TYPE) static TYPE UNUSED
|
477 |
|
|
# define EXTERN_CAP(TYPE) static TYPE UNUSED
|
478 |
|
|
#endif
|
479 |
|
|
#else
|
480 |
|
|
# define INLINE_CAP(TYPE) TYPE
|
481 |
|
|
# define EXTERN_CAP(TYPE) TYPE
|
482 |
|
|
#endif
|
483 |
|
|
|
484 |
|
|
#if (CAP_INLINE & INLINE_LOCALS)
|
485 |
|
|
# define STATIC_INLINE_CAP(TYPE) static INLINE TYPE
|
486 |
|
|
#else
|
487 |
|
|
# define STATIC_INLINE_CAP(TYPE) static TYPE
|
488 |
|
|
#endif
|
489 |
|
|
|
490 |
|
|
#endif
|