CACAO
Data Structures | Macros | Typedefs | Enumerations | Variables
icmd.hpp File Reference

Go to the source code of this file.

Data Structures

struct  icmdtable_entry_t
 

Macros

#define DF_0_TO_0   0
 
#define DF_1_TO_0   1
 
#define DF_2_TO_0   2
 
#define DF_3_TO_0   3
 
#define DF_DST_BASE   4 /* from this value on, iptr->dst is a variable */
 
#define DF_0_TO_1   (DF_DST_BASE + 0)
 
#define DF_1_TO_1   (DF_DST_BASE + 1)
 
#define DF_2_TO_1   (DF_DST_BASE + 2)
 
#define DF_3_TO_1   (DF_DST_BASE + 3)
 
#define DF_N_TO_1   (DF_DST_BASE + 4)
 
#define DF_INVOKE   (DF_DST_BASE + 5)
 
#define DF_BUILTIN   (DF_DST_BASE + 6)
 
#define DF_COPY   (DF_DST_BASE + 7)
 
#define DF_MOVE   (DF_DST_BASE + 8)
 
#define DF_DUP   -1
 
#define DF_DUP_X1   -1
 
#define DF_DUP_X2   -1
 
#define DF_DUP2   -1
 
#define DF_DUP2_X1   -1
 
#define DF_DUP2_X2   -1
 
#define DF_SWAP   -1
 
#define DF_LOAD   DF_COPY
 
#define DF_STORE   DF_MOVE
 
#define DF_IINC   DF_1_TO_1
 
#define DF_POP   DF_1_TO_0
 
#define DF_POP2   DF_2_TO_0
 
#define CF_NORMAL   0
 
#define CF_IF   1
 
#define CF_END_BASE   2 /* from here on, they mark the end of a superblock */
 
#define CF_END   (CF_END_BASE + 0)
 
#define CF_GOTO   (CF_END_BASE + 1)
 
#define CF_TABLE   (CF_END_BASE + 2)
 
#define CF_LOOKUP   (CF_END_BASE + 3)
 
#define CF_JSR   (CF_END_BASE + 4)
 
#define CF_RET   (CF_END_BASE + 5)
 
#define ICMDTABLE_PEI   0x0001 /* ICMD may throw an exception */
 
#define ICMDTABLE_CALLS   0x0002 /* needs registers to be saved, may call */
 

Typedefs

typedef struct icmdtable_entry_t icmdtable_entry_t
 

Enumerations

