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 #if 0 // SC
00192 #include "defs.h"
00193 #else
00194 #include "workaround.h"
00195 #endif
00196 #include "opcode_core.h"
00197 #if 0 // SC
00198 #include "errors.h"
00199 #else
00200 #include "messg.h"
00201 #endif
00202 #include "opcode_gen.h"
00203
00204 #ifdef __cplusplus
00205 extern "C" {
00206 #endif
00207
00208 extern const char *OPERATOR_name(OPERATOR);
00209 extern OPCODE OPCODE_commutative_op(OPCODE op);
00210
00211
00212
00213
00214
00215
00216
00217
00218 extern BOOL Operator_To_Opcode_Table_Inited;
00219 void Init_Operator_To_Opcode_Table(void);
00220
00221 #define OPCODE_make_op_MACRO(opr,rtype,desc) ((OPCODE) ((opr) | ((rtype) << 8) | ((desc) << 14)))
00222
00223
00224
00225 #if 1
00226 #if 0
00227 inline OPCODE OPCODE_make_op_no_assert(OPERATOR opr, TYPE_ID rtype,
00228 TYPE_ID desc)
00229 {
00230 OPCODE ret;
00231
00232 ret = OPCODE_make_op_MACRO(opr,rtype,desc);
00233 ret = Is_Valid_Opcode (ret) ? ret : OPCODE_UNKNOWN;
00234
00235 return ret;
00236 }
00237 #endif
00238
00239 inline OPCODE OPCODE_make_op(OPERATOR opr, TYPE_ID rtype, TYPE_ID desc)
00240 {
00241 OPCODE ret;
00242
00243 ret = OPCODE_make_op_MACRO(opr,rtype,desc);
00244 Is_True(Is_Valid_Opcode(ret),
00245 ("OPCODE_make_op: no opcode available: %d %d %d", opr, rtype, desc));
00246
00247 return ret;
00248 }
00249 #else
00250 #define OPCODE_make_op(opr,rtype,desc) OPCODE_MAKE_VALID( OPCODE_make_op_MACRO(opr,rtype,desc))
00251 #endif
00252
00253 #ifdef __cplusplus
00254 }
00255 #endif
00256
00257 #endif