Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

VM::INST Namespace Reference

Instruction namespace. More...


Classes

struct  DescEntry
 Instruction description entry. More...


Enumerations

enum  ArgComb {
  AC_void = 0, AC_i, AC_S, AC_bb,
  AC_sb, AC_ib, AC_Sb, AC_lb,
  AC_fb, AC_ffb, AC_fffb, AC_ffffb,
  AC_db, AC_ddb, AC_dddb, AC_ddddb
}
 Instruction argument type ID. More...

enum  IID {
  NOP = 0, HLT, PLB, PLS,
  PLI, PLL, PLF, PLD,
  PLF2, PLD2, PLF3, PLD3,
  PLF4, PLD4, PLN, PSB,
  PSS, PSI, PSL, PSP,
  PSA, PSF, PSD, PSF2,
  PSD2, PSF3, PSD3, PSF4,
  PSD4, PGB, PGS, PGI,
  PGL, PGP, PGA, PGF,
  PGD, PGF2, PGD2, PGF3,
  PGD3, PGF4, PGD4, PFB,
  PFS, PFI, PFL, PFPR,
  PFPW, PFAR, PFAW, PFF,
  PFD, PFF2, PFD2, PFF3,
  PFD3, PFF4, PFD4, PAB,
  PAS, PAI, PAL, PAPR,
  PAPW, PAAR, PAAW, PAF,
  PAD, PI, POPV, POPP,
  SSB, SSS, SSI, SSL,
  SSP, SSA, SSF, SSD,
  SSF2, SSD2, SSF3, SSD3,
  SSF4, SSD4, SGB, SGS,
  SGI, SGL, SGP, SGA,
  SGF, SGD, SGF2, SGD2,
  SGF3, SGD3, SGF4, SGD4,
  SFB, SFS, SFI, SFL,
  SFP, SFA, SFF, SFD,
  SFF2, SFD2, SFF3, SFD3,
  SFF4, SFD4, SAB, SAS,
  SAI, SAL, SAP, SAA,
  SAF, SAD, ADDB, ADDS,
  ADDI, ADDL, ADDF, ADDD,
  ADDF2, ADDD2, ADDF3, ADDD3,
  ADDF4, ADDD4, SUBB, SUBS,
  SUBI, SUBL, SUBF, SUBD,
  SUBF2, SUBD2, SUBF3, SUBD3,
  SUBF4, SUBD4, MULB, MULS,
  MULI, MULL, MULF, MULD,
  DIVB, DIVS, DIVI, DIVL,
  DIVF, DIVD, MODB, MODS,
  MODI, MODL, MODF, MODD,
  NEGB, NEGS, NEGI, NEGL,
  NEGF, NEGD, NEGF2, NEGD2,
  NEGF3, NEGD3, NEGF4, NEGD4,
  EQB, EQS, EQI, EQL,
  EQP, EQA, EQF, EQD,
  EQF2, EQD2, EQF3, EQD3,
  EQF4, EQD4, ANDB, ANDS,
  ANDI, ANDL, ORB, ORS,
  ORI, ORL, XORB, XORS,
  XORI, XORL, SHLB, SHLS,
  SHLI, SHLL, SHRB, SHRS,
  SHRI, SHRL, INCSB, INCSS,
  INCSI, INCSL, INCSF, INCSD,
  DECSB, DECSS, DECSI, DECSL,
  DECSF, DECSD, CVBB, CVBS,
  CVBI, CVBL, CVBF, CVBD,
  CVSB, CVSS, CVSI, CVSL,
  CVSF, CVSD, CVIB, CVIS,
  CVII, CVIL, CVIF, CVID,
  CVLB, CVLS, CVLI, CVLL,
  CVLF, CVLD, CVFB, CVFS,
  CVFI, CVFL, CVFF, CVFD,
  CVDB, CVDS, CVDI, CVDL,
  CVDF, CVDD, JMP, JNB,
  JNS, JNI, JNL, JNP,
  JNA, JNF, JND, JZB,
  JZS, JZI, JZL, JZP,
  JZA, JZF, JZD, ANEW,
  ASIZE, ACPY, ADEL, ONEW,
  OCPY, ODEL, SCAST, DCAST,
  CALL, MCALL, VMCALL, RET,
  RETB, RETS, RETI, RETL,
  RETP, RETA, RETF, RETD,
  RETF2, RETD2, RETF3, RETD3,
  RETF4, RETD4, IID_LAST
}
 Big enum with all instructions. More...


Functions

const DescEntryDesc (IID i)
 Get DescEntry for passed instruction (or NULL if out of range).


Variables