enum  ICMD {
  ICMD_NOP = BC_nop, ICMD_ACONST = BC_aconst_null, ICMD_CHECKNULL = 2, ICMD_ICONST = BC_iconst_0,
  ICMD_IDIVPOW2 = 5, ICMD_LDIVPOW2 = 6, ICMD_LCONST = BC_lconst_0, ICMD_LCMPCONST = 10,
  ICMD_FCONST = BC_fconst_0, ICMD_DCONST = BC_dconst_0, ICMD_COPY = 15, ICMD_MOVE = 16,
  ICMD_ILOAD = BC_iload, ICMD_LLOAD = BC_lload, ICMD_FLOAD = BC_fload, ICMD_DLOAD = BC_dload,
  ICMD_ALOAD = BC_aload, ICMD_IADDCONST = 26, ICMD_ISUBCONST = 27, ICMD_IMULCONST = 28,
  ICMD_IANDCONST = 29, ICMD_IORCONST = 30, ICMD_IXORCONST = 31, ICMD_ISHLCONST = 32,
  ICMD_ISHRCONST = 33, ICMD_IUSHRCONST = 34, ICMD_IREMPOW2 = 35, ICMD_LADDCONST = 36,
  ICMD_LSUBCONST = 37, ICMD_LMULCONST = 38, ICMD_LANDCONST = 39, ICMD_LORCONST = 40,
  ICMD_LXORCONST = 41, ICMD_LSHLCONST = 42, ICMD_LSHRCONST = 43, ICMD_LUSHRCONST = 44,
  ICMD_LREMPOW2 = 45, ICMD_IALOAD = BC_iaload, ICMD_LALOAD = BC_laload, ICMD_FALOAD = BC_faload,
  ICMD_DALOAD = BC_daload, ICMD_AALOAD = BC_aaload, ICMD_BALOAD = BC_baload, ICMD_CALOAD = BC_caload,
  ICMD_SALOAD = BC_saload, ICMD_ISTORE = BC_istore, ICMD_LSTORE = BC_lstore, ICMD_FSTORE = BC_fstore,
  ICMD_DSTORE = BC_dstore, ICMD_ASTORE = BC_astore, ICMD_IF_LEQ = 59, ICMD_IF_LNE = 60,
  ICMD_IF_LLT = 61, ICMD_IF_LGE = 62, ICMD_IF_LGT = 63, ICMD_IF_LLE = 64,
  ICMD_IF_LCMPEQ = 65, ICMD_IF_LCMPNE = 66, ICMD_IF_LCMPLT = 67, ICMD_IF_LCMPGE = 68,
  ICMD_IF_LCMPGT = 69, ICMD_IF_LCMPLE = 70, ICMD_IASTORE = BC_iastore, ICMD_LASTORE = BC_lastore,
  ICMD_FASTORE = BC_fastore, ICMD_DASTORE = BC_dastore, ICMD_AASTORE = BC_aastore, ICMD_BASTORE = BC_bastore,
  ICMD_CASTORE = BC_castore, ICMD_SASTORE = BC_sastore, ICMD_POP = BC_pop, ICMD_POP2 = BC_pop2,
  ICMD_DUP = BC_dup, ICMD_DUP_X1 = BC_dup_x1, ICMD_DUP_X2 = BC_dup_x2, ICMD_DUP2 = BC_dup2,
  ICMD_DUP2_X1 = BC_dup2_x1, ICMD_DUP2_X2 = BC_dup2_x2, ICMD_SWAP = BC_swap, ICMD_IADD = BC_iadd,
  ICMD_LADD = BC_ladd, ICMD_FADD = BC_fadd, ICMD_DADD = BC_dadd, ICMD_ISUB = BC_isub,
  ICMD_LSUB = BC_lsub, ICMD_FSUB = BC_fsub, ICMD_DSUB = BC_dsub, ICMD_IMUL = BC_imul,
  ICMD_LMUL = BC_lmul, ICMD_FMUL = BC_fmul, ICMD_DMUL = BC_dmul, ICMD_IDIV = BC_idiv,
  ICMD_LDIV = BC_ldiv, ICMD_FDIV = BC_fdiv, ICMD_DDIV = BC_ddiv, ICMD_IREM = BC_irem,
  ICMD_LREM = BC_lrem, ICMD_FREM = BC_frem, ICMD_DREM = BC_drem, ICMD_INEG = BC_ineg,
  ICMD_LNEG = BC_lneg, ICMD_FNEG = BC_fneg, ICMD_DNEG = BC_dneg, ICMD_ISHL = BC_ishl,
  ICMD_LSHL = BC_lshl, ICMD_ISHR = BC_ishr, ICMD_LSHR = BC_lshr, ICMD_IUSHR = BC_iushr,
  ICMD_LUSHR = BC_lushr, ICMD_IAND = BC_iand, ICMD_LAND = BC_land, ICMD_IOR = BC_ior,
  ICMD_LOR = BC_lor, ICMD_IXOR = BC_ixor, ICMD_LXOR = BC_lxor, ICMD_IINC = BC_iinc,
  ICMD_I2L = BC_i2l, ICMD_I2F = BC_i2f, ICMD_I2D = BC_i2d, ICMD_L2I = BC_l2i,
  ICMD_L2F = BC_l2f, ICMD_L2D = BC_l2d, ICMD_F2I = BC_f2i, ICMD_F2L = BC_f2l,
  ICMD_F2D = BC_f2d, ICMD_D2I = BC_d2i, ICMD_D2L = BC_d2l, ICMD_D2F = BC_d2f,
  ICMD_INT2BYTE = BC_int2byte, ICMD_INT2CHAR = BC_int2char, ICMD_INT2SHORT = BC_int2short, ICMD_LCMP = BC_lcmp,
  ICMD_FCMPL = BC_fcmpl, ICMD_FCMPG = BC_fcmpg, ICMD_DCMPL = BC_dcmpl, ICMD_DCMPG = BC_dcmpg,
  ICMD_IFEQ = BC_ifeq, ICMD_IFNE = BC_ifne, ICMD_IFLT = BC_iflt, ICMD_IFGE = BC_ifge,
  ICMD_IFGT = BC_ifgt, ICMD_IFLE = BC_ifle, ICMD_IF_ICMPEQ = BC_if_icmpeq, ICMD_IF_ICMPNE = BC_if_icmpne,
  ICMD_IF_ICMPLT = BC_if_icmplt, ICMD_IF_ICMPGE = BC_if_icmpge, ICMD_IF_ICMPGT = BC_if_icmpgt, ICMD_IF_ICMPLE = BC_if_icmple,
  ICMD_IF_ACMPEQ = BC_if_acmpeq, ICMD_IF_ACMPNE = BC_if_acmpne, ICMD_GOTO = BC_goto, ICMD_JSR = BC_jsr,
  ICMD_RET = BC_ret, ICMD_TABLESWITCH = BC_tableswitch, ICMD_LOOKUPSWITCH = BC_lookupswitch, ICMD_IRETURN = BC_ireturn,
  ICMD_LRETURN = BC_lreturn, ICMD_FRETURN = BC_freturn, ICMD_DRETURN = BC_dreturn, ICMD_ARETURN = BC_areturn,
  ICMD_RETURN = BC_return, ICMD_GETSTATIC = BC_getstatic, ICMD_PUTSTATIC = BC_putstatic, ICMD_GETFIELD = BC_getfield,
  ICMD_PUTFIELD = BC_putfield, ICMD_INVOKEVIRTUAL = BC_invokevirtual, ICMD_INVOKESPECIAL = BC_invokespecial, ICMD_INVOKESTATIC = BC_invokestatic,
  ICMD_INVOKEINTERFACE = BC_invokeinterface, ICMD_NEW = BC_new, ICMD_NEWARRAY = BC_newarray, ICMD_ANEWARRAY = BC_anewarray,
  ICMD_ARRAYLENGTH = BC_arraylength, ICMD_ATHROW = BC_athrow, ICMD_CHECKCAST = BC_checkcast, ICMD_INSTANCEOF = BC_instanceof,
  ICMD_MONITORENTER = BC_monitorenter, ICMD_MONITOREXIT = BC_monitorexit, ICMD_MULTIANEWARRAY = BC_multianewarray, ICMD_IFNULL = BC_ifnull,
  ICMD_IFNONNULL = BC_ifnonnull, ICMD_BREAKPOINT = BC_breakpoint, ICMD_IASTORECONST = 204, ICMD_LASTORECONST = 205,
  ICMD_FASTORECONST = 206, ICMD_DASTORECONST = 207, ICMD_AASTORECONST = 208, ICMD_BASTORECONST = 209,
  ICMD_CASTORECONST = 210, ICMD_SASTORECONST = 211, ICMD_PUTSTATICCONST = 212, ICMD_PUTFIELDCONST = 213,
  ICMD_IMULPOW2 = 214, ICMD_LMULPOW2 = 215, ICMD_GETEXCEPTION = 249, ICMD_PHI = 250,
  ICMD_INLINE_START = 251, ICMD_INLINE_END = 252, ICMD_INLINE_BODY = 253, ICMD_BUILTIN = 255
}
 

Variables

icmdtable_entry_t icmd_table [256]
 

Macro Definition Documentation

#define CF_END   (CF_END_BASE + 0)

Definition at line 375 of file icmd.hpp.

#define CF_END_BASE   2 /* from here on, they mark the end of a superblock */

Definition at line 373 of file icmd.hpp.

#define CF_GOTO   (CF_END_BASE + 1)

Definition at line 376 of file icmd.hpp.

#define CF_IF   1

Definition at line 371 of file icmd.hpp.

#define CF_JSR   (CF_END_BASE + 4)

Definition at line 379 of file icmd.hpp.

#define CF_LOOKUP   (CF_END_BASE + 3)

Definition at line 378 of file icmd.hpp.

#define CF_NORMAL   0

Definition at line 370 of file icmd.hpp.

#define CF_RET   (CF_END_BASE + 5)

Definition at line 380 of file icmd.hpp.

#define CF_TABLE   (CF_END_BASE + 2)

Definition at line 377 of file icmd.hpp.

#define DF_0_TO_0   0

Definition at line 334 of file icmd.hpp.

#define DF_0_TO_1   (DF_DST_BASE + 0)

Definition at line 341 of file icmd.hpp.

#define DF_1_TO_0   1

Definition at line 335 of file icmd.hpp.

#define DF_1_TO_1   (DF_DST_BASE + 1)

Definition at line 342 of file icmd.hpp.

#define DF_2_TO_0   2

Definition at line 336 of file icmd.hpp.

#define DF_2_TO_1   (DF_DST_BASE + 2)

Definition at line 343 of file icmd.hpp.

#define DF_3_TO_0   3

Definition at line 337 of file icmd.hpp.

#define DF_3_TO_1   (DF_DST_BASE + 3)

Definition at line 344 of file icmd.hpp.

#define DF_BUILTIN   (DF_DST_BASE + 6)

Definition at line 348 of file icmd.hpp.

#define DF_COPY   (DF_DST_BASE + 7)

Definition at line 350 of file icmd.hpp.

#define DF_DST_BASE   4 /* from this value on, iptr->dst is a variable */

Definition at line 339 of file icmd.hpp.

#define DF_DUP   -1

Definition at line 353 of file icmd.hpp.

#define DF_DUP2   -1

Definition at line 356 of file icmd.hpp.

#define DF_DUP2_X1   -1

Definition at line 357 of file icmd.hpp.

#define DF_DUP2_X2   -1

Definition at line 358 of file icmd.hpp.

#define DF_DUP_X1   -1

Definition at line 354 of file icmd.hpp.

#define DF_DUP_X2   -1

Definition at line 355 of file icmd.hpp.

#define DF_IINC   DF_1_TO_1

Definition at line 364 of file icmd.hpp.

#define DF_INVOKE   (DF_DST_BASE + 5)

Definition at line 347 of file icmd.hpp.

#define DF_LOAD   DF_COPY

Definition at line 362 of file icmd.hpp.

#define DF_MOVE   (DF_DST_BASE + 8)

Definition at line 351 of file icmd.hpp.

#define DF_N_TO_1   (DF_DST_BASE + 4)

Definition at line 345 of file icmd.hpp.

#define DF_POP   DF_1_TO_0

Definition at line 365 of file icmd.hpp.

#define DF_POP2   DF_2_TO_0

Definition at line 366 of file icmd.hpp.

#define DF_STORE   DF_MOVE

Definition at line 363 of file icmd.hpp.

#define DF_SWAP   -1

Definition at line 359 of file icmd.hpp.

#define ICMDTABLE_CALLS   0x0002 /* needs registers to be saved, may call */

Definition at line 385 of file icmd.hpp.

#define ICMDTABLE_PEI   0x0001 /* ICMD may throw an exception */

Definition at line 384 of file icmd.hpp.

Typedef Documentation

Definition at line 389 of file icmd.hpp.

Enumeration Type Documentation

enum ICMD
Enumerator
ICMD_NOP 
ICMD_ACONST 
ICMD_CHECKNULL 
ICMD_ICONST 
ICMD_IDIVPOW2 
ICMD_LDIVPOW2 
ICMD_LCONST 
ICMD_LCMPCONST 
ICMD_FCONST 
ICMD_DCONST 
ICMD_COPY 
ICMD_MOVE 
ICMD_ILOAD 
ICMD_LLOAD 
ICMD_FLOAD 
ICMD_DLOAD 
ICMD_ALOAD 
ICMD_IADDCONST 
ICMD_ISUBCONST 
ICMD_IMULCONST 
ICMD_IANDCONST 
ICMD_IORCONST 
ICMD_IXORCONST 
ICMD_ISHLCONST 
ICMD_ISHRCONST 
ICMD_IUSHRCONST 
ICMD_IREMPOW2 
ICMD_LADDCONST 
ICMD_LSUBCONST 
ICMD_LMULCONST 
ICMD_LANDCONST 
ICMD_LORCONST 
ICMD_LXORCONST 
ICMD_LSHLCONST 
ICMD_LSHRCONST 
ICMD_LUSHRCONST 
ICMD_LREMPOW2 
ICMD_IALOAD 
ICMD_LALOAD 
ICMD_FALOAD 
ICMD_DALOAD 
ICMD_AALOAD 
ICMD_BALOAD 
ICMD_CALOAD 
ICMD_SALOAD 
ICMD_ISTORE 
ICMD_LSTORE 
ICMD_FSTORE 
ICMD_DSTORE 
ICMD_ASTORE 
ICMD_IF_LEQ 
ICMD_IF_LNE 
ICMD_IF_LLT 
ICMD_IF_LGE 
ICMD_IF_LGT 
ICMD_IF_LLE 
ICMD_IF_LCMPEQ 
ICMD_IF_LCMPNE 
ICMD_IF_LCMPLT 
ICMD_IF_LCMPGE 
ICMD_IF_LCMPGT 
ICMD_IF_LCMPLE 
ICMD_IASTORE 
ICMD_LASTORE 
ICMD_FASTORE 
ICMD_DASTORE 
ICMD_AASTORE 
ICMD_BASTORE 
ICMD_CASTORE 
ICMD_SASTORE 
ICMD_POP 
ICMD_POP2 
ICMD_DUP 
ICMD_DUP_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IC 
ICMD_PUTSTATIC 
ICMD_GETFIELD 
ICMD_PUTFIELD 
ICMD_INVOKEVIRTUAL 
ICMD_INVOKESPECIAL 
ICMD_INVOKESTATIC 
ICMD_INVOKEINTERFACE 
ICMD_NEW 
ICMD_NEWARRAY 
ICMD_ANEWARRAY 
ICMD_ARRAYLENGTH 
ICMD_ATHROW 
ICMD_CHECKCAST 
ICMD_INSTANCEOF 
ICMD_MONITORENTER 
ICMD_MONITOREXIT 
ICMD_MULTIANEWARRAY 
ICMD_IFNULL 
ICMD_IFNONNULL 
ICMD_BREAKPOINT 
ICMD_IASTORECONST 
ICMD_LASTORECONST 
ICMD_FASTORECONST 
ICMD_DASTORECONST 
ICMD_AASTORECONST 
ICMD_BASTORECONST 
ICMD_CASTORECONST 
ICMD_SASTORECONST 
ICMD_PUTSTATICCONST 
ICMD_PUTFIELDCONST 
ICMD_IMULPOW2 
ICMD_LMULPOW2 
ICMD_GETEXCEPTION 
ICMD_PHI 
ICMD_INLINE_START 
ICMD_INLINE_END 
ICMD_INLINE_BODY 
ICMD_BUILTIN 

Definition at line 37 of file icmd.hpp.

Variable Documentation

icmdtable_entry_t icmd_table[256]

Definition at line 60 of file icmd.cpp.