1995-05-04 03:15:53 -07:00
|
|
|
/* The instruction set. */
|
|
|
|
|
|
|
|
enum instructions {
|
|
|
|
ACC0, ACC1, ACC2, ACC3, ACC4, ACC5, ACC6, ACC7,
|
|
|
|
ACC, PUSH,
|
|
|
|
PUSHACC0, PUSHACC1, PUSHACC2, PUSHACC3,
|
|
|
|
PUSHACC4, PUSHACC5, PUSHACC6, PUSHACC7,
|
|
|
|
PUSHACC, POP, ASSIGN,
|
1995-06-22 03:11:18 -07:00
|
|
|
ENVACC1, ENVACC2, ENVACC3, ENVACC4, ENVACC,
|
|
|
|
PUSHENVACC1, PUSHENVACC2, PUSHENVACC3, PUSHENVACC4, PUSHENVACC,
|
1995-05-04 03:15:53 -07:00
|
|
|
PUSH_RETADDR, APPLY, APPLY1, APPLY2, APPLY3,
|
|
|
|
APPTERM, APPTERM1, APPTERM2, APPTERM3,
|
|
|
|
RETURN, RESTART, GRAB,
|
|
|
|
CLOSURE, CLOSUREREC,
|
|
|
|
GETGLOBAL, PUSHGETGLOBAL, GETGLOBALFIELD, PUSHGETGLOBALFIELD, SETGLOBAL,
|
1995-06-18 07:44:56 -07:00
|
|
|
ATOM0, ATOM, PUSHATOM0, PUSHATOM,
|
1995-05-04 03:15:53 -07:00
|
|
|
MAKEBLOCK, MAKEBLOCK1, MAKEBLOCK2, MAKEBLOCK3,
|
|
|
|
GETFIELD0, GETFIELD1, GETFIELD2, GETFIELD3, GETFIELD,
|
|
|
|
SETFIELD0, SETFIELD1, SETFIELD2, SETFIELD3, SETFIELD,
|
1995-06-18 07:44:56 -07:00
|
|
|
DUMMY, UPDATE,
|
1995-05-04 03:15:53 -07:00
|
|
|
VECTLENGTH, GETVECTITEM, SETVECTITEM,
|
|
|
|
GETSTRINGCHAR, SETSTRINGCHAR,
|
|
|
|
BRANCH, BRANCHIF, BRANCHIFNOT, SWITCH, TRANSLATE, BOOLNOT,
|
|
|
|
PUSHTRAP, POPTRAP, RAISE, CHECK_SIGNALS,
|
1995-07-11 11:07:22 -07:00
|
|
|
C_CALL1, C_CALL2, C_CALL3, C_CALL4, C_CALL5, C_CALLN,
|
1995-06-18 07:44:56 -07:00
|
|
|
CONST0, CONST1, CONST2, CONST3, CONSTINT,
|
|
|
|
PUSHCONST0, PUSHCONST1, PUSHCONST2, PUSHCONST3, PUSHCONSTINT,
|
1995-05-04 03:15:53 -07:00
|
|
|
NEGINT, ADDINT, SUBINT, MULINT, DIVINT, MODINT,
|
|
|
|
ANDINT, ORINT, XORINT, LSLINT, LSRINT, ASRINT,
|
|
|
|
EQ, NEQ, LTINT, LEINT, GTINT, GEINT,
|
|
|
|
OFFSETINT, OFFSETREF,
|
|
|
|
STOP
|
|
|
|
};
|