const DescEntry _inst_desc [IID_LAST]
 Array with one DescEntry for each instruction; use Desc() to access.


Detailed Description

Instruction namespace.

Enumeration Type Documentation

enum VM::INST::ArgComb
 

Instruction argument type ID.

For each combination of possible instruction arguments, one entry exists.

Enumeration values:
AC_void  aruments: none
AC_i  aruments: int
AC_S  aruments: signed int32 (SymRef, TypeID)
AC_bb  aruments: byte, byte
AC_sb  aruments: short, byte
AC_ib  aruments: int, byte
AC_Sb  aruments: signed int32 (SymRef, TypeID), byte
AC_lb  aruments: long, byte
AC_fb  aruments: float, byte
AC_ffb  aruments: float, float, byte
AC_fffb  aruments: float, float, float, byte
AC_ffffb  aruments: float, float, float, float, byte
AC_db  aruments: double, byte
AC_ddb  aruments: double, double, byte
AC_dddb  aruments: double, double, double, byte
AC_ddddb  aruments: double, double, double, double, byte

Definition at line 42 of file instruction.h.

enum VM::INST::IID
 

Big enum with all instructions.

All instruction (IDs); they are numbered beginning at 0 suitable for array indexing.

When changing things here, be sure to update the definitions in instruction.cc as well and to check if changes are needed to instgen.cc!

