|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.compilers.baseline.TemplateCompilerFramework
org.jikesrvm.compilers.baseline.BaselineCompiler
org.jikesrvm.compilers.baseline.ia32.BaselineCompilerImpl
public abstract class BaselineCompilerImpl
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_SAVE_OFFSET, T1, 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.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.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 |
| 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 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 gen 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 |
|---|
private final int parameterWords
private int firstLocalOffset
static final Offset NO_SLOT
static final Offset ONE_SLOT
static final Offset TWO_SLOTS
static final Offset THREE_SLOTS
static final Offset FOUR_SLOTS
static final Offset FIVE_SLOTS
private static final Offset MINUS_ONE_SLOT
| Constructor Detail |
|---|
protected BaselineCompilerImpl(BaselineCompiledMethod cm)
| Method Detail |
|---|
protected void initializeCompiler()
initializeCompiler in class BaselineCompilerpublic final byte getLastFixedStackRegister()
public final byte getLastFloatStackRegister()
public static short getGeneralLocalLocation(int index,
short[] localloc,
NormalMethod m)
public static short getFloatLocalLocation(int index,
short[] localloc,
NormalMethod m)
public static int locationToOffset(short location)
public static short offsetToLocation(int offset)
public static int getEmptyStackOffset(NormalMethod m)
private static int getFirstLocalOffset(NormalMethod method)
private static int getStartLocalOffset(NormalMethod method)
private void adjustStack(int size,
boolean mayClobber)
size - amount to change ESP/RSP bymayClobber - can the value in S0 or memory be destroyed?
(ie can we use a destructive short push/pop opcode)
private void stackMoveHelper(RegisterConstants.GPR dest,
Offset off)
dest - register to load intooff - offset on stack
private static void stackMoveHelper(Assembler asm,
RegisterConstants.GPR dest,
Offset off)
dest - register to load intooff - offset on stack
static void baselineEmitLoadTIB(ArchitectureSpecific.Assembler asm,
RegisterConstants.GPR dest,
RegisterConstants.GPR object)
protected final void starting_bytecode()
starting_bytecode in class TemplateCompilerFrameworkprotected final void emit_prologue()
emit_prologue in class TemplateCompilerFrameworkprotected final void emit_threadSwitchTest(int whereFrom)
emit_threadSwitchTest in class TemplateCompilerFrameworkwhereFrom - is this thread switch from a PROLOGUE, BACKEDGE, or EPILOGUE?protected final boolean emit_Magic(MethodReference magicMethod)
emit_Magic in class TemplateCompilerFrameworkmagicMethod - desired magicprotected final void emit_aconst_null()
emit_aconst_null in class TemplateCompilerFrameworkprotected final void emit_iconst(int val)
emit_iconst in class TemplateCompilerFrameworkval - the int constant to loadprotected final void emit_lconst(int val)
emit_lconst in class TemplateCompilerFrameworkval - the lower 32 bits of long constant (upper32 are 0).protected final void emit_fconst_0()
emit_fconst_0 in class TemplateCompilerFrameworkprotected final void emit_fconst_1()
emit_fconst_1 in class TemplateCompilerFrameworkprotected final void emit_fconst_2()
emit_fconst_2 in class TemplateCompilerFrameworkprotected final void emit_dconst_0()
emit_dconst_0 in class TemplateCompilerFrameworkprotected final void emit_dconst_1()
emit_dconst_1 in class TemplateCompilerFramework
protected final void emit_ldc(Offset offset,
byte type)
emit_ldc in class TemplateCompilerFrameworkoffset - JTOC offset of the constanttype - the type of the constant
protected final void emit_ldc2(Offset offset,
byte type)
emit_ldc2 in class TemplateCompilerFrameworkoffset - JTOC offset of the constanttype - the type of the constantprotected final void emit_iload(int index)
emit_iload in class TemplateCompilerFrameworkindex - the local index to loadprotected final void emit_fload(int index)
emit_fload in class TemplateCompilerFrameworkindex - the local index to loadprotected final void emit_aload(int index)
emit_aload in class TemplateCompilerFrameworkindex - the local index to loadprotected final void emit_lload(int index)
emit_lload in class TemplateCompilerFrameworkindex - the local index to loadprotected final void emit_dload(int index)
emit_dload in class TemplateCompilerFrameworkindex - the local index to loadprotected final void emit_istore(int index)
emit_istore in class TemplateCompilerFrameworkindex - the local index to loadprotected final void emit_fstore(int index)
emit_fstore in class TemplateCompilerFrameworkindex - the local index to loadprotected final void emit_astore(int index)
emit_astore in class TemplateCompilerFrameworkindex - the local index to loadprotected final void emit_lstore(int index)
emit_lstore in class TemplateCompilerFrameworkindex - the local index to loadprotected final void emit_dstore(int index)
emit_dstore in class TemplateCompilerFrameworkindex - the local index to loadprotected final void emit_iaload()
emit_iaload in class TemplateCompilerFrameworkprotected final void emit_faload()
emit_faload in class TemplateCompilerFrameworkprotected final void emit_aaload()
emit_aaload in class TemplateCompilerFrameworkprotected final void emit_caload()
emit_caload in class TemplateCompilerFrameworkprotected final void emit_saload()
emit_saload in class TemplateCompilerFrameworkprotected final void emit_baload()
emit_baload in class TemplateCompilerFrameworkprotected final void emit_laload()
emit_laload in class TemplateCompilerFrameworkprotected final void emit_daload()
emit_daload in class TemplateCompilerFramework
private void boundsCheckHelper(Offset index,
Offset arrayRef)
index - offset from current SP to the array indexarrayRef - offset from current SP to the array referenceprivate void arrayStore16bitHelper()
private void arrayStore32bitHelper()
private void arrayStore64bitHelper()
protected final void emit_iastore()
emit_iastore in class TemplateCompilerFrameworkprotected final void emit_fastore()
emit_fastore in class TemplateCompilerFrameworkprotected final void emit_aastore()
emit_aastore in class TemplateCompilerFrameworkprotected final void emit_castore()
emit_castore in class TemplateCompilerFrameworkprotected final void emit_sastore()
emit_sastore in class TemplateCompilerFrameworkprotected final void emit_bastore()
emit_bastore in class TemplateCompilerFrameworkprotected final void emit_lastore()
emit_lastore in class TemplateCompilerFrameworkprotected final void emit_dastore()
emit_dastore in class TemplateCompilerFrameworkprotected final void emit_pop()
emit_pop in class TemplateCompilerFrameworkprotected final void emit_pop2()
emit_pop2 in class TemplateCompilerFrameworkprotected final void emit_dup()
emit_dup in class TemplateCompilerFrameworkprotected final void emit_dup_x1()
emit_dup_x1 in class TemplateCompilerFrameworkprotected final void emit_dup_x2()
emit_dup_x2 in class TemplateCompilerFrameworkprotected final void emit_dup2()
emit_dup2 in class TemplateCompilerFrameworkprotected final void emit_dup2_x1()
emit_dup2_x1 in class TemplateCompilerFrameworkprotected final void emit_dup2_x2()
emit_dup2_x2 in class TemplateCompilerFrameworkprotected final void emit_swap()
emit_swap in class TemplateCompilerFrameworkprotected final void emit_iadd()
emit_iadd in class TemplateCompilerFrameworkprotected final void emit_isub()
emit_isub in class TemplateCompilerFrameworkprotected final void emit_imul()
emit_imul in class TemplateCompilerFrameworkprotected final void emit_idiv()
emit_idiv in class TemplateCompilerFrameworkprotected final void emit_irem()
emit_irem in class TemplateCompilerFrameworkprotected final void emit_ineg()
emit_ineg in class TemplateCompilerFrameworkprotected final void emit_ishl()
emit_ishl in class TemplateCompilerFrameworkprotected final void emit_ishr()
emit_ishr in class TemplateCompilerFrameworkprotected final void emit_iushr()
emit_iushr in class TemplateCompilerFrameworkprotected final void emit_iand()
emit_iand in class TemplateCompilerFrameworkprotected final void emit_ior()
emit_ior in class TemplateCompilerFrameworkprotected final void emit_ixor()
emit_ixor in class TemplateCompilerFramework
protected final void emit_iinc(int index,
int val)
emit_iinc in class TemplateCompilerFrameworkindex - index of localval - value to increment it byprotected final void emit_ladd()
emit_ladd in class TemplateCompilerFrameworkprotected final void emit_lsub()
emit_lsub in class TemplateCompilerFrameworkprotected final void emit_lmul()
emit_lmul in class TemplateCompilerFrameworkprotected final void emit_ldiv()
emit_ldiv in class TemplateCompilerFrameworkprotected final void emit_lrem()
emit_lrem in class TemplateCompilerFrameworkprotected final void emit_lneg()
emit_lneg in class TemplateCompilerFrameworkprotected final void emit_lshl()
emit_lshl in class TemplateCompilerFrameworkprotected final void emit_lshr()
emit_lshr in class TemplateCompilerFrameworkprotected final void emit_lushr()
emit_lushr in class TemplateCompilerFrameworkprotected final void emit_land()
emit_land in class TemplateCompilerFrameworkprotected final void emit_lor()
emit_lor in class TemplateCompilerFrameworkprotected final void emit_lxor()
emit_lxor in class TemplateCompilerFrameworkprotected final void emit_fadd()
emit_fadd in class TemplateCompilerFrameworkprotected final void emit_fsub()
emit_fsub in class TemplateCompilerFrameworkprotected final void emit_fmul()
emit_fmul in class TemplateCompilerFrameworkprotected final void emit_fdiv()
emit_fdiv in class TemplateCompilerFrameworkprotected final void emit_frem()
emit_frem in class TemplateCompilerFrameworkprotected final void emit_fneg()
emit_fneg in class TemplateCompilerFrameworkprotected final void emit_dadd()
emit_dadd in class TemplateCompilerFrameworkprotected final void emit_dsub()
emit_dsub in class TemplateCompilerFrameworkprotected final void emit_dmul()
emit_dmul in class TemplateCompilerFrameworkprotected final void emit_ddiv()
emit_ddiv in class TemplateCompilerFrameworkprotected final void emit_drem()
emit_drem in class TemplateCompilerFrameworkprotected final void emit_dneg()
emit_dneg in class TemplateCompilerFrameworkprotected final void emit_i2l()
emit_i2l in class TemplateCompilerFrameworkprotected final void emit_l2i()
emit_l2i in class TemplateCompilerFrameworkprotected final void emit_i2f()
emit_i2f in class TemplateCompilerFrameworkprotected final void emit_i2d()
emit_i2d in class TemplateCompilerFrameworkprotected final void emit_l2f()
emit_l2f in class TemplateCompilerFrameworkprotected final void emit_l2d()
emit_l2d in class TemplateCompilerFrameworkprotected final void emit_f2d()
emit_f2d in class TemplateCompilerFrameworkprotected final void emit_d2f()
emit_d2f in class TemplateCompilerFrameworkprotected final void emit_f2i()
emit_f2i in class TemplateCompilerFrameworkprotected final void emit_f2l()
emit_f2l in class TemplateCompilerFrameworkprotected final void emit_d2i()
emit_d2i in class TemplateCompilerFrameworkprotected final void emit_d2l()
emit_d2l in class TemplateCompilerFrameworkprotected final void emit_i2b()
emit_i2b in class TemplateCompilerFrameworkprotected final void emit_i2c()
emit_i2c in class TemplateCompilerFrameworkprotected final void emit_i2s()
emit_i2s in class TemplateCompilerFrameworkprotected final void emit_lcmp()
emit_lcmp in class TemplateCompilerFrameworkprotected final void emit_fcmpl()
emit_fcmpl in class TemplateCompilerFrameworkprotected final void emit_fcmpg()
emit_fcmpg in class TemplateCompilerFrameworkprotected final void emit_dcmpl()
emit_dcmpl in class TemplateCompilerFrameworkprotected final void emit_dcmpg()
emit_dcmpg in class TemplateCompilerFrameworkprotected final void emit_ifeq(int bTarget)
emit_ifeq in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_ifne(int bTarget)
emit_ifne in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_iflt(int bTarget)
emit_iflt in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_ifge(int bTarget)
emit_ifge in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_ifgt(int bTarget)
emit_ifgt in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_ifle(int bTarget)
emit_ifle in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_if_icmpeq(int bTarget)
emit_if_icmpeq in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_if_icmpne(int bTarget)
emit_if_icmpne in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_if_icmplt(int bTarget)
emit_if_icmplt in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_if_icmpge(int bTarget)
emit_if_icmpge in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_if_icmpgt(int bTarget)
emit_if_icmpgt in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_if_icmple(int bTarget)
emit_if_icmple in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_if_acmpeq(int bTarget)
emit_if_acmpeq in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_if_acmpne(int bTarget)
emit_if_acmpne in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_ifnull(int bTarget)
emit_ifnull in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_ifnonnull(int bTarget)
emit_ifnonnull in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_goto(int bTarget)
emit_goto in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected final void emit_jsr(int bTarget)
emit_jsr in class TemplateCompilerFrameworkbTarget - target bytecode of the jsrprotected final void emit_ret(int index)
emit_ret in class TemplateCompilerFrameworkindex - local variable containing the return address
protected final void emit_tableswitch(int defaultval,
int low,
int high)
emit_tableswitch in class TemplateCompilerFrameworkdefaultval - bcIndex of the default targetlow - low value of switchhigh - high value of switch
protected final void emit_lookupswitch(int defaultval,
int npairs)
emit_lookupswitch in class TemplateCompilerFrameworkdefaultval - bcIndex of the default targetnpairs - number of pairs in the lookup switchprotected final void emit_ireturn()
emit_ireturn in class TemplateCompilerFrameworkprotected final void emit_lreturn()
emit_lreturn in class TemplateCompilerFrameworkprotected final void emit_freturn()
emit_freturn in class TemplateCompilerFrameworkprotected final void emit_dreturn()
emit_dreturn in class TemplateCompilerFrameworkprotected final void emit_areturn()
emit_areturn in class TemplateCompilerFrameworkprotected final void emit_return()
emit_return in class TemplateCompilerFrameworkprotected final void emit_unresolved_getstatic(FieldReference fieldRef)
emit_unresolved_getstatic in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected final void emit_resolved_getstatic(FieldReference fieldRef)
emit_resolved_getstatic in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected final void emit_unresolved_putstatic(FieldReference fieldRef)
emit_unresolved_putstatic in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected final void emit_resolved_putstatic(FieldReference fieldRef)
emit_resolved_putstatic in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected final void emit_unresolved_getfield(FieldReference fieldRef)
emit_unresolved_getfield in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected final void emit_resolved_getfield(FieldReference fieldRef)
emit_resolved_getfield in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected final void emit_unresolved_putfield(FieldReference fieldRef)
emit_unresolved_putfield in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected final void emit_resolved_putfield(FieldReference fieldRef)
emit_resolved_putfield in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected final void emit_unresolved_invokevirtual(MethodReference methodRef)
emit_unresolved_invokevirtual in class TemplateCompilerFrameworkmethodRef - the referenced methodprotected final void emit_resolved_invokevirtual(MethodReference methodRef)
emit_resolved_invokevirtual in class TemplateCompilerFrameworkmethodRef - the referenced method
protected final void emit_resolved_invokespecial(MethodReference methodRef,
RVMMethod target)
emit_resolved_invokespecial in class TemplateCompilerFrameworkmethodRef - The referenced methodtarget - The method to invokeprotected final void emit_unresolved_invokespecial(MethodReference methodRef)
emit_unresolved_invokespecial in class TemplateCompilerFrameworkmethodRef - the referenced methodprotected final void emit_unresolved_invokestatic(MethodReference methodRef)
emit_unresolved_invokestatic in class TemplateCompilerFrameworkmethodRef - the referenced methodprotected final void emit_resolved_invokestatic(MethodReference methodRef)
emit_resolved_invokestatic in class TemplateCompilerFrameworkmethodRef - the referenced methodprotected final void emit_invokeinterface(MethodReference methodRef)
emit_invokeinterface in class TemplateCompilerFrameworkmethodRef - the referenced methodprotected final void emit_resolved_new(RVMClass typeRef)
emit_resolved_new in class TemplateCompilerFrameworktypeRef - the RVMClass to instantiateprotected final void emit_unresolved_new(TypeReference typeRef)
emit_unresolved_new in class TemplateCompilerFrameworktypeRef - typeReference to dynamically link & instantiateprotected final void emit_resolved_newarray(RVMArray array)
emit_resolved_newarray in class TemplateCompilerFrameworkarray - the RVMArray to instantiateprotected final void emit_unresolved_newarray(TypeReference tRef)
emit_unresolved_newarray in class TemplateCompilerFrameworktRef - the type reference to dynamically link & instantiate
protected final void emit_multianewarray(TypeReference typeRef,
int dimensions)
emit_multianewarray in class TemplateCompilerFrameworktypeRef - the type reference to instantiatedimensions - the number of dimensionsprotected final void emit_arraylength()
emit_arraylength in class TemplateCompilerFrameworkprotected final void emit_athrow()
emit_athrow in class TemplateCompilerFrameworkprotected final void emit_checkcast(TypeReference typeRef)
emit_checkcast in class TemplateCompilerFrameworktypeRef - the LHS typeprotected final void emit_checkcast_resolvedInterface(RVMClass type)
emit_checkcast_resolvedInterface in class TemplateCompilerFrameworktype - the LHS typeprotected final void emit_checkcast_resolvedClass(RVMClass type)
emit_checkcast_resolvedClass in class TemplateCompilerFrameworktype - the LHS typeprotected final void emit_checkcast_final(RVMType type)
emit_checkcast_final in class TemplateCompilerFrameworktype - the LHS typeprotected final void emit_instanceof(TypeReference typeRef)
emit_instanceof in class TemplateCompilerFrameworktypeRef - the LHS typeprotected final void emit_instanceof_resolvedInterface(RVMClass type)
emit_instanceof_resolvedInterface in class TemplateCompilerFrameworktype - the LHS typeprotected final void emit_instanceof_resolvedClass(RVMClass type)
emit_instanceof_resolvedClass in class TemplateCompilerFrameworktype - the LHS typeprotected final void emit_instanceof_final(RVMType type)
emit_instanceof_final in class TemplateCompilerFrameworktype - the LHS typeprotected final void emit_monitorenter()
emit_monitorenter in class TemplateCompilerFrameworkprotected final void emit_monitorexit()
emit_monitorexit in class TemplateCompilerFrameworkprivate void genPrologue()
protected final void emit_deferred_prologue()
emit_deferred_prologue in class TemplateCompilerFramework
private void genEpilogue(int returnSize,
int bytesPopped)
returnSize - the size in bytes of the returned valuebytesPopped - number of paramter bytes already releasedprivate void genMonitorEnter()
private void genMonitorExit()
private static void genNullCheck(Assembler asm,
RegisterConstants.GPR objRefReg)
asm - the assembler to generate intoobjRefReg - the register containing the reference
static void genBoundsCheck(Assembler asm,
RegisterConstants.GPR indexReg,
RegisterConstants.GPR arrayRefReg)
asm - the assembler to generate intoindexReg - the register containing the indexarrayRefReg - the register containing the array reference
private void genCondBranch(byte cond,
int bTarget)
private void incEdgeCounter(RegisterConstants.GPR scratch,
RegisterConstants.GPR idx,
int counterIdx)
scratch - register to use as scratchidx - optional register holding index value or nullcounterIdx - index in to counters array
static void genParameterRegisterLoad(Assembler asm,
int params)
asm - assembler to use for generationparams - number of parameter words (including "this" if any).
protected void genParameterRegisterLoad(MethodReference method,
boolean hasThisParam)
method - is the method to be called.hasThisParam - is the method virtual?private void genParameterCopy(Offset srcOffset)
private void genResultRegisterUnload(MethodReference m)
private void genThreadSwitchTest(int whereFrom)
whereFrom - is this thread switch from a PROLOGUE, BACKEDGE, or EPILOGUE?public static boolean checkForActualCall(MethodReference methodToBeCalled)
methodToBeCalled - RVMMethod of the magic method being called
private boolean genMagic(MethodReference m)
m - method to generate
private Offset localOffset(int local)
private Offset fp2spOffset(Offset offset)
static void emitDynamicLinkingSequence(Assembler asm,
RegisterConstants.GPR reg,
MemberReference ref,
boolean couldBeZero)
asm - assembler to generate code intoreg - register to hold offset to methodref - method reference to be resolvedcouldBeZero - could the value in the offsets table require resolvingprotected final void emit_invoke_compiledmethod(CompiledMethod cm)
emit_invoke_compiledmethod in class TemplateCompilerFrameworkprotected final void emit_loadretaddrconst(int bcIndex)
emit_loadretaddrconst in class TemplateCompilerFrameworkprotected final ForwardReference emit_pending_goto(int bTarget)
emit_pending_goto in class TemplateCompilerFrameworkbTarget - 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.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||