inline.h 14 KB

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