Enumeration values:
NOP  No Operation.
HLT  HaLT execution.
PLB  Push Literal Byte.
PLS  Push Literal Short.
PLI  Push Literal Integer.
PLL  Push Literal Long.
PLF  Push Literal Float.
PLD  Push Literal Double.
PLF2  Push Literal Float vector-2.
PLD2  Push Literal Double vector-2.
PLF3  Push Literal Float vector-3.
PLD3  Push Literal Double vector-3.
PLF4  Push Literal Float vector-4.
PLD4  Push Literal Double vector-4.
PLN  Push Literal NULL pointer.
PSB  Push from stack Segment Byte.
PSS  Push from stack Segment Short.
PSI  Push from stack Segment Integer.
PSL  Push from stack Segment Long.
PSP  Push from stack Segment Pointer.
PSA  Push from stack Segment Array.
PSF  Push from stack Segment Float.
PSD  Push from stack Segment Double.
PSF2  Push from stack Segment Float vector-2.
PSD2  Push from stack Segment Double vector-2.
PSF3  Push from stack Segment Float vector-3.
PSD3  Push from stack Segment Double vector-3.
PSF4  Push from stack Segment Float vector-4.
PSD4  Push from stack Segment Double vector-4.
PGB  Push Global Byte.
PGS  Push Global Short.
PGI  Push Global Integer.
PGL  Push Global Long.
PGP  Push Global Pointer.
PGA  Push Global Array.
PGF  Push Global Float.
PGD  Push Global Double.
PGF2  Push Global Float vector-2.
PGD2  Push Global Double vector-2.
PGF3  Push Global Float vector-3.
PGD3  Push Global Double vector-3.
PGF4  Push Global Float vector-4.
PGD4  Push Global Double vector-4.
PFB  Push Field Byte.
PFS  Push Field Short.
PFI  Push Field Integer.
PFL  Push Field Long.
PFPR  Push Field Pointer Read-only.
PFPW  Push Field Pointer Read-write.
PFAR  Push Field Array Read-only.
PFAW  Push Field Array Read-write.
PFF  Push Field Float.
PFD  Push Field Double.
PFF2  Push Field Float vector-2.
PFD2  Push Field Double vector-2.
PFF3  Push Field Float vector-3.
PFD3  Push Field Double vector-3.
PFF4  Push Field Float vector-4.
PFD4  Push Field Double vector-4.
PAB  Push from Array Byte.
PAS  Push from Array Short.
PAI  Push from Array Integer.
PAL  Push from Array Long.
PAPR  Push from Array Pointer Read-only.
PAPW  Push from Array Pointer Read-write.
PAAR  Push from Array Array Read-only.
PAAW  Push from Array Array Read-write.
PAF  Push from Array Float.
PAD  Push from Array Double.
PI  Increment stack pointer.
POPV  POP from V-stack.
POPP  POP from P-stack.
SSB  Store into stack Segment Byte.
SSS  Store into stack Segment Short.
SSI  Store into stack Segment Integer.
SSL  Store into stack Segment Long.
SSP  Store into stack Segment Pointer.
SSA  Store into stack Segment Array.
SSF  Store into stack Segment Float.
SSD  Store into stack Segment Double.
SSF2  Store into stack Segment Float vector-2.
SSD2  Store into stack Segment Double vector-2.
SSF3  Store into stack Segment Float vector-3.
SSD3  Store into stack Segment Double vector-3.
SSF4  Store into stack Segment Float vector-4.
SSD4  Store into stack Segment Double vector-4.
SGB  Store Global Byte.
SGS  Store Global Short.
SGI  Store Global Integer.
SGL  Store Global Long.
SGP  Store Global Pointer.
SGA  Store Global Array.
SGF  Store Global Float.
SGD  Store Global Double.
SGF2  Store Global Float vector-2.
SGD2  Store Global Double vector-2.
SGF3  Store Global Float vector-3.
SGD3  Store Global Double vector-3.
SGF4  Store Global Float vector-4.
SGD4  Store Global Double vector-4.
SFB  Store Field Byte.
SFS  Store Field Short.
SFI  Store Field Integer.
SFL  Store Field Long.
SFP  Store Field Pointer.
SFA  Store Field Array.
SFF  Store Field Float.
SFD  Store Field Double.
SFF2  Store Field Float vector-2.
SFD2  Store Field Double vector-2.
SFF3  Store Field Float vector-3.
SFD3  Store Field Double vector-3.
SFF4  Store Field Float vector-4.
SFD4  Store Field Double vector-4.
SAB  Store into Array Byte.
SAS  Store into Array Short.
SAI  Store into Array Integer.
SAL  Store into Array Long.
SAP  Store into Array Pointer.
SAA  Store into Array Array.
SAF  Store into Array Float.
SAD  Store into Array Double.
ADDB  Add Byte.
ADDS  Add Short.
ADDI  Add Integer.
ADDL  Add Long.
ADDF  Add Float.
ADDD  Add Double.
ADDF2  Add Float vector-2.
ADDD2  Add Double vector-2.
ADDF3  Add Float vector-3.
ADDD3  Add Double vector-3.
ADDF4  Add Float vector-4.
ADDD4  Add Double vector-4.
SUBB  Subtract Byte.
SUBS  Subtract Short.
SUBI  Subtract Integer.
SUBL  Subtract Long.
SUBF  Subtract Float.
SUBD  Subtract Double.
SUBF2  Subtract Float vector-2.
SUBD2  Subtract Double vector-2.
SUBF3  Subtract Float vector-3.
SUBD3  Subtract Double vector-3.
SUBF4  Subtract Float vector-4.
SUBD4  Subtract Double vector-4.
MULB  Multiply Byte.
MULS  Multiply Short.
MULI  Multiply Integer.
MULL  Multiply Long.
MULF  Multiply Float.
MULD  Multiply Double.
DIVB  Divide Byte.
DIVS  Divide Short.
DIVI  Divide Integer.
DIVL  Divide Long.
DIVF  Divide Float.
DIVD  Divide Double.
MODB  Modulo Byte.
MODS  Modulo Short.
MODI  Modulo Integer.
MODL  Modulo Long.
MODF  Modulo Float.
MODD  Modulo Double.
NEGB  Negate Byte.
NEGS  Negate Short.
NEGI  Negate Integer.
NEGL  Negate Long.
NEGF  Negate Float.
NEGD  Negate Double.
NEGF2  Negate Float vector-2.
NEGD2  Negate Double vector-2.
NEGF3  Negate Float vector-3.
NEGD3  Negate Double vector-3.
NEGF4  Negate Float vector-4.
NEGD4  Negate Double vector-4.
EQB  Compare (EQual) Byte.
EQS  Compare (EQual) Short.
EQI  Compare (EQual) Integer.
EQL  Compare (EQual) Long.
EQP  Compare (EQual) Pointer.
EQA  Compare (EQual) Array.
EQF  Compare (EQual) Float.
EQD  Compare (EQual) Double.
EQF2  Compare (EQual) Float vector-2.
EQD2  Compare (EQual) Double vector-2.
EQF3  Compare (EQual) Float vector-3.
EQD3  Compare (EQual) Double vector-3.
EQF4  Compare (EQual) Float vector-4.
EQD4  Compare (EQual) Double vector-4.
ANDB  Bitwise AND Byte.
ANDS  Bitwise AND Short.
ANDI  Bitwise AND Integer.
ANDL  Bitwise AND Long.
ORB  Bitwise OR Byte.
ORS  Bitwise OR Short.
ORI  Bitwise OR Integer.
ORL  Bitwise OR Long.
XORB  Bitwise XOR Byte.
XORS  Bitwise XOR Short.
XORI  Bitwise XOR Integer.
XORL  Bitwise XOR Long.
SHLB  Bitwise SHift Left Byte.
SHLS  Bitwise SHift Left Short.
SHLI  Bitwise SHift Left Integer.
SHLL  Bitwise SHift Left Long.
SHRB  Bitwise SHift Right Byte.
SHRS  Bitwise SHift Right Short.
SHRI  Bitwise SHift Right Integer.
SHRL  Bitwise SHift Right Long.
INCSB  INCrement on on stack Segment Byte.
INCSS  INCrement on on stack Segment Short.
INCSI  INCrement on on stack Segment Integer.
INCSL  INCrement on on stack Segment Long.
INCSF  INCrement on on stack Segment Float.
INCSD  INCrement on on stack Segment Double.
DECSB  DECrement on on stack Segment Byte.
DECSS  DECrement on on stack Segment Short.
DECSI  DECrement on on stack Segment Integer.
DECSL  DECrement on on stack Segment Long.
DECSF  DECrement on on stack Segment Float.
DECSD  DECrement on on stack Segment Double.
CVBB  Convert Byte into Byte.
CVBS  Convert Byte into Short.
CVBI  Convert Byte into Integer.
CVBL  Convert Byte into Long.
CVBF  Convert Byte into Float.
CVBD  Convert Byte into Double.
CVSB  Convert Short into Byte.
CVSS  Convert Short into Short.
CVSI  Convert Short into Integer.
CVSL  Convert Short into Long.
CVSF  Convert Short into Float.
CVSD  Convert Short into Double.
CVIB  Convert Integer into Byte.
CVIS  Convert Integer into Short.
CVII  Convert Integer into Integer.
CVIL  Convert Integer into Long.
CVIF  Convert Integer into Float.
CVID  Convert Integer into Double.
CVLB  Convert Long into Byte.
CVLS  Convert Long into Short.
CVLI  Convert Long into Integer.
CVLL  Convert Long into Long.
CVLF  Convert Long into Float.
CVLD  Convert Long into Double.
CVFB  Convert Float into Byte.
CVFS  Convert Float into Short.
CVFI  Convert Float into Integer.
CVFL  Convert Float into Long.
CVFF  Convert Float into Float.
CVFD  Convert Float into Double.
CVDB  Convert Double into Byte.
CVDS  Convert Double into Short.
CVDI  Convert Double into Integer.
CVDL  Convert Double into Long.
CVDF  Convert Double into Float.
CVDD  Convert Double into Double.
JMP  Unconditional JuMP.
JNB  Jump if Non-zero Byte.
JNS  Jump if Non-zero Short.
JNI  Jump if Non-zero Integer.
JNL  Jump if Non-zero Long.
JNP  Jump if Non-zero Pointer.
JNA  Jump if Non-zero Array.
JNF  Jump if Non-zero Float.
JND  Jump if Non-zero Double.
JZB  Jump if Zero Byte.
JZS  Jump if Zero Short.
JZI  Jump if Zero Integer.
JZL  Jump if Zero Long.
JZP  Jump if Zero Pointer.
JZA  Jump if Zero Array.
JZF  Jump if Zero Float.
JZD  Jump if Zero Double.
ANEW  NEW Array.
ASIZE  Get Array SIZE.
ACPY  CoPY (on write) Array.
ADEL  Explicitly DELete Array.
ONEW  Allocate NEW Object.
OCPY  CoPY (on write) Object.
ODEL  Explicitly DELete Object.
SCAST  Static CAST.
DCAST  Dynamic CAST.
CALL  CALL a non-method function or static method.
MCALL  CALL a non-virtual Method.
VMCALL  CALL a Virtual Method.
RET  RETurn (void).
RETB  RETurn Byte.
RETS  RETurn Short.
RETI  RETurn Integer.
RETL  RETurn Long.
RETP  RETurn Pointer.
RETA  RETurn Array.
RETF  RETurn Float.
RETD  RETurn Double.
RETF2  RETurn Float vector-2.
RETD2  RETurn Double vector-2.
RETF3  RETurn Float vector-3.
RETD3  RETurn Double vector-3.
RETF4  RETurn Float vector-4.
RETD4  RETurn Double vector-4.
IID_LAST  Must be the LAST "instruction"; for counting.

Definition at line 72 of file instruction.h.


Function Documentation

const DescEntry* Desc IID  i  )  [inline]
 

Get DescEntry for passed instruction (or NULL if out of range).

Definition at line 433 of file instruction.h.

References _inst_desc, and IID_LAST.


Variable Documentation

const DescEntry VM::INST::_inst_desc
 

Array with one DescEntry for each instruction; use Desc() to access.

Definition at line 24 of file instruction.cc.

Referenced by Desc().


Generated on Sat Feb 19 22:36:26 2005 for Ray by doxygen 1.3.5