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
00174 #ifndef opcode_INCLUDED
00175 #define opcode_INCLUDED "opcode.h"
00176
00177 #ifdef _KEEP_RCS_ID
00178 #endif
00179
00180 #include "defs.h"
00181 #include "opcode_core.h"
00182 #include "errors.h"
00183 #include "opcode_gen.h"
00184
00185 #ifdef __cplusplus
00186 extern "C" {
00187 #endif
00188
00189 extern const char *OPERATOR_name(OPERATOR);
00190 extern OPERATOR Name_To_OPERATOR(const char* nm);
00191
00192 extern OPCODE OPCODE_commutative_op(OPCODE op);
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202 extern BOOL Operator_To_Opcode_Table_Inited;
00203 void Init_Operator_To_Opcode_Table(void);
00204
00205 #define OPCODE_make_op_MACRO(opr,rtype,desc) ((OPCODE) ((opr) | ((rtype) << 8) | ((desc) << 13)))
00206
00207
00208
00209 #if 1
00210 #if 0
00211 inline OPCODE OPCODE_make_op_no_assert(OPERATOR opr, TYPE_ID rtype,
00212 TYPE_ID desc)
00213 {
00214 OPCODE ret;
00215
00216 ret = OPCODE_make_op_MACRO(opr,rtype,desc);
00217 ret = Is_Valid_Opcode (ret) ? ret : OPCODE_UNKNOWN;
00218
00219 return ret;
00220 }
00221 #endif
00222
00223 inline OPCODE OPCODE_make_op(OPERATOR opr, TYPE_ID rtype, TYPE_ID desc)
00224 {
00225 OPCODE ret;
00226
00227 ret = OPCODE_make_op_MACRO(opr,rtype,desc);
00228 Is_True(Is_Valid_Opcode(ret),
00229 ("OPCODE_make_op: no opcode available: %d %d %d", opr, rtype, desc));
00230
00231 return ret;
00232 }
00233 #else
00234 #define OPCODE_make_op(opr,rtype,desc) OPCODE_MAKE_VALID( OPCODE_make_op_MACRO(opr,rtype,desc))
00235 #endif
00236
00237 #ifdef __cplusplus
00238 }
00239 #endif
00240
00241 #endif