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