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