org.jikesrvm.compilers.baseline.ia32
Class BaselineCompilerImpl

java.lang.Object
  extended by org.jikesrvm.compilers.baseline.TemplateCompilerFramework
      extended by org.jikesrvm.compilers.baseline.BaselineCompiler
          extended by org.jikesrvm.compilers.baseline.ia32.BaselineCompilerImpl
All Implemented Interfaces:
ArchitectureSpecific.StackframeLayoutConstants, BytecodeConstants, ClassLoaderConstants, Constants, HeapLayoutConstants, ArchConstants, BaselineConstants, RegisterConstants, StackframeLayoutConstants, TrapConstants, ThinLockConstants, TIBLayoutConstants, SizeConstants
Direct Known Subclasses:
ArchitectureSpecific.BaselineCompilerImpl

public abstract class BaselineCompilerImpl
extends BaselineCompiler
implements BaselineConstants, SizeConstants

BaselineCompilerImpl is the baseline compiler implementation for the IA32 architecture.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jikesrvm.ia32.RegisterConstants
RegisterConstants.FloatingPointMachineRegister, RegisterConstants.FPR, RegisterConstants.GPR, RegisterConstants.MachineRegister, RegisterConstants.MM, RegisterConstants.XMM
 
Field Summary
private  int firstLocalOffset
           
(package private) static Offset FIVE_SLOTS
           
(package private) static Offset FOUR_SLOTS
           
private static Offset MINUS_ONE_SLOT
           
(package private) static Offset NO_SLOT
           
(package private) static Offset ONE_SLOT
           
private  int parameterWords
           
(package private) static Offset THREE_SLOTS
           
(package private) static Offset TWO_SLOTS
           
 
Fields inherited from class org.jikesrvm.compilers.baseline.BaselineCompiler
edgeCounterIdx, localTypes, options
 
Fields inherited from class org.jikesrvm.compilers.baseline.TemplateCompilerFramework
asm, bcodes, biStart, bytecodeMap, compiledMethod, doesCheckStore, fullyBootedVM, isInterruptible, isUninterruptible, isUnpreemptible, klass, lockOffset, method, shouldPrint, stackHeights
 
Fields inherited from interface org.jikesrvm.ia32.BaselineConstants
BRIDGE_FRAME_EXTRA_SIZE, EBP_SAVE_OFFSET, EBX_SAVE_OFFSET, EDI_SAVE_OFFSET, FPU_SAVE_OFFSET, LG_WORDSIZE, S0, S1, SAVED_GPRS, SAVED_GPRS_FOR_SAVE_LS_REGISTERS, SP, STACKFRAME_FIRST_PARAMETER_OFFSET, STACKFRAME_REG_SAVE_OFFSET, T0, T0_int, T0_SAVE_OFFSET, T1, T1_int, T1_SAVE_OFFSET, TR, WORDSIZE, XMM_SAVE_OFFSET
 
Fields inherited from interface org.jikesrvm.Constants
NOT_REACHED, REFLECTION_FPRS_BITS, REFLECTION_FPRS_MASK, REFLECTION_GPRS_BITS, REFLECTION_GPRS_MASK
 
Fields inherited from interface org.jikesrvm.objectmodel.ThinLockConstants
TL_DEDICATED_U16_OFFSET, TL_DEDICATED_U16_SHIFT, TL_LOCK_COUNT_MASK, TL_LOCK_COUNT_SHIFT, TL_LOCK_COUNT_UNIT, TL_LOCK_ID_MASK, TL_LOCK_ID_SHIFT, TL_NUM_BITS_RC, TL_NUM_BITS_STAT, TL_NUM_BITS_TID, TL_STAT_BIASABLE, TL_STAT_FAT, TL_STAT_MASK, TL_STAT_SHIFT, TL_STAT_THIN, TL_THREAD_ID_MASK, TL_THREAD_ID_SHIFT, TL_UNLOCK_MASK
 
Fields inherited from interface org.jikesrvm.SizeConstants
BITS_IN_ADDRESS, BITS_IN_BOOLEAN, BITS_IN_BYTE, BITS_IN_CHAR, BITS_IN_DOUBLE, BITS_IN_EXTENT, BITS_IN_FLOAT, BITS_IN_INT, BITS_IN_LONG, BITS_IN_OFFSET, BITS_IN_PAGE, BITS_IN_SHORT, BITS_IN_WORD, BYTES_IN_ADDRESS, BYTES_IN_BOOLEAN, BYTES_IN_BYTE, BYTES_IN_CHAR, BYTES_IN_DOUBLE, BYTES_IN_EXTENT, BYTES_IN_FLOAT, BYTES_IN_INT, BYTES_IN_LONG, BYTES_IN_OFFSET, BYTES_IN_PAGE, BYTES_IN_SHORT, BYTES_IN_WORD, LOG_BITS_IN_ADDRESS, LOG_BITS_IN_BOOLEAN, LOG_BITS_IN_BYTE, LOG_BITS_IN_CHAR, LOG_BITS_IN_DOUBLE, LOG_BITS_IN_EXTENT, LOG_BITS_IN_FLOAT, LOG_BITS_IN_INT, LOG_BITS_IN_LONG, LOG_BITS_IN_OFFSET, LOG_BITS_IN_PAGE, LOG_BITS_IN_SHORT, LOG_BITS_IN_WORD, LOG_BYTES_IN_ADDRESS, LOG_BYTES_IN_BOOLEAN, LOG_BYTES_IN_BYTE, LOG_BYTES_IN_CHAR, LOG_BYTES_IN_DOUBLE, LOG_BYTES_IN_EXTENT, LOG_BYTES_IN_FLOAT, LOG_BYTES_IN_INT, LOG_BYTES_IN_LONG, LOG_BYTES_IN_OFFSET, LOG_BYTES_IN_PAGE, LOG_BYTES_IN_SHORT, LOG_BYTES_IN_WORD
 
Fields inherited from interface org.jikesrvm.objectmodel.TIBLayoutConstants
IMT_METHOD_SLOTS, NEEDS_DYNAMIC_LINK, TIB_ARRAY_ELEMENT_TIB_INDEX, TIB_DOES_IMPLEMENT_INDEX, TIB_FIRST_SPECIALIZED_METHOD_INDEX, TIB_FIRST_VIRTUAL_METHOD_INDEX, TIB_INTERFACE_DISPATCH_TABLE_INDEX, TIB_SUPERCLASS_IDS_INDEX, TIB_TYPE_INDEX
 
Fields inherited from interface org.jikesrvm.HeapLayoutConstants
BAD_MAP_COMPRESSION, BOOT_IMAGE_CODE_END, BOOT_IMAGE_CODE_SIZE, BOOT_IMAGE_CODE_START, BOOT_IMAGE_DATA_END, BOOT_IMAGE_DATA_SIZE, BOOT_IMAGE_DATA_START, BOOT_IMAGE_END, BOOT_IMAGE_RMAP_END, BOOT_IMAGE_RMAP_START, MAX_BOOT_IMAGE_RMAP_SIZE, MAXIMUM_MAPPABLE
 
Fields inherited from interface org.jikesrvm.ia32.ArchConstants
SSE2_BASE, SSE2_FULL
 
Fields inherited from interface org.jikesrvm.ia32.StackframeLayoutConstants
BYTES_IN_STACKSLOT, FPU_STATE_SIZE, INVISIBLE_METHOD_ID, LOG_BYTES_IN_STACKSLOT, STACK_SIZE_BOOT, STACK_SIZE_COLLECTOR, STACK_SIZE_DLOPEN, STACK_SIZE_GCDISABLED, STACK_SIZE_GROW, STACK_SIZE_GUARD, STACK_SIZE_JNINATIVE_GROW, STACK_SIZE_MAX, STACK_SIZE_NORMAL, STACK_SIZE_SYSCALL, STACKFRAME_ALIGNMENT, STACKFRAME_BODY_OFFSET, STACKFRAME_FRAME_POINTER_OFFSET, STACKFRAME_HEADER_SIZE, STACKFRAME_METHOD_ID_OFFSET, STACKFRAME_RETURN_ADDRESS_OFFSET, STACKFRAME_SENTINEL_FP, XMM_STATE_SIZE
 
Fields inherited from interface org.jikesrvm.ia32.RegisterConstants
ALL_FPRS, ALL_GPRS, EAX, EBP, EBX, ECX, EDI, EDX, ESI, ESP, FP0, FP1, FP2, FP3, FP4, FP5, FP6, FP7, INSTRUCTION_WIDTH, LG_INSTRUCTION_WIDTH, MM0, MM1, MM10, MM11, MM12, MM13, MM14, MM15, MM2, MM3, MM4, MM5, MM6, MM7, MM8, MM9, NATIVE_NONVOLATILE_FPRS, NATIVE_NONVOLATILE_GPRS, NATIVE_PARAMETER_FPRS, NATIVE_PARAMETER_GPRS, NATIVE_VOLATILE_FPRS, NATIVE_VOLATILE_GPRS, NONVOLATILE_FPRS, NONVOLATILE_GPRS, NUM_FPRS, NUM_GPRS, NUM_NONVOLATILE_FPRS, NUM_NONVOLATILE_GPRS, NUM_PARAMETER_FPRS, NUM_PARAMETER_GPRS, NUM_RETURN_FPRS, NUM_RETURN_GPRS, NUM_VOLATILE_FPRS, NUM_VOLATILE_GPRS, PARAMETER_FPRS, PARAMETER_GPRS, R0, R1, R10, R11, R12, R13, R14, R15, R2, R3, R4, R5, R6, R7, R8, R9, RETURN_FPRS, RETURN_GPRS, STACK_POINTER, THREAD_REGISTER, VOLATILE_FPRS, VOLATILE_GPRS, XMM0, XMM1, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, XMM8, XMM9
 
