Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef intrn_info_INCLUDED
00036 #define intrn_info_INCLUDED "intrn_info.h"
00037
00038 #include "defs.h"
00039 #include "wintrinsic.h"
00040
00041
00042
00043
00044 typedef enum INTRN_RETKIND {
00045 IRETURN_UNKNOWN,
00046 IRETURN_V,
00047 IRETURN_I1,
00048 IRETURN_I2,
00049 IRETURN_I4,
00050 IRETURN_I8,
00051 IRETURN_U1,
00052 IRETURN_U2,
00053 IRETURN_U4,
00054 IRETURN_U8,
00055 IRETURN_F4,
00056 IRETURN_F8,
00057 IRETURN_FQ,
00058 IRETURN_C4,
00059 IRETURN_C8,
00060 IRETURN_CQ,
00061 IRETURN_PV,
00062 IRETURN_PU1,
00063 IRETURN_DA1,
00064 IRETURN_SZT,
00065 IRETURN_PC,
00066 IRETURN_F10,
00067 IRETURN_A4,
00068 IRETURN_A8,
00069 IRETURN_M
00070 } INTRN_RETKIND;
00071 #define INTRN_RETKIND_LAST IRETURN_A8
00072
00073
00074 #define BYVAL TRUE
00075 #define NOT_BYVAL FALSE
00076 #define PURE TRUE
00077 #define NOT_PURE FALSE
00078 #define NO_SIDEEFFECTS TRUE
00079 #define SIDEEFFECTS FALSE
00080 #define NEVER_RETURN TRUE
00081 #define DOES_RETURN FALSE
00082 #define ACTUAL TRUE
00083 #define NOT_ACTUAL FALSE
00084 #define CGINTRINSIC TRUE
00085 #define NOT_CGINTRINSIC FALSE
00086
00087
00088 typedef struct intrn_info_t {
00089 mBOOL is_by_val;
00090 mBOOL is_pure;
00091 mBOOL has_no_side_effects;
00092 mBOOL never_returns;
00093 mBOOL is_actual;
00094 mBOOL is_cg_intrinsic;
00095 INTRN_RETKIND return_kind;
00096 char *c_name;
00097 char *specific_name;
00098 char *runtime_name;
00099 } intrn_info_t;
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 extern intrn_info_t intrn_info[INTRINSIC_LAST+1];
00113
00114 inline BOOL INTRN_by_value (const INTRINSIC i)
00115 {
00116 return intrn_info[i].is_by_val;
00117 }
00118
00119 inline BOOL INTRN_is_pure (const INTRINSIC i)
00120 {
00121 return intrn_info[i].is_pure;
00122 }
00123
00124 inline BOOL INTRN_has_no_side_effects (const INTRINSIC i)
00125 {
00126 return intrn_info[i].has_no_side_effects;
00127 }
00128
00129 inline BOOL INTRN_never_returns (const INTRINSIC i)
00130 {
00131 return intrn_info[i].never_returns;
00132 }
00133
00134 inline BOOL INTRN_is_actual (const INTRINSIC i)
00135 {
00136 return intrn_info[i].is_actual;
00137 }
00138
00139 inline BOOL INTRN_cg_intrinsic (const INTRINSIC i)
00140 {
00141 return intrn_info[i].is_cg_intrinsic;
00142 }
00143
00144 inline INTRN_RETKIND INTRN_return_kind (const INTRINSIC i)
00145 {
00146 return intrn_info[i].return_kind;
00147 }
00148
00149 inline char * INTRN_c_name (const INTRINSIC i)
00150 {
00151 return intrn_info[i].c_name;
00152 }
00153
00154 inline char * INTRN_specific_name (const INTRINSIC i)
00155 {
00156 return intrn_info[i].specific_name;
00157 }
00158
00159 inline char * INTRN_rt_name (const INTRINSIC i)
00160 {
00161 return intrn_info[i].runtime_name;
00162 }
00163
00164 #endif