1995-08-09 08:06:35 -07:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
2011-07-27 07:17:02 -07:00
|
|
|
/* OCaml */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Copyright 1996 Institut National de Recherche en Informatique et */
|
1999-11-17 10:59:06 -08:00
|
|
|
/* en Automatique. All rights reserved. This file is distributed */
|
2001-12-07 05:41:02 -08:00
|
|
|
/* under the terms of the GNU Library General Public License, with */
|
|
|
|
/* the special exception on linking described in file ../LICENSE. */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
/* The instruction set. */
|
|
|
|
|
2003-12-15 10:10:51 -08:00
|
|
|
#ifndef CAML_INSTRUCT_H
|
|
|
|
#define CAML_INSTRUCT_H
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
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,
|
2010-01-22 04:48:24 -08:00
|
|
|
APPTERM, APPTERM1, APPTERM2, APPTERM3,
|
1995-05-04 03:15:53 -07:00
|
|
|
RETURN, RESTART, GRAB,
|
|
|
|
CLOSURE, CLOSUREREC,
|
1998-04-06 02:15:55 -07:00
|
|
|
OFFSETCLOSUREM2, OFFSETCLOSURE0, OFFSETCLOSURE2, OFFSETCLOSURE,
|
|
|
|
PUSHOFFSETCLOSUREM2, PUSHOFFSETCLOSURE0,
|
|
|
|
PUSHOFFSETCLOSURE2, PUSHOFFSETCLOSURE,
|
1995-05-04 03:15:53 -07:00
|
|
|
GETGLOBAL, PUSHGETGLOBAL, GETGLOBALFIELD, PUSHGETGLOBALFIELD, SETGLOBAL,
|
1995-06-18 07:44:56 -07:00
|
|
|
ATOM0, ATOM, PUSHATOM0, PUSHATOM,
|
1998-04-06 02:15:55 -07:00
|
|
|
MAKEBLOCK, MAKEBLOCK1, MAKEBLOCK2, MAKEBLOCK3, MAKEFLOATBLOCK,
|
|
|
|
GETFIELD0, GETFIELD1, GETFIELD2, GETFIELD3, GETFIELD, GETFLOATFIELD,
|
|
|
|
SETFIELD0, SETFIELD1, SETFIELD2, SETFIELD3, SETFIELD, SETFLOATFIELD,
|
1995-05-04 03:15:53 -07:00
|
|
|
VECTLENGTH, GETVECTITEM, SETVECTITEM,
|
1998-04-06 02:15:55 -07:00
|
|
|
GETSTRINGCHAR, SETSTRINGCHAR,
|
1996-04-04 07:56:26 -08:00
|
|
|
BRANCH, BRANCHIF, BRANCHIFNOT, SWITCH, BOOLNOT,
|
1995-05-04 03:15:53 -07:00
|
|
|
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,
|
2010-01-22 04:48:24 -08:00
|
|
|
OFFSETINT, OFFSETREF, ISINT,
|
1996-04-22 04:15:41 -07:00
|
|
|
GETMETHOD,
|
2000-10-02 07:18:05 -07:00
|
|
|
BEQ, BNEQ, BLTINT, BLEINT, BGTINT, BGEINT,
|
|
|
|
ULTINT, UGEINT,
|
2001-02-19 04:29:00 -08:00
|
|
|
BULTINT, BUGEINT,
|
2004-05-26 04:10:52 -07:00
|
|
|
GETPUBMET, GETDYNMET,
|
2001-02-19 04:29:00 -08:00
|
|
|
STOP,
|
2000-10-12 11:05:42 -07:00
|
|
|
EVENT, BREAK
|
1995-05-04 03:15:53 -07:00
|
|
|
};
|
2003-12-15 10:10:51 -08:00
|
|
|
|
|
|
|
#endif /* CAML_INSTRUCT_H */
|