Fields inherited from interface org.jikesrvm.ia32.TrapConstants
RVM_TRAP_BASE
 
Fields inherited from interface org.jikesrvm.classloader.BytecodeConstants
JBC_aaload, JBC_aastore, JBC_aconst_null, JBC_aload, JBC_aload_0, JBC_aload_1, JBC_aload_2, JBC_aload_3, JBC_anewarray, JBC_areturn, JBC_arraylength, JBC_astore, JBC_astore_0, JBC_astore_1, JBC_astore_2, JBC_astore_3, JBC_athrow, JBC_baload, JBC_bastore, JBC_bipush, JBC_caload, JBC_castore, JBC_checkcast, JBC_d2f, JBC_d2i, JBC_d2l, JBC_dadd, JBC_daload, JBC_dastore, JBC_dcmpg, JBC_dcmpl, JBC_dconst_0, JBC_dconst_1, JBC_ddiv, JBC_dload, JBC_dload_0, JBC_dload_1, JBC_dload_2, JBC_dload_3, JBC_dmul, JBC_dneg, JBC_drem, JBC_dreturn, JBC_dstore, JBC_dstore_0, JBC_dstore_1, JBC_dstore_2, JBC_dstore_3, JBC_dsub, JBC_dup, JBC_dup_x1, JBC_dup_x2, JBC_dup2, JBC_dup2_x1, JBC_dup2_x2, JBC_f2d, JBC_f2i, JBC_f2l, JBC_fadd, JBC_faload, JBC_fastore, JBC_fcmpg, JBC_fcmpl, JBC_fconst_0, JBC_fconst_1, JBC_fconst_2, JBC_fdiv, JBC_fload, JBC_fload_0, JBC_fload_1, JBC_fload_2, JBC_fload_3, JBC_fmul, JBC_fneg, JBC_frem, JBC_freturn, JBC_fstore, JBC_fstore_0, JBC_fstore_1, JBC_fstore_2, JBC_fstore_3, JBC_fsub, JBC_getfield, JBC_getstatic, JBC_goto, JBC_goto_w, JBC_i2d, JBC_i2f, JBC_i2l, JBC_iadd, JBC_iaload, JBC_iand, JBC_iastore, JBC_iconst_0, JBC_iconst_1, JBC_iconst_2, JBC_iconst_3, JBC_iconst_4, JBC_iconst_5, JBC_iconst_m1, JBC_idiv, JBC_if_acmpeq, JBC_if_acmpne, JBC_if_icmpeq, JBC_if_icmpge, JBC_if_icmpgt, JBC_if_icmple, JBC_if_icmplt, JBC_if_icmpne, JBC_ifeq, JBC_ifge, JBC_ifgt, JBC_ifle, JBC_iflt, JBC_ifne, JBC_ifnonnull, JBC_ifnull, JBC_iinc, JBC_iload, JBC_iload_0, JBC_iload_1, JBC_iload_2, JBC_iload_3, JBC_impdep1, JBC_impdep2, JBC_imul, JBC_ineg, JBC_instanceof, JBC_int2byte, JBC_int2char, JBC_int2short, JBC_invokeinterface, JBC_invokespecial, JBC_invokestatic, JBC_invokevirtual, JBC_ior, JBC_irem, JBC_ireturn, JBC_ishl, JBC_ishr, JBC_istore, JBC_istore_0, JBC_istore_1, JBC_istore_2, JBC_istore_3, JBC_isub, JBC_iushr, JBC_ixor, JBC_jsr, JBC_jsr_w, JBC_l2d, JBC_l2f, JBC_l2i, JBC_ladd, JBC_laload, JBC_land, JBC_lastore, JBC_lcmp, JBC_lconst_0, JBC_lconst_1, JBC_ldc, JBC_ldc_w, JBC_ldc2_w, JBC_ldiv, JBC_length, JBC_lload, JBC_lload_0, JBC_lload_1, JBC_lload_2, JBC_lload_3, JBC_lmul, JBC_lneg, JBC_lookupswitch, JBC_lor, JBC_lrem, JBC_lreturn, JBC_lshl, JBC_lshr, JBC_lstore, JBC_lstore_0, JBC_lstore_1, JBC_lstore_2, JBC_lstore_3, JBC_lsub, JBC_lushr, JBC_lxor, JBC_monitorenter, JBC_monitorexit, JBC_multianewarray, JBC_name, JBC_new, JBC_newarray, JBC_nop, JBC_pop, JBC_pop2, JBC_putfield, JBC_putstatic, JBC_ret, JBC_return, JBC_saload, JBC_sastore, JBC_sipush, JBC_swap, JBC_tableswitch, JBC_wide, JBC_xxxunusedxxx
 
Fields inherited from interface org.jikesrvm.classloader.ClassLoaderConstants
ACC_ABSTRACT, ACC_ANNOTATION, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_VOLATILE, APPLICABLE_TO_CLASSES, APPLICABLE_TO_FIELDS, APPLICABLE_TO_METHODS, ArrayTypeCode, BooleanTypeCode, BRIDGE, ByteTypeCode, CharTypeCode, CLASS_INITIALIZED, CLASS_INITIALIZER_FAILED, CLASS_INITIALIZING, CLASS_INSTANTIATED, CLASS_LOADED, CLASS_RESOLVED, CLASS_VACANT, ClassTypeCode, CP_CLASS, CP_DOUBLE, CP_FLOAT, CP_INT, CP_LONG, CP_MEMBER, CP_STRING, CP_UTF, DoubleTypeCode, FloatTypeCode, IntTypeCode, LongTypeCode, ShortTypeCode, TAG_DOUBLE, TAG_FIELDREF, TAG_FLOAT, TAG_INT, TAG_INTERFACE_METHODREF, TAG_LONG, TAG_MEMBERNAME_AND_DESCRIPTOR, TAG_METHODREF, TAG_STRING, TAG_TYPEREF, TAG_UNUSED, TAG_UTF, VARARGS, VoidTypeCode
 
Constructor Summary
protected BaselineCompilerImpl(BaselineCompiledMethod cm)
          Create a BaselineCompilerImpl object for the compilation of method.
 
Method Summary
private  void adjustStack(int size, boolean mayClobber)
          Adjust the value of ESP/RSP
private  void arrayStore16bitHelper()
          Private helper to perform a char or short array store
private  void arrayStore32bitHelper()
          Private helper to perform a float or int array store
private  void arrayStore64bitHelper()
          Private helper to perform a long or double array store
(package private) static void baselineEmitLoadTIB(ArchitectureSpecific.Assembler asm, RegisterConstants.GPR dest, RegisterConstants.GPR object)
          Utility to call baselineEmitLoadTIB with int arguments not GPR
private  void boundsCheckHelper(Offset index, Offset arrayRef)
          Private helper to perform an array bounds check
static boolean checkForActualCall(MethodReference methodToBeCalled)
          Indicate if specified Magic method causes a frame to be created on the runtime stack.
protected  void emit_aaload()
          Emit code to load from a reference array
protected  void emit_aastore()
          Emit code to store to a reference array
protected  void emit_aconst_null()
          Emit code to load the null constant.
protected  void emit_aload(int index)
          Emit code to load a reference local variable
protected  void emit_areturn()
          Emit code to implement the areturn bytecode
protected  void emit_arraylength()
          Emit code to implement the arraylength bytecode
protected  void emit_astore(int index)
          Emit code to store a reference to a local variable
protected  void emit_athrow()
          Emit code to implement the athrow bytecode
protected  void emit_baload()
          Emit code to load from a byte/boolean array
protected  void emit_bastore()
          Emit code to store to a byte/boolean array
protected  void emit_caload()
          Emit code to load from a char array
protected  void emit_castore()
          Emit code to store to a char array
protected  void emit_checkcast_final(RVMType type)
          Emit code to implement the checkcast bytecode
protected  void emit_checkcast_resolvedClass(RVMClass type)
          Emit code to implement the checkcast bytecode
protected  void emit_checkcast_resolvedInterface(RVMClass type)
          Emit code to implement the checkcast bytecode
protected  void emit_checkcast(TypeReference typeRef)
          Emit code to implement the checkcast bytecode
protected  void emit_d2f()
          Emit code to implement the d2f bytecode
protected  void emit_d2i()
          Emit code to implement the d2i bytecode
protected  void emit_d2l()
          Emit code to implement the d2l bytecode
protected  void emit_dadd()
          Emit code to implement the dadd bytecode
protected  void emit_daload()
          Emit code to load from a double array
protected  void emit_dastore()
          Emit code to store to a double array
protected  void emit_dcmpg()
          Emit code to implement the dcmpg bytecode
protected  void emit_dcmpl()
          Emit code to implement the dcmpl bytecode
protected  void emit_dconst_0()
          Emit code to load 0.0d
protected  void emit_dconst_1()
          Emit code to load 1.0d
protected  void emit_ddiv()
          Emit code to implement the ddiv bytecode
protected  void emit_deferred_prologue()
          Emit deferred prologue
protected  void emit_dload(int index)
          Emit code to load a double local variable
protected  void emit_dmul()
          Emit code to implement the dmul bytecode
protected  void emit_dneg()
          Emit code to implement the dneg bytecode
protected  void emit_drem()
          Emit code to implement the drem bytecode
protected  void emit_dreturn()
          Emit code to implement the dreturn bytecode
