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