00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GAMSNLINSTR_H_
00017 #define GAMSNLINSTR_H_
00018
00019 #include "GAMSlinksConfig.h"
00020
00021 #if defined(__cplusplus)
00022 extern "C" {
00023 #endif
00024
00027 typedef enum GamsOpCode_ {
00028 nlNoOp = 0,
00029 nlPushV = 1,
00030 nlPushI = 2,
00031 nlStore = 3,
00032 nlAdd = 4,
00033 nlAddV = 5,
00034 nlAddI = 6,
00035 nlAddL = 7,
00036 nlSub = 8,
00037 nlSubV = 9,
00038 nlSubI = 10,
00039 nlSubL = 11,
00040 nlMul = 12,
00041 nlMulV = 13,
00042 nlMulI = 14,
00043 nlMulL = 15,
00044 nlDiv = 16,
00045 nlDivV = 17,
00046 nlDivI = 18,
00047 nlDivL = 19,
00048 nlUMin = 20,
00049 nlUMinV = 21,
00050 nlSwap = 22,
00051 nlPushL = 23,
00052 nlPopL = 24,
00053 nlPopDeriv = 25,
00054 nlHeader = 26,
00055 nlUMinL = 27,
00056 nlStoreS = 28,
00057 nlPopDerivS= 29,
00058 nlEquScale = 30,
00059 nlEnd = 31,
00060 nlCallArg1 = 32,
00061 nlCallArg2 = 33,
00062 nlCallArgN = 34,
00063 nlFuncArgN = 35,
00064 nlPushS = 36,
00065 nlPopup = 37,
00066 nlArg = 38,
00067 nlMulIAdd = 39,
00068 nlPushZero = 40,
00069 nlMulPop1 = 41,
00070 nlMulPop2 = 42,
00071 nlMulPop = 43,
00072 nlAddPop = 44,
00073 nlSubPop = 45,
00074 nlGetConst = 46,
00075 nlMulConst1= 47,
00076 nlMulConst2= 48,
00077 nlMulConst = 49,
00078 nlNegLocal = 50,
00079 nlGetLocal = 51,
00080 nlSetLocal1= 52,
00081 nlSetLocal2= 53,
00082 nlSetLocal = 54,
00083 nlGetGrad = 55,
00084 nlPushIGrad= 56,
00085 nlChk = 57,
00086 nlAddO = 58,
00087 nlPushO = 59,
00088 nlInvoc = 60,
00089 nlStackIn = 61,
00090 MAXINS = 62
00091 } GamsOpCode;
00092
00095 extern const char* GamsOpCodeName[MAXINS];
00096
00099 typedef enum GamsFuncCode_ {fnmapval=0,fnceil,fnfloor,fnround,
00100 fnmod,fntrunc,fnsign,fnmin,
00101 fnmax,fnsqr,fnexp,fnlog,
00102 fnlog10,fnsqrt,fnabs,fncos,
00103 fnsin,fnarctan,fnerrf,fndunfm,
00104 fndnorm,fnpower,fnjdate,fnjtime,
00105 fnjstart,fnjnow,fnerror,fngyear,
00106 fngmonth,fngday,fngdow,fngleap,
00107 fnghour,fngminute,fngsecond,
00108 fncurseed,fntimest,fntimeco,
00109 fntimeex,fntimecl,fnfrac,fnerrorl,
00110 fnheaps,fnfact,fnunfmi,fnpi,
00111 fnncpf,fnncpcm,fnentropy,fnsigmoid,
00112 fnlog2,fnboolnot,fnbooland,
00113 fnboolor,fnboolxor,fnboolimp,
00114 fnbooleqv,fnrelopeq,fnrelopgt,
00115 fnrelopge,fnreloplt,fnrelople,
00116 fnrelopne,fnifthen,fnrpower,
00117 fnedist,fndiv,fndiv0,fnsllog10,
00118 fnsqlog10,fnslexp,fnsqexp,fnslrec,
00119 fnsqrec,fncvpower,fnvcpower,
00120 fncentropy,fngmillisec,fnmaxerror,
00121 fntimeel,fngamma,fnloggamma,fnbeta,
00122 fnlogbeta,fngammareg,fnbetareg,
00123 fnsinh,fncosh,fntanh,fnmathlastrc,
00124 fnmathlastec,fnmathoval,fnsignpower,
00125 fnhandle,fnncpvusin,fnncpvupow,
00126 fnbinomial,fnrehandle,fngamsver,
00127 fndelhandle,fntan,fnarccos,
00128 fnarcsin,fnarctan2,fnsleep,fnheapf,
00129 fncohandle,fngamsrel,fnpoly,
00130 fnlicensestatus,fnlicenselevel,fnheaplimit,
00131 fndummy} GamsFuncCode;
00132
00133
00136 GamsOpCode getInstrOpCode(unsigned int instr);
00137
00141 int getInstrAddress(unsigned int instr);
00142
00145 void reorderInstr(unsigned int* instr, int num_instr);
00146
00147 #if defined(__cplusplus)
00148 }
00149 #endif
00150
00151 #endif