protected  void emit_dstore(int index)
          Emit code to store an double to a local variable
protected  void emit_dsub()
          Emit code to implement the dsub bytecode
protected  void emit_dup_x1()
          Emit code to implement the dup_x1 bytecode
protected  void emit_dup_x2()
          Emit code to implement the dup_x2 bytecode
protected  void emit_dup()
          Emit code to implement the dup bytecode
protected  void emit_dup2_x1()
          Emit code to implement the dup2_x1 bytecode
protected  void emit_dup2_x2()
          Emit code to implement the dup2_x2 bytecode
protected  void emit_dup2()
          Emit code to implement the dup2 bytecode
protected  void emit_f2d()
          Emit code to implement the f2d bytecode
protected  void emit_f2i()
          Emit code to implement the f2i bytecode
protected  void emit_f2l()
          Emit code to implement the f2l bytecode
protected  void emit_fadd()
          Emit code to implement the fadd bytecode
protected  void emit_faload()
          Emit code to load from a float array
protected  void emit_fastore()
          Emit code to store to a float array
protected  void emit_fcmpg()
          Emit code to implement the fcmpg bytecode
protected  void emit_fcmpl()
          Emit code to implement the fcmpl bytecode
protected  void emit_fconst_0()
          Emit code to load 0.0f
protected  void emit_fconst_1()
          Emit code to load 1.0f
protected  void emit_fconst_2()
          Emit code to load 2.0f
protected  void emit_fdiv()
          Emit code to implement the fdiv bytecode
protected  void emit_fload(int index)
          Emit code to local a float local variable
protected  void emit_fmul()
          Emit code to implement the fmul bytecode
protected  void emit_fneg()
          Emit code to implement the fneg bytecode
protected  void emit_frem()
          Emit code to implement the frem bytecode
protected  void emit_freturn()
          Emit code to implement the freturn bytecode
protected  void emit_fstore(int index)
          Emit code to store a float to a local variable
protected  void emit_fsub()
          Emit code to implement the fsub bytecode
protected  void emit_goto(int bTarget)
          Emit code to implement the goto and gotow bytecodes
protected  void emit_i2b()
          Emit code to implement the i2b bytecode
protected  void emit_i2c()
          Emit code to implement the i2c bytecode
protected  void emit_i2d()
          Emit code to implement the i2d bytecode
protected  void emit_i2f()
          Emit code to implement the i2f bytecode
protected  void emit_i2l()
          Emit code to implement the i2l bytecode
protected  void emit_i2s()
          Emit code to implement the i2s bytecode
protected  void emit_iadd()
          Emit code to implement the iadd bytecode
protected  void emit_iaload()
          Emit code to load from an int array
protected  void emit_iand()
          Emit code to implement the iand bytecode
protected  void emit_iastore()
          Emit code to store to an int array
protected  void emit_iconst(int val)
          Emit code to load an int constant.
protected  void emit_idiv()
          Emit code to implement the idiv bytecode
protected  void emit_if_acmpeq(int bTarget)
          Emit code to implement the if_acmpeq bytecode
protected  void emit_if_acmpne(int bTarget)
          Emit code to implement the if_acmpne bytecode
protected  void emit_if_icmpeq(int bTarget)
          Emit code to implement the if_icmpeq bytecode
protected  void emit_if_icmpge(int bTarget)
          Emit code to implement the if_icmpge bytecode
protected  void emit_if_icmpgt(int bTarget)
          Emit code to implement the if_icmpgt bytecode
protected  void emit_if_icmple(int bTarget)
          Emit code to implement the if_icmple bytecode
protected  void emit_if_icmplt(int bTarget)
          Emit code to implement the if_icmplt bytecode
protected  void emit_if_icmpne(int bTarget)
          Emit code to implement the if_icmpne bytecode
protected  void emit_ifeq(int bTarget)
          Emit code to implement the ifeg bytecode
protected  void emit_ifge(int bTarget)
          Emit code to implement the ifge bytecode
protected  void emit_ifgt(int bTarget)
          Emit code to implement the ifgt bytecode
protected  void emit_ifle(int bTarget)
          Emit code to implement the ifle bytecode
protected  void emit_iflt(int bTarget)
          Emit code to implement the iflt bytecode
protected  void emit_ifne(int bTarget)
          Emit code to implement the ifne bytecode
protected  void emit_ifnonnull(int bTarget)
          Emit code to implement the ifnonnull bytecode
protected  void emit_ifnull(int bTarget)
          Emit code to implement the ifnull bytecode
protected  void emit_iinc(int index, int val)
          Emit code to implement the iinc bytecode
protected  void emit_iload(int index)
          Emit code to load an int local variable
protected  void emit_imul()
          Emit code to implement the imul bytecode
protected  void emit_ineg()
          Emit code to implement the ineg bytecode
protected  void emit_instanceof_final(RVMType type)
          Emit code to implement the instanceof bytecode
protected  void emit_instanceof_resolvedClass(RVMClass type)
          Emit code to implement the instanceof bytecode
protected  void emit_instanceof_resolvedInterface(RVMClass type)
          Emit code to implement the instanceof bytecode
protected  void emit_instanceof(TypeReference typeRef)
          Emit code to implement the instanceof bytecode
protected  void emit_invoke_compiledmethod(CompiledMethod cm)
          OSR routine to emit code to invoke a compiled method (with known jtoc offset).
protected  void emit_invokeinterface(MethodReference methodRef)
          Emit code to implement the invokeinterface bytecode
protected  void emit_ior()
          Emit code to implement the ior bytecode
protected  void emit_irem()
          Emit code to implement the irem bytecode
protected  void emit_ireturn()
          Emit code to implement the ireturn bytecode
protected  void emit_ishl()
          Emit code to implement the ishl bytecode
protected  void emit_ishr()
          Emit code to implement the ishr bytecode
protected  void emit_istore(int index)
          Emit code to store an int to a local variable
protected  void emit_isub()
          Emit code to implement the isub bytecode
protected  void emit_iushr()
          Emit code to implement the iushr bytecode
protected  void emit_ixor()
          Emit code to implement the ixor bytecode
protected  void emit_jsr(int bTarget)
          Emit code to implement the jsr and jsrw bytecode
protected  void emit_l2d()
          Emit code to implement the l2d bytecode
protected  void emit_l2f()
          Emit code to implement the l2f bytecode
protected  void emit_l2i()
          Emit code to implement the l2i bytecode
protected  void emit_ladd()
          Emit code to implement the ladd bytecode
protected  void emit_laload()
          Emit code to load from a long array
protected  void emit_land()
          Emit code to implement the land bytecode
protected  void emit_lastore()
          Emit code to store to a long array
protected  void emit_lcmp()
          Emit code to implement the lcmp bytecode
protected  void emit_lconst(int val)
          Emit code to load a long constant
protected  void emit_ldc(Offset offset, byte type)
          Emit code to load a 32 bit constant
protected  void emit_ldc2(Offset offset, byte type)
          Emit code to load a 64 bit constant
protected  void emit_ldiv()
          Emit code to implement the ldiv bytecode
protected  void emit_lload(int index)
          Emit code to load a long local variable
protected  void emit_lmul()
          Emit code to implement the lmul bytecode
protected  void emit_lneg()
          Emit code to implement the lneg bytecode
protected  void emit_loadretaddrconst(int bcIndex)
          Implementation for OSR load return address bytecode
protected  void emit_lookupswitch(int defaultval, int npairs)
          Emit code to implement the lookupswitch bytecode.
protected  void emit_lor()
          Emit code to implement the lor bytecode
protected  void emit_lrem()
          Emit code to implement the lrem bytecode
protected  void emit_lreturn()
          Emit code to implement the lreturn bytecode
protected  void emit_lshl()
          Emit code to implement the lshsl bytecode
protected  void emit_lshr()
          Emit code to implement the lshr bytecode
protected  void emit_lstore(int index)
          Emit code to store a long to a local variable
protected  void emit_lsub()
          Emit code to implement the lsub bytecode
protected  void emit_lushr()
          Emit code to implement the lushr bytecode
protected  void emit_lxor()
          Emit code to implement the lxor bytecode
protected  boolean emit_Magic(MethodReference magicMethod)
          Emit the code to implement the spcified magic.
protected  void emit_monitorenter()
          Emit code to implement the monitorenter bytecode
protected  void emit_monitorexit()
          Emit code to implement the monitorexit bytecode
protected  void emit_multianewarray(TypeReference typeRef, int dimensions)
          Emit code to allocate a multi-dimensional array
protected  ForwardReference emit_pending_goto(int bTarget)
          Generate branch for pending goto OSR mechanism
protected  void emit_pop()
          Emit code to implement the pop bytecode
protected  void emit_pop2()
          Emit code to implement the pop2 bytecode
protected  void emit_prologue()
          Emit the prologue for the method
protected  void emit_resolved_getfield(FieldReference fieldRef)
          Emit code to implement a getfield
protected  void emit_resolved_getstatic(FieldReference fieldRef)
          Emit code to implement a getstatic
protected  void emit_resolved_invokespecial(MethodReference methodRef, RVMMethod target)
          Emit code to implement a dynamically linked invokespecial
protected  void emit_resolved_invokestatic(MethodReference methodRef)
          Emit code to implement invokestatic
protected  void emit_resolved_invokevirtual(MethodReference methodRef)
          Emit code to implement invokevirtual
protected  void emit_resolved_new(RVMClass typeRef)
          Emit code to allocate a scalar object
protected  void emit_resolved_newarray(RVMArray array)
          Emit code to allocate an array
protected  void emit_resolved_putfield(FieldReference fieldRef)
          Emit code to implement a putfield
protected  void emit_resolved_putstatic(FieldReference fieldRef)
          Emit code to implement a putstatic
protected  void emit_ret(int index)
          Emit code to implement the ret bytecode
protected  void emit_return()
          Emit code to implement the return bytecode
protected  void emit_saload()
          Emit code to load from a short array
protected  void emit_sastore()
          Emit code to store to a short array
protected  void emit_swap()
          Emit code to implement the swap bytecode
protected  void emit_tableswitch(int defaultval, int low, int high)
          Emit code to implement the tableswitch bytecode
protected  void emit_threadSwitchTest(int whereFrom)
          Emit the code for a threadswitch tests (aka a yieldpoint).
protected  void emit_unresolved_getfield(FieldReference fieldRef)
          Emit code to implement a dynamically linked getfield
protected  void emit_unresolved_getstatic(FieldReference fieldRef)
          Emit code to implement a dynamically linked getstatic
protected  void emit_unresolved_invokespecial(MethodReference methodRef)
          Emit code to implement invokespecial
protected  void emit_unresolved_invokestatic(MethodReference methodRef)
          Emit code to implement a dynamically linked invokestatic
protected  void emit_unresolved_invokevirtual(MethodReference methodRef)
          Emit code to implement a dynamically linked invokevirtual
protected  void emit_unresolved_new(TypeReference typeRef)
          Emit code to dynamically link and allocate a scalar object
protected  void emit_unresolved_newarray(TypeReference tRef)
          Emit code to dynamically link the element class and allocate an array
protected  void emit_unresolved_putfield(FieldReference fieldRef)
          Emit code to implement a dynamically linked putfield
protected  void emit_unresolved_putstatic(FieldReference fieldRef)
          Emit code to implement a dynamically linked putstatic
(package private) static void emitDynamicLinkingSequence(Assembler asm, RegisterConstants.GPR reg, MemberReference ref, boolean couldBeZero)
          Emit dynamic linking sequence placing the offset of the given member in reg
private  Offset fp2spOffset(Offset offset)
          Translate a FP offset into an SP offset assuming ESP is still positioned as it was at the start of the current bytecode (biStart)
(package private) static void genBoundsCheck(Assembler asm, RegisterConstants.GPR indexReg, RegisterConstants.GPR arrayRefReg)
          Generate an array bounds check trapping if the array bound check fails, otherwise falling through.
private  void genCondBranch(byte cond, int bTarget)
          Emit a conditional branch on the given condition and bytecode target.
private  void genEpilogue(int returnSize, int bytesPopped)
          Generate method epilogue, releasing values from stack and returning
private  boolean genMagic(MethodReference m)
          Generate magic method
private  void genMonitorEnter()
          Generate instructions to acquire lock on entry to a method
private  void genMonitorExit()
          Generate instructions to release lock on exit from a method
private static void genNullCheck(Assembler asm, RegisterConstants.GPR objRefReg)
          Generate an explicit null check (compare to zero).
private  void genParameterCopy(Offset srcOffset)
          Store parameters into local space of the callee's stackframe.
(package private) static void genParameterRegisterLoad(Assembler asm, int params)
          Copy parameters from operand stack into registers.
protected  void genParameterRegisterLoad(MethodReference method, boolean hasThisParam)
          Copy parameters from operand stack into registers.
private  void genPrologue()
           
private  void genResultRegisterUnload(MethodReference m)
          Push return value of method from register to operand stack.
private  void genThreadSwitchTest(int whereFrom)
           
static int getEmptyStackOffset(NormalMethod m)
          The last true local
private static int getFirstLocalOffset(NormalMethod method)
          This is misnamed.
static short getFloatLocalLocation(int index, short[] localloc, NormalMethod m)
           
static short getGeneralLocalLocation(int index, short[] localloc, NormalMethod m)
           
 byte getLastFixedStackRegister()
           
 byte getLastFloatStackRegister()
           
private static int getStartLocalOffset(NormalMethod method)
           
private  void incEdgeCounter(RegisterConstants.GPR scratch, RegisterConstants.GPR idx, int counterIdx)
          Generate code to increment edge counter
protected  void initializeCompiler()
           
private  Offset localOffset(int local)
          Offset of Java local variable (off stack pointer) assuming ESP is still positioned as it was at the start of the current bytecode (biStart)
static int locationToOffset(short location)
           
static short offsetToLocation(int offset)
           
private static void stackMoveHelper(Assembler asm, RegisterConstants.GPR dest, Offset off)
          Move a value from the stack into a register using the shortest encoding and the appropriate width for 32/64
private  void stackMoveHelper(RegisterConstants.GPR dest, Offset off)
          Move a value from the stack into a register using the shortest encoding and the appropriate width for 32/64
protected  void starting_bytecode()
          Notify BaselineCompilerImpl that we are starting code generation for the bytecode biStart
 
Methods inherited from class org.jikesrvm.compilers.baseline.BaselineCompiler
compile, compile, fullyBootedVM, generateBaselineCompilerSubsystemReport, getCompilerName, getEdgeCounterIndex, getEdgeCounterOffset, initOptions, processCommandLineArg
 
Methods inherited from class org.jikesrvm.compilers.baseline.TemplateCompilerFramework
checkTarget, ending_bytecode, forbiddenBytecode, forbiddenBytecode, genCode, printEndHeader, printMethodMessage, printStartHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameterWords

private final int parameterWords

firstLocalOffset

private int firstLocalOffset

NO_SLOT

static final Offset NO_SLOT

ONE_SLOT

static final Offset ONE_SLOT

TWO_SLOTS

static final Offset TWO_SLOTS

THREE_SLOTS

static final Offset THREE_SLOTS

FOUR_SLOTS

static final Offset FOUR_SLOTS

FIVE_SLOTS

static final Offset FIVE_SLOTS

MINUS_ONE_SLOT

private static final Offset MINUS_ONE_SLOT
Constructor Detail

BaselineCompilerImpl

protected BaselineCompilerImpl(BaselineCompiledMethod cm)
Create a BaselineCompilerImpl object for the compilation of method.

Method Detail

initializeCompiler

protected void initializeCompiler()
Specified by:
initializeCompiler in class BaselineCompiler

getLastFixedStackRegister

public final byte getLastFixedStackRegister()

getLastFloatStackRegister

public final byte getLastFloatStackRegister()

getGeneralLocalLocation

public static short getGeneralLocalLocation(int index,
                                            short[] localloc,
                                            NormalMethod m)

getFloatLocalLocation

public static short getFloatLocalLocation(int index,
                                          short[] localloc,
                                          NormalMethod m)

locationToOffset

public static int locationToOffset(short location)

offsetToLocation

public static short offsetToLocation(int offset)

getEmptyStackOffset

public static int getEmptyStackOffset(NormalMethod m)
The last true local


getFirstLocalOffset

private static int getFirstLocalOffset(NormalMethod method)
This is misnamed. It should be getFirstParameterOffset. It will not work as a base to access true locals. TODO!! make sure it is not being used incorrectly


getStartLocalOffset

private static int getStartLocalOffset(NormalMethod method)

adjustStack

private void adjustStack(int size,
                         boolean mayClobber)
Adjust the value of ESP/RSP

Parameters:
size - amount to change ESP/RSP by
mayClobber - can the value in S0 or memory be destroyed? (i.e. can we use a destructive short push/pop opcode)

stackMoveHelper

private void stackMoveHelper(RegisterConstants.GPR dest,
                             Offset off)
Move a value from the stack into a register using the shortest encoding and the appropriate width for 32/64

Parameters:
dest - register to load into
off - offset on stack

stackMoveHelper

private static void stackMoveHelper(Assembler asm,
                                    RegisterConstants.GPR dest,
                                    Offset off)
Move a value from the stack into a register using the shortest encoding and the appropriate width for 32/64

Parameters:
dest - register to load into
off - offset on stack

baselineEmitLoadTIB

static void baselineEmitLoadTIB(ArchitectureSpecific.Assembler asm,
                                RegisterConstants.GPR dest,
                                RegisterConstants.GPR object)
Utility to call baselineEmitLoadTIB with int arguments not GPR


starting_bytecode

protected final void starting_bytecode()
Notify BaselineCompilerImpl that we are starting code generation for the bytecode biStart

Specified by:
starting_bytecode in class TemplateCompilerFramework

emit_prologue

protected final void emit_prologue()
Description copied from class: TemplateCompilerFramework
Emit the prologue for the method

Specified by:
emit_prologue in class TemplateCompilerFramework

emit_threadSwitchTest

protected final void emit_threadSwitchTest(int whereFrom)
Description copied from class: TemplateCompilerFramework
Emit the code for a threadswitch tests (aka a yieldpoint).

Specified by:
emit_threadSwitchTest in class TemplateCompilerFramework
Parameters:
whereFrom - is this thread switch from a PROLOGUE, BACKEDGE, or EPILOGUE?

emit_Magic

protected final boolean emit_Magic(MethodReference magicMethod)
Description copied from class: TemplateCompilerFramework
Emit the code to implement the spcified magic.

Specified by:
emit_Magic in class TemplateCompilerFramework
Parameters:
magicMethod - desired magic

emit_aconst_null

protected final void emit_aconst_null()
Description copied from class: TemplateCompilerFramework
Emit code to load the null constant.

Specified by:
emit_aconst_null in class TemplateCompilerFramework

emit_iconst

protected final void emit_iconst(int val)
Description copied from class: TemplateCompilerFramework
Emit code to load an int constant.

Specified by:
emit_iconst in class TemplateCompilerFramework
Parameters:
val - the int constant to load

emit_lconst

protected final void emit_lconst(int val)
Description copied from class: TemplateCompilerFramework
Emit code to load a long constant

Specified by:
emit_lconst in class TemplateCompilerFramework
Parameters:
val - the lower 32 bits of long constant (upper32 are 0).

emit_fconst_0

protected final void emit_fconst_0()
Description copied from class: TemplateCompilerFramework
Emit code to load 0.0f

Specified by:
emit_fconst_0 in class TemplateCompilerFramework

emit_fconst_1

protected final void emit_fconst_1()
Description copied from class: TemplateCompilerFramework
Emit code to load 1.0f

Specified by:
emit_fconst_1 in class TemplateCompilerFramework

emit_fconst_2

protected final void emit_fconst_2()
Description copied from class: TemplateCompilerFramework
Emit code to load 2.0f

Specified by:
emit_fconst_2 in class TemplateCompilerFramework

emit_dconst_0

protected final void emit_dconst_0()
Description copied from class: TemplateCompilerFramework
Emit code to load 0.0d

Specified by:
emit_dconst_0 in class TemplateCompilerFramework

emit_dconst_1

protected final void emit_dconst_1()
Description copied from class: TemplateCompilerFramework
Emit code to load 1.0d

Specified by:
emit_dconst_1 in class TemplateCompilerFramework

emit_ldc

protected final void emit_ldc(Offset offset,
                              byte type)
Description copied from class: TemplateCompilerFramework
Emit code to load a 32 bit constant

Specified by:
emit_ldc in class TemplateCompilerFramework
Parameters:
offset - JTOC offset of the constant
type - the type of the constant

emit_ldc2

protected final void emit_ldc2(Offset offset,
                               byte type)
Description copied from class: TemplateCompilerFramework
Emit code to load a 64 bit constant

Specified by:
emit_ldc2 in class TemplateCompilerFramework
Parameters:
offset - JTOC offset of the constant
type - the type of the constant

emit_iload

protected final void emit_iload(int index)
Description copied from class: TemplateCompilerFramework
Emit code to load an int local variable

Specified by:
emit_iload in class TemplateCompilerFramework
Parameters:
index - the local index to load

emit_fload

protected final void emit_fload(int index)
Description copied from class: TemplateCompilerFramework
Emit code to local a float local variable

Specified by:
emit_fload in class TemplateCompilerFramework
Parameters:
index - the local index to load

emit_aload

protected final void emit_aload(int index)
Description copied from class: TemplateCompilerFramework
Emit code to load a reference local variable

Specified by:
emit_aload in class TemplateCompilerFramework
Parameters:
index - the local index to load

emit_lload

protected final void emit_lload(int index)
Description copied from class: TemplateCompilerFramework
Emit code to load a long local variable

Specified by:
emit_lload in class TemplateCompilerFramework
Parameters:
index - the local index to load

emit_dload

protected final void emit_dload(int index)
Description copied from class: TemplateCompilerFramework
Emit code to load a double local variable

Specified by:
emit_dload in class TemplateCompilerFramework
Parameters:
index - the local index to load

emit_istore

protected final void emit_istore(int index)
Description copied from class: TemplateCompilerFramework
Emit code to store an int to a local variable

Specified by:
emit_istore in class TemplateCompilerFramework
Parameters:
index - the local index to load

emit_fstore

protected final void emit_fstore(int index)
Description copied from class: TemplateCompilerFramework
Emit code to store a float to a local variable

Specified by:
emit_fstore in class TemplateCompilerFramework
Parameters:
index - the local index to load

emit_astore

protected final void emit_astore(int index)
Description copied from class: TemplateCompilerFramework
Emit code to store a reference to a local variable

Specified by:
emit_astore in class TemplateCompilerFramework
Parameters:
index - the local index to load

emit_lstore

protected final void emit_lstore(int index)
Description copied from class: TemplateCompilerFramework
Emit code to store a long to a local variable

Specified by:
emit_lstore in class TemplateCompilerFramework
Parameters:
index - the local index to load

emit_dstore

protected final void emit_dstore(int index)
Description copied from class: TemplateCompilerFramework
Emit code to store an double to a local variable

Specified by:
emit_dstore in class TemplateCompilerFramework
Parameters:
index - the local index to load

emit_iaload

protected final void emit_iaload()
Description copied from class: TemplateCompilerFramework
Emit code to load from an int array

Specified by:
emit_iaload in class TemplateCompilerFramework

emit_faload

protected final void emit_faload()
Description copied from class: TemplateCompilerFramework
Emit code to load from a float array

Specified by:
emit_faload in class TemplateCompilerFramework

emit_aaload

protected final void emit_aaload()
Description copied from class: TemplateCompilerFramework
Emit code to load from a reference array

Specified by:
emit_aaload in class TemplateCompilerFramework

emit_caload

protected final void emit_caload()
Description copied from class: TemplateCompilerFramework
Emit code to load from a char array

Specified by:
emit_caload in class TemplateCompilerFramework

emit_saload

protected final void emit_saload()
Description copied from class: TemplateCompilerFramework
Emit code to load from a short array

Specified by:
emit_saload in class TemplateCompilerFramework

emit_baload

protected final void emit_baload()
Description copied from class: TemplateCompilerFramework
Emit code to load from a byte/boolean array

Specified by:
emit_baload in class TemplateCompilerFramework

emit_laload

protected final void emit_laload()
Description copied from class: TemplateCompilerFramework
Emit code to load from a long array

Specified by:
emit_laload in class TemplateCompilerFramework

emit_daload

protected final void emit_daload()
Description copied from class: TemplateCompilerFramework
Emit code to load from a double array

Specified by:
emit_daload in class TemplateCompilerFramework

boundsCheckHelper

private void boundsCheckHelper(Offset index,
                               Offset arrayRef)
Private helper to perform an array bounds check

Parameters:
index - offset from current SP to the array index
arrayRef - offset from current SP to the array reference

arrayStore16bitHelper

private void arrayStore16bitHelper()
Private helper to perform a char or short array store


arrayStore32bitHelper

private void arrayStore32bitHelper()
Private helper to perform a float or int array store


arrayStore64bitHelper

private void arrayStore64bitHelper()
Private helper to perform a long or double array store


emit_iastore

protected final void emit_iastore()
Description copied from class: TemplateCompilerFramework
Emit code to store to an int array

Specified by:
emit_iastore in class TemplateCompilerFramework

emit_fastore

protected final void emit_fastore()
Description copied from class: TemplateCompilerFramework
Emit code to store to a float array

Specified by:
emit_fastore in class TemplateCompilerFramework

emit_aastore

protected final void emit_aastore()
Description copied from class: TemplateCompilerFramework
Emit code to store to a reference array

Specified by:
emit_aastore in class TemplateCompilerFramework

emit_castore

protected final void emit_castore()
Description copied from class: TemplateCompilerFramework
Emit code to store to a char array

Specified by:
emit_castore in class TemplateCompilerFramework

emit_sastore

protected final void emit_sastore()
Description copied from class: TemplateCompilerFramework
Emit code to store to a short array

Specified by:
emit_sastore in class TemplateCompilerFramework

emit_bastore

protected final void emit_bastore()
Description copied from class: TemplateCompilerFramework
Emit code to store to a byte/boolean array

Specified by:
emit_bastore in class TemplateCompilerFramework

emit_lastore

protected final void emit_lastore()
Description copied from class: TemplateCompilerFramework
Emit code to store to a long array

Specified by:
emit_lastore in class TemplateCompilerFramework

emit_dastore

protected final void emit_dastore()
Description copied from class: TemplateCompilerFramework
Emit code to store to a double array

Specified by:
emit_dastore in class TemplateCompilerFramework

emit_pop

protected final void emit_pop()
Description copied from class: TemplateCompilerFramework
Emit code to implement the pop bytecode

Specified by:
emit_pop in class TemplateCompilerFramework

emit_pop2

protected final void emit_pop2()
Description copied from class: TemplateCompilerFramework
Emit code to implement the pop2 bytecode

Specified by:
emit_pop2 in class TemplateCompilerFramework

emit_dup

protected final void emit_dup()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dup bytecode

Specified by:
emit_dup in class TemplateCompilerFramework

emit_dup_x1

protected final void emit_dup_x1()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dup_x1 bytecode

Specified by:
emit_dup_x1 in class TemplateCompilerFramework

emit_dup_x2

protected final void emit_dup_x2()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dup_x2 bytecode

Specified by:
emit_dup_x2 in class TemplateCompilerFramework

emit_dup2

protected final void emit_dup2()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dup2 bytecode

Specified by:
emit_dup2 in class TemplateCompilerFramework

emit_dup2_x1

protected final void emit_dup2_x1()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dup2_x1 bytecode

Specified by:
emit_dup2_x1 in class TemplateCompilerFramework

emit_dup2_x2

protected final void emit_dup2_x2()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dup2_x2 bytecode

Specified by:
emit_dup2_x2 in class TemplateCompilerFramework

emit_swap

protected final void emit_swap()
Description copied from class: TemplateCompilerFramework
Emit code to implement the swap bytecode

Specified by:
emit_swap in class TemplateCompilerFramework

emit_iadd

protected final void emit_iadd()
Description copied from class: TemplateCompilerFramework
Emit code to implement the iadd bytecode

Specified by:
emit_iadd in class TemplateCompilerFramework

emit_isub

protected final void emit_isub()
Description copied from class: TemplateCompilerFramework
Emit code to implement the isub bytecode

Specified by:
emit_isub in class TemplateCompilerFramework

emit_imul

protected final void emit_imul()
Description copied from class: TemplateCompilerFramework
Emit code to implement the imul bytecode

Specified by:
emit_imul in class TemplateCompilerFramework

emit_idiv

protected final void emit_idiv()
Description copied from class: TemplateCompilerFramework
Emit code to implement the idiv bytecode

Specified by:
emit_idiv in class TemplateCompilerFramework

emit_irem

protected final void emit_irem()
Description copied from class: TemplateCompilerFramework
Emit code to implement the irem bytecode

Specified by:
emit_irem in class TemplateCompilerFramework

emit_ineg

protected final void emit_ineg()
Description copied from class: TemplateCompilerFramework
Emit code to implement the ineg bytecode

Specified by:
emit_ineg in class TemplateCompilerFramework

emit_ishl

protected final void emit_ishl()
Description copied from class: TemplateCompilerFramework
Emit code to implement the ishl bytecode

Specified by:
emit_ishl in class TemplateCompilerFramework

emit_ishr

protected final void emit_ishr()
Description copied from class: TemplateCompilerFramework
Emit code to implement the ishr bytecode

Specified by:
emit_ishr in class TemplateCompilerFramework

emit_iushr

protected final void emit_iushr()
Description copied from class: TemplateCompilerFramework
Emit code to implement the iushr bytecode

Specified by:
emit_iushr in class TemplateCompilerFramework

emit_iand

protected final void emit_iand()
Description copied from class: TemplateCompilerFramework
Emit code to implement the iand bytecode

Specified by:
emit_iand in class TemplateCompilerFramework

emit_ior

protected final void emit_ior()
Description copied from class: TemplateCompilerFramework
Emit code to implement the ior bytecode

Specified by:
emit_ior in class TemplateCompilerFramework

emit_ixor

protected final void emit_ixor()
Description copied from class: TemplateCompilerFramework
Emit code to implement the ixor bytecode

Specified by:
emit_ixor in class TemplateCompilerFramework

emit_iinc

protected final void emit_iinc(int index,
                               int val)
Description copied from class: TemplateCompilerFramework
Emit code to implement the iinc bytecode

Specified by:
emit_iinc in class TemplateCompilerFramework
Parameters:
index - index of local
val - value to increment it by

emit_ladd

protected final void emit_ladd()
Description copied from class: TemplateCompilerFramework
Emit code to implement the ladd bytecode

Specified by:
emit_ladd in class TemplateCompilerFramework

emit_lsub

protected final void emit_lsub()
Description copied from class: TemplateCompilerFramework
Emit code to implement the lsub bytecode

Specified by:
emit_lsub in class TemplateCompilerFramework

emit_lmul

protected final void emit_lmul()
Description copied from class: TemplateCompilerFramework
Emit code to implement the lmul bytecode

Specified by:
emit_lmul in class TemplateCompilerFramework

emit_ldiv

protected final void emit_ldiv()
Description copied from class: TemplateCompilerFramework
Emit code to implement the ldiv bytecode

Specified by:
emit_ldiv in class TemplateCompilerFramework

emit_lrem

protected final void emit_lrem()
Description copied from class: TemplateCompilerFramework
Emit code to implement the lrem bytecode

Specified by:
emit_lrem in class TemplateCompilerFramework

emit_lneg

protected final void emit_lneg()
Description copied from class: TemplateCompilerFramework
Emit code to implement the lneg bytecode

Specified by:
emit_lneg in class TemplateCompilerFramework

emit_lshl

protected final void emit_lshl()
Description copied from class: TemplateCompilerFramework
Emit code to implement the lshsl bytecode

Specified by:
emit_lshl in class TemplateCompilerFramework

emit_lshr

protected final void emit_lshr()
Description copied from class: TemplateCompilerFramework
Emit code to implement the lshr bytecode

Specified by:
emit_lshr in class TemplateCompilerFramework

emit_lushr

protected final void emit_lushr()
Description copied from class: TemplateCompilerFramework
Emit code to implement the lushr bytecode

Specified by:
emit_lushr in class TemplateCompilerFramework

emit_land

protected final void emit_land()
Description copied from class: TemplateCompilerFramework
Emit code to implement the land bytecode

Specified by:
emit_land in class TemplateCompilerFramework

emit_lor

protected final void emit_lor()
Description copied from class: TemplateCompilerFramework
Emit code to implement the lor bytecode

Specified by:
emit_lor in class TemplateCompilerFramework

emit_lxor

protected final void emit_lxor()
Emit code to implement the lxor bytecode

Specified by:
emit_lxor in class TemplateCompilerFramework

emit_fadd

protected final void emit_fadd()
Description copied from class: TemplateCompilerFramework
Emit code to implement the fadd bytecode

Specified by:
emit_fadd in class TemplateCompilerFramework

emit_fsub

protected final void emit_fsub()
Description copied from class: TemplateCompilerFramework
Emit code to implement the fsub bytecode

Specified by:
emit_fsub in class TemplateCompilerFramework

emit_fmul

protected final void emit_fmul()
Description copied from class: TemplateCompilerFramework
Emit code to implement the fmul bytecode

Specified by:
emit_fmul in class TemplateCompilerFramework

emit_fdiv

protected final void emit_fdiv()
Emit code to implement the fdiv bytecode

Specified by:
emit_fdiv in class TemplateCompilerFramework

emit_frem

protected final void emit_frem()
Description copied from class: TemplateCompilerFramework
Emit code to implement the frem bytecode

Specified by:
emit_frem in class TemplateCompilerFramework

emit_fneg

protected final void emit_fneg()
Description copied from class: TemplateCompilerFramework
Emit code to implement the fneg bytecode

Specified by:
emit_fneg in class TemplateCompilerFramework

emit_dadd

protected final void emit_dadd()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dadd bytecode

Specified by:
emit_dadd in class TemplateCompilerFramework

emit_dsub

protected final void emit_dsub()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dsub bytecode

Specified by:
emit_dsub in class TemplateCompilerFramework

emit_dmul

protected final void emit_dmul()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dmul bytecode

Specified by:
emit_dmul in class TemplateCompilerFramework

emit_ddiv

protected final void emit_ddiv()
Description copied from class: TemplateCompilerFramework
Emit code to implement the ddiv bytecode

Specified by:
emit_ddiv in class TemplateCompilerFramework

emit_drem

protected final void emit_drem()
Description copied from class: TemplateCompilerFramework
Emit code to implement the drem bytecode

Specified by:
emit_drem in class TemplateCompilerFramework

emit_dneg

protected final void emit_dneg()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dneg bytecode

Specified by:
emit_dneg in class TemplateCompilerFramework

emit_i2l

protected final void emit_i2l()
Description copied from class: TemplateCompilerFramework
Emit code to implement the i2l bytecode

Specified by:
emit_i2l in class TemplateCompilerFramework

emit_l2i

protected final void emit_l2i()
Description copied from class: TemplateCompilerFramework
Emit code to implement the l2i bytecode

Specified by:
emit_l2i in class TemplateCompilerFramework

emit_i2f

protected final void emit_i2f()
Description copied from class: TemplateCompilerFramework
Emit code to implement the i2f bytecode

Specified by:
emit_i2f in class TemplateCompilerFramework

emit_i2d

protected final void emit_i2d()
Description copied from class: TemplateCompilerFramework
Emit code to implement the i2d bytecode

Specified by:
emit_i2d in class TemplateCompilerFramework

emit_l2f

protected final void emit_l2f()
Description copied from class: TemplateCompilerFramework
Emit code to implement the l2f bytecode

Specified by:
emit_l2f in class TemplateCompilerFramework

emit_l2d

protected final void emit_l2d()
Description copied from class: TemplateCompilerFramework
Emit code to implement the l2d bytecode

Specified by:
emit_l2d in class TemplateCompilerFramework

emit_f2d

protected final void emit_f2d()
Description copied from class: TemplateCompilerFramework
Emit code to implement the f2d bytecode

Specified by:
emit_f2d in class TemplateCompilerFramework

emit_d2f

protected final void emit_d2f()
Description copied from class: TemplateCompilerFramework
Emit code to implement the d2f bytecode

Specified by:
emit_d2f in class TemplateCompilerFramework

emit_f2i

protected final void emit_f2i()
Description copied from class: TemplateCompilerFramework
Emit code to implement the f2i bytecode

Specified by:
emit_f2i in class TemplateCompilerFramework

emit_f2l

protected final void emit_f2l()
Description copied from class: TemplateCompilerFramework
Emit code to implement the f2l bytecode

Specified by:
emit_f2l in class TemplateCompilerFramework

emit_d2i

protected final void emit_d2i()
Description copied from class: TemplateCompilerFramework
Emit code to implement the d2i bytecode

Specified by:
emit_d2i in class TemplateCompilerFramework

emit_d2l

protected final void emit_d2l()
Description copied from class: TemplateCompilerFramework
Emit code to implement the d2l bytecode

Specified by:
emit_d2l in class TemplateCompilerFramework

emit_i2b

protected final void emit_i2b()
Description copied from class: TemplateCompilerFramework
Emit code to implement the i2b bytecode

Specified by:
emit_i2b in class TemplateCompilerFramework

emit_i2c

protected final void emit_i2c()
Description copied from class: TemplateCompilerFramework
Emit code to implement the i2c bytecode

Specified by:
emit_i2c in class TemplateCompilerFramework

emit_i2s

protected final void emit_i2s()
Description copied from class: TemplateCompilerFramework
Emit code to implement the i2s bytecode

Specified by:
emit_i2s in class TemplateCompilerFramework

emit_lcmp

protected final void emit_lcmp()
Description copied from class: TemplateCompilerFramework
Emit code to implement the lcmp bytecode

Specified by:
emit_lcmp in class TemplateCompilerFramework

emit_fcmpl

protected final void emit_fcmpl()
Description copied from class: TemplateCompilerFramework
Emit code to implement the fcmpl bytecode

Specified by:
emit_fcmpl in class TemplateCompilerFramework

emit_fcmpg

protected final void emit_fcmpg()
Description copied from class: TemplateCompilerFramework
Emit code to implement the fcmpg bytecode

Specified by:
emit_fcmpg in class TemplateCompilerFramework

emit_dcmpl

protected final void emit_dcmpl()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dcmpl bytecode

Specified by:
emit_dcmpl in class TemplateCompilerFramework

emit_dcmpg

protected final void emit_dcmpg()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dcmpg bytecode

Specified by:
emit_dcmpg in class TemplateCompilerFramework

emit_ifeq

protected final void emit_ifeq(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the ifeg bytecode

Specified by:
emit_ifeq in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_ifne

protected final void emit_ifne(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the ifne bytecode

Specified by:
emit_ifne in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_iflt

protected final void emit_iflt(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the iflt bytecode

Specified by:
emit_iflt in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_ifge

protected final void emit_ifge(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the ifge bytecode

Specified by:
emit_ifge in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_ifgt

protected final void emit_ifgt(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the ifgt bytecode

Specified by:
emit_ifgt in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_ifle

protected final void emit_ifle(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the ifle bytecode

Specified by:
emit_ifle in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_if_icmpeq

protected final void emit_if_icmpeq(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the if_icmpeq bytecode

Specified by:
emit_if_icmpeq in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_if_icmpne

protected final void emit_if_icmpne(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the if_icmpne bytecode

Specified by:
emit_if_icmpne in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_if_icmplt

protected final void emit_if_icmplt(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the if_icmplt bytecode

Specified by:
emit_if_icmplt in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_if_icmpge

protected final void emit_if_icmpge(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the if_icmpge bytecode

Specified by:
emit_if_icmpge in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_if_icmpgt

protected final void emit_if_icmpgt(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the if_icmpgt bytecode

Specified by:
emit_if_icmpgt in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_if_icmple

protected final void emit_if_icmple(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the if_icmple bytecode

Specified by:
emit_if_icmple in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_if_acmpeq

protected final void emit_if_acmpeq(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the if_acmpeq bytecode

Specified by:
emit_if_acmpeq in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_if_acmpne

protected final void emit_if_acmpne(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the if_acmpne bytecode

Specified by:
emit_if_acmpne in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_ifnull

protected final void emit_ifnull(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the ifnull bytecode

Specified by:
emit_ifnull in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_ifnonnull

protected final void emit_ifnonnull(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the ifnonnull bytecode

Specified by:
emit_ifnonnull in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_goto

protected final void emit_goto(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the goto and gotow bytecodes

Specified by:
emit_goto in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the branch

emit_jsr

protected final void emit_jsr(int bTarget)
Description copied from class: TemplateCompilerFramework
Emit code to implement the jsr and jsrw bytecode

Specified by:
emit_jsr in class TemplateCompilerFramework
Parameters:
bTarget - target bytecode of the jsr

emit_ret

protected final void emit_ret(int index)
Description copied from class: TemplateCompilerFramework
Emit code to implement the ret bytecode

Specified by:
emit_ret in class TemplateCompilerFramework
Parameters:
index - local variable containing the return address

emit_tableswitch

protected final void emit_tableswitch(int defaultval,
                                      int low,
                                      int high)
Description copied from class: TemplateCompilerFramework
Emit code to implement the tableswitch bytecode

Specified by:
emit_tableswitch in class TemplateCompilerFramework
Parameters:
defaultval - bcIndex of the default target
low - low value of switch
high - high value of switch

emit_lookupswitch

protected final void emit_lookupswitch(int defaultval,
                                       int npairs)
Emit code to implement the lookupswitch bytecode. Uses linear search, one could use a binary search tree instead, but this is the baseline compiler, so don't worry about it.

Specified by:
emit_lookupswitch in class TemplateCompilerFramework
Parameters:
defaultval - bcIndex of the default target
npairs - number of pairs in the lookup switch

emit_ireturn

protected final void emit_ireturn()
Description copied from class: TemplateCompilerFramework
Emit code to implement the ireturn bytecode

Specified by:
emit_ireturn in class TemplateCompilerFramework

emit_lreturn

protected final void emit_lreturn()
Description copied from class: TemplateCompilerFramework
Emit code to implement the lreturn bytecode

Specified by:
emit_lreturn in class TemplateCompilerFramework

emit_freturn

protected final void emit_freturn()
Description copied from class: TemplateCompilerFramework
Emit code to implement the freturn bytecode

Specified by:
emit_freturn in class TemplateCompilerFramework

emit_dreturn

protected final void emit_dreturn()
Description copied from class: TemplateCompilerFramework
Emit code to implement the dreturn bytecode

Specified by:
emit_dreturn in class TemplateCompilerFramework

emit_areturn

protected final void emit_areturn()
Description copied from class: TemplateCompilerFramework
Emit code to implement the areturn bytecode

Specified by:
emit_areturn in class TemplateCompilerFramework

emit_return

protected final void emit_return()
Description copied from class: TemplateCompilerFramework
Emit code to implement the return bytecode

Specified by:
emit_return in class TemplateCompilerFramework

emit_unresolved_getstatic

protected final void emit_unresolved_getstatic(FieldReference fieldRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement a dynamically linked getstatic

Specified by:
emit_unresolved_getstatic in class TemplateCompilerFramework
Parameters:
fieldRef - the referenced field

emit_resolved_getstatic

protected final void emit_resolved_getstatic(FieldReference fieldRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement a getstatic

Specified by:
emit_resolved_getstatic in class TemplateCompilerFramework
Parameters:
fieldRef - the referenced field

emit_unresolved_putstatic

protected final void emit_unresolved_putstatic(FieldReference fieldRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement a dynamically linked putstatic

Specified by:
emit_unresolved_putstatic in class TemplateCompilerFramework
Parameters:
fieldRef - the referenced field

emit_resolved_putstatic

protected final void emit_resolved_putstatic(FieldReference fieldRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement a putstatic

Specified by:
emit_resolved_putstatic in class TemplateCompilerFramework
Parameters:
fieldRef - the referenced field

emit_unresolved_getfield

protected final void emit_unresolved_getfield(FieldReference fieldRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement a dynamically linked getfield

Specified by:
emit_unresolved_getfield in class TemplateCompilerFramework
Parameters:
fieldRef - the referenced field

emit_resolved_getfield

protected final void emit_resolved_getfield(FieldReference fieldRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement a getfield

Specified by:
emit_resolved_getfield in class TemplateCompilerFramework
Parameters:
fieldRef - the referenced field

emit_unresolved_putfield

protected final void emit_unresolved_putfield(FieldReference fieldRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement a dynamically linked putfield

Specified by:
emit_unresolved_putfield in class TemplateCompilerFramework
Parameters:
fieldRef - the referenced field

emit_resolved_putfield

protected final void emit_resolved_putfield(FieldReference fieldRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement a putfield

Specified by:
emit_resolved_putfield in class TemplateCompilerFramework
Parameters:
fieldRef - the referenced field

emit_unresolved_invokevirtual

protected final void emit_unresolved_invokevirtual(MethodReference methodRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement a dynamically linked invokevirtual

Specified by:
emit_unresolved_invokevirtual in class TemplateCompilerFramework
Parameters:
methodRef - the referenced method

emit_resolved_invokevirtual

protected final void emit_resolved_invokevirtual(MethodReference methodRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement invokevirtual

Specified by:
emit_resolved_invokevirtual in class TemplateCompilerFramework
Parameters:
methodRef - the referenced method

emit_resolved_invokespecial

protected final void emit_resolved_invokespecial(MethodReference methodRef,
                                                 RVMMethod target)
Description copied from class: TemplateCompilerFramework
Emit code to implement a dynamically linked invokespecial

Specified by:
emit_resolved_invokespecial in class TemplateCompilerFramework
Parameters:
methodRef - the referenced method
target - the method to invoke

emit_unresolved_invokespecial

protected final void emit_unresolved_invokespecial(MethodReference methodRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement invokespecial

Specified by:
emit_unresolved_invokespecial in class TemplateCompilerFramework
Parameters:
methodRef - the referenced method

emit_unresolved_invokestatic

protected final void emit_unresolved_invokestatic(MethodReference methodRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement a dynamically linked invokestatic

Specified by:
emit_unresolved_invokestatic in class TemplateCompilerFramework
Parameters:
methodRef - the referenced method

emit_resolved_invokestatic

protected final void emit_resolved_invokestatic(MethodReference methodRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement invokestatic

Specified by:
emit_resolved_invokestatic in class TemplateCompilerFramework
Parameters:
methodRef - the referenced method

emit_invokeinterface

protected final void emit_invokeinterface(MethodReference methodRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement the invokeinterface bytecode

Specified by:
emit_invokeinterface in class TemplateCompilerFramework
Parameters:
methodRef - the referenced method

emit_resolved_new

protected final void emit_resolved_new(RVMClass typeRef)
Description copied from class: TemplateCompilerFramework
Emit code to allocate a scalar object

Specified by:
emit_resolved_new in class TemplateCompilerFramework
Parameters:
typeRef - The RVMClass to instantiate

emit_unresolved_new

protected final void emit_unresolved_new(TypeReference typeRef)
Description copied from class: TemplateCompilerFramework
Emit code to dynamically link and allocate a scalar object

Specified by:
emit_unresolved_new in class TemplateCompilerFramework
Parameters:
typeRef - TypeReference to dynamically link & instantiate

emit_resolved_newarray

protected final void emit_resolved_newarray(RVMArray array)
Description copied from class: TemplateCompilerFramework
Emit code to allocate an array

Specified by:
emit_resolved_newarray in class TemplateCompilerFramework
Parameters:
array - the RVMArray to instantiate

emit_unresolved_newarray

protected final void emit_unresolved_newarray(TypeReference tRef)
Description copied from class: TemplateCompilerFramework
Emit code to dynamically link the element class and allocate an array

Specified by:
emit_unresolved_newarray in class TemplateCompilerFramework
Parameters:
tRef - typeReference to dynamically link & instantiate

emit_multianewarray

protected final void emit_multianewarray(TypeReference typeRef,
                                         int dimensions)
Description copied from class: TemplateCompilerFramework
Emit code to allocate a multi-dimensional array

Specified by:
emit_multianewarray in class TemplateCompilerFramework
Parameters:
typeRef - typeReference to dynamically link & instantiate
dimensions - the number of dimensions

emit_arraylength

protected final void emit_arraylength()
Description copied from class: TemplateCompilerFramework
Emit code to implement the arraylength bytecode

Specified by:
emit_arraylength in class TemplateCompilerFramework

emit_athrow

protected final void emit_athrow()
Description copied from class: TemplateCompilerFramework
Emit code to implement the athrow bytecode

Specified by:
emit_athrow in class TemplateCompilerFramework

emit_checkcast

protected final void emit_checkcast(TypeReference typeRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement the checkcast bytecode

Specified by:
emit_checkcast in class TemplateCompilerFramework
Parameters:
typeRef - the LHS type

emit_checkcast_resolvedInterface

protected final void emit_checkcast_resolvedInterface(RVMClass type)
Description copied from class: TemplateCompilerFramework
Emit code to implement the checkcast bytecode

Specified by:
emit_checkcast_resolvedInterface in class TemplateCompilerFramework
Parameters:
type - the LHS type

emit_checkcast_resolvedClass

protected final void emit_checkcast_resolvedClass(RVMClass type)
Description copied from class: TemplateCompilerFramework
Emit code to implement the checkcast bytecode

Specified by:
emit_checkcast_resolvedClass in class TemplateCompilerFramework
Parameters:
type - the LHS type

emit_checkcast_final

protected final void emit_checkcast_final(RVMType type)
Description copied from class: TemplateCompilerFramework
Emit code to implement the checkcast bytecode

Specified by:
emit_checkcast_final in class TemplateCompilerFramework
Parameters:
type - the LHS type

emit_instanceof

protected final void emit_instanceof(TypeReference typeRef)
Description copied from class: TemplateCompilerFramework
Emit code to implement the instanceof bytecode

Specified by:
emit_instanceof in class TemplateCompilerFramework
Parameters:
typeRef - the LHS type

emit_instanceof_resolvedInterface

protected final void emit_instanceof_resolvedInterface(RVMClass type)
Description copied from class: TemplateCompilerFramework
Emit code to implement the instanceof bytecode

Specified by:
emit_instanceof_resolvedInterface in class TemplateCompilerFramework
Parameters:
type - the LHS type

emit_instanceof_resolvedClass

protected final void emit_instanceof_resolvedClass(RVMClass type)
Description copied from class: TemplateCompilerFramework
Emit code to implement the instanceof bytecode

Specified by:
emit_instanceof_resolvedClass in class TemplateCompilerFramework
Parameters:
type - the LHS type

emit_instanceof_final

protected final void emit_instanceof_final(RVMType type)
Description copied from class: TemplateCompilerFramework
Emit code to implement the instanceof bytecode

Specified by:
emit_instanceof_final in class TemplateCompilerFramework
Parameters:
type - the LHS type

emit_monitorenter

protected final void emit_monitorenter()
Description copied from class: TemplateCompilerFramework
Emit code to implement the monitorenter bytecode

Specified by:
emit_monitorenter in class TemplateCompilerFramework

emit_monitorexit

protected final void emit_monitorexit()
Description copied from class: TemplateCompilerFramework
Emit code to implement the monitorexit bytecode

Specified by:
emit_monitorexit in class TemplateCompilerFramework

genPrologue

private void genPrologue()

emit_deferred_prologue

protected final void emit_deferred_prologue()
Emit deferred prologue

Specified by:
emit_deferred_prologue in class TemplateCompilerFramework

genEpilogue

private void genEpilogue(int returnSize,
                         int bytesPopped)
Generate method epilogue, releasing values from stack and returning

Parameters:
returnSize - the size in bytes of the returned value
bytesPopped - number of paramter bytes already released

genMonitorEnter

private void genMonitorEnter()
Generate instructions to acquire lock on entry to a method


genMonitorExit

private void genMonitorExit()
Generate instructions to release lock on exit from a method


genNullCheck

private static void genNullCheck(Assembler asm,
                                 RegisterConstants.GPR objRefReg)
Generate an explicit null check (compare to zero).

Parameters:
asm - the assembler to generate into
objRefReg - the register containing the reference

genBoundsCheck

static void genBoundsCheck(Assembler asm,
                           RegisterConstants.GPR indexReg,
                           RegisterConstants.GPR arrayRefReg)
Generate an array bounds check trapping if the array bound check fails, otherwise falling through.

Parameters:
asm - the assembler to generate into
indexReg - the register containing the index
arrayRefReg - the register containing the array reference

genCondBranch

private void genCondBranch(byte cond,
                           int bTarget)
Emit a conditional branch on the given condition and bytecode target. The caller has just emitted the instruction sequence to set the condition codes.


incEdgeCounter

private void incEdgeCounter(RegisterConstants.GPR scratch,
                            RegisterConstants.GPR idx,
                            int counterIdx)
Generate code to increment edge counter

Parameters:
scratch - register to use as scratch
idx - optional register holding index value or null
counterIdx - index in to counters array

genParameterRegisterLoad

static void genParameterRegisterLoad(Assembler asm,
                                     int params)
Copy parameters from operand stack into registers. Assumption: parameters are laid out on the stack in order with SP pointing to the last parameter. Also, this method is called before the generation of a "helper" method call. Assumption: no floating-point parameters.

Parameters:
asm - assembler to use for generation
params - number of parameter words (including "this" if any).

genParameterRegisterLoad

protected void genParameterRegisterLoad(MethodReference method,
                                        boolean hasThisParam)
Copy parameters from operand stack into registers. Assumption: parameters are layed out on the stack in order with SP pointing to the last parameter. Also, this method is called before the generation of an explicit method call.

Parameters:
method - is the method to be called.
hasThisParam - is the method virtual?

genParameterCopy

private void genParameterCopy(Offset srcOffset)
Store parameters into local space of the callee's stackframe. Taken: srcOffset - offset from frame pointer of first parameter in caller's stackframe. Assumption: although some parameters may be passed in registers, space for all parameters is laid out in order on the caller's stackframe.


genResultRegisterUnload

private void genResultRegisterUnload(MethodReference m)
Push return value of method from register to operand stack.


genThreadSwitchTest

private void genThreadSwitchTest(int whereFrom)
Parameters:
whereFrom - is this thread switch from a PROLOGUE, BACKEDGE, or EPILOGUE?

checkForActualCall

public static boolean checkForActualCall(MethodReference methodToBeCalled)
Indicate if specified Magic method causes a frame to be created on the runtime stack.

Parameters:
methodToBeCalled - RVMMethod of the magic method being called
Returns:
true if method causes a stackframe to be created

genMagic

private boolean genMagic(MethodReference m)
Generate magic method

Parameters:
m - method to generate
Returns:
true if magic method was generated

localOffset

private Offset localOffset(int local)
Offset of Java local variable (off stack pointer) assuming ESP is still positioned as it was at the start of the current bytecode (biStart)


fp2spOffset

private Offset fp2spOffset(Offset offset)
Translate a FP offset into an SP offset assuming ESP is still positioned as it was at the start of the current bytecode (biStart)


emitDynamicLinkingSequence

static void emitDynamicLinkingSequence(Assembler asm,
                                       RegisterConstants.GPR reg,
                                       MemberReference ref,
                                       boolean couldBeZero)
Emit dynamic linking sequence placing the offset of the given member in reg

Parameters:
asm - assembler to generate code into
reg - register to hold offset to method
ref - method reference to be resolved
couldBeZero - could the value in the offsets table require resolving

emit_invoke_compiledmethod

protected final void emit_invoke_compiledmethod(CompiledMethod cm)
OSR routine to emit code to invoke a compiled method (with known jtoc offset). Treat it like a resolved invoke static, but take care of this object in the case.

I have not thought about GCMaps for invoke_compiledmethod.

TODO: Figure out what the above GCMaps comment means and fix it!

Specified by:
emit_invoke_compiledmethod in class TemplateCompilerFramework

emit_loadretaddrconst

protected final void emit_loadretaddrconst(int bcIndex)
Implementation for OSR load return address bytecode

Specified by:
emit_loadretaddrconst in class TemplateCompilerFramework

emit_pending_goto

protected final ForwardReference emit_pending_goto(int bTarget)
Generate branch for pending goto OSR mechanism

Specified by:
emit_pending_goto in class TemplateCompilerFramework
Parameters:
bTarget - is optional, it emits a JUMP instruction, but the caller is responsible for patching the target address by calling the resolve method of the returned forward reference.