public class AMD64HotSpotLIRGenerator extends AMD64LIRGenerator implements HotSpotLIRGenerator
| Modifier and Type | Class and Description |
|---|---|
private static class |
AMD64HotSpotLIRGenerator.RescueSlotDummyOp
Helper instruction to reserve a stack slot for the whole method.
|
(package private) class |
AMD64HotSpotLIRGenerator.SaveRbp
Utility for emitting the instruction to save RBP.
|
LIRGenerator.OptionsLIRGeneratorTool.BlockScope, LIRGeneratorTool.SpillMoveFactory| Modifier and Type | Field and Description |
|---|---|
(package private) HotSpotVMConfig |
config |
private LIRFrameState |
currentRuntimeCallInfo |
private HotSpotLockStack |
lockStack |
private Register |
pollOnReturnScratchRegister |
private AMD64HotSpotLIRGenerator.RescueSlotDummyOp |
rescueSlotOp |
private AMD64HotSpotLIRGenerator.SaveRbp |
saveRbp |
| Modifier | Constructor and Description |
|---|---|
protected |
AMD64HotSpotLIRGenerator(HotSpotProviders providers,
HotSpotVMConfig config,
CallingConvention cc,
LIRGenerationResult lirGenRes) |
protected |
AMD64HotSpotLIRGenerator(LIRKindTool lirKindTool,
HotSpotProviders providers,
HotSpotVMConfig config,
CallingConvention cc,
LIRGenerationResult lirGenRes) |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeRegisterAllocation()
Called just before register allocation is performed on the LIR owned by this generator.
|
boolean |
canInlineConstant(JavaConstant c)
Checks whether the supplied constant can be used without loading it into a register for most
operations, i.e., for commonly used arithmetic, logical, and comparison operations.
|
LIRInstruction |
createBenchmarkCounter(String name,
String group,
Value increment) |
protected AMD64LIRInstruction |
createMove(AllocatableValue dst,
Value src) |
LIRInstruction |
createMultiBenchmarkCounter(String[] names,
String[] groups,
Value[] increments) |
Value |
emitCardTableAddress() |
Value |
emitCardTableShift() |
void |
emitCCall(long address,
CallingConvention nativeCallingConvention,
Value[] args,
int numberOfFloatingPointArguments) |
protected boolean |
emitCompareMemoryConOp(AMD64Assembler.OperandSize size,
JavaConstant a,
AMD64AddressValue b,
LIRFrameState state) |
protected void |
emitCompareOp(PlatformKind cmpKind,
Variable left,
Value right) |
Value |
emitCompress(Value pointer,
HotSpotVMConfig.CompressEncoding encoding,
boolean nonNull) |
void |
emitData(AllocatableValue dst,
byte[] data)
Emits an op that loads the address of some raw data.
|
Value |
emitDeoptimizationFetchUnrollInfoCall(StandardOp.SaveRegistersOp saveRegisterOp)
Emits code for a
DeoptimizationFetchUnrollInfoCallNode. |
void |
emitDeoptimize(Value actionAndReason,
Value speculation,
LIRFrameState state) |
void |
emitDeoptimizeCaller(DeoptimizationAction action,
DeoptimizationReason reason) |
void |
emitEnterUnpackFramesStackFrame(Value framePc,
Value senderSp,
Value senderFp,
StandardOp.SaveRegistersOp saveRegisterOp)
Emits code for a
EnterUnpackFramesStackFrameNode. |
Variable |
emitForeignCall(ForeignCallLinkage linkage,
LIRFrameState state,
Value... args) |
protected void |
emitForeignCallOp(ForeignCallLinkage linkage,
Value result,
Value[] arguments,
Value[] temps,
LIRFrameState info)
Emits the single call operation at the heart of generating LIR for a
foreign call.
|
void |
emitLeaveCurrentStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
Emits code for a
LeaveCurrentStackFrameNode. |
void |
emitLeaveDeoptimizedStackFrame(Value frameSize,
Value initialInfo)
Emits code for a
LeaveDeoptimizedStackFrameNode. |
void |
emitLeaveUnpackFramesStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
Emits code for a
LeaveUnpackFramesStackFrameNode. |
void |
emitNullCheck(Value address,
LIRFrameState state) |
void |
emitPrefetchAllocate(Value address) |
void |
emitPushInterpreterFrame(Value frameSize,
Value framePc,
Value senderSp,
Value initialInfo)
Emits code for a
PushInterpreterFrameNode. |
protected void |
emitRestoreRegisters(AMD64SaveRegistersOp save) |
void |
emitReturn(Value input)
Emits a return instruction.
|
StandardOp.SaveRegistersOp |
emitSaveAllRegisters()
Emits code for a
SaveAllRegistersNode. |
private AMD64SaveRegistersOp |
emitSaveAllRegisters(Register[] savedRegisters,
boolean supportsRemove)
Adds a node to the graph that saves all allocatable registers to the stack.
|
protected void |
emitSaveRbp() |
protected AMD64SaveRegistersOp |
emitSaveRegisters(Register[] savedRegisters,
StackSlotValue[] savedRegisterLocations,
boolean supportsRemove) |
protected void |
emitStoreConst(Kind kind,
AMD64AddressValue address,
JavaConstant value,
LIRFrameState state) |
void |
emitTailcall(Value[] args,
Value address)
Emits an operation to make a tail call.
|
Value |
emitUncommonTrapCall(Value trapRequest,
StandardOp.SaveRegistersOp saveRegisterOp)
Emits code for a
UncommonTrapCallNode. |
Value |
emitUncompress(Value pointer,
HotSpotVMConfig.CompressEncoding encoding,
boolean nonNull) |
void |
emitUnwind(Value exception) |
protected AMD64ZapRegistersOp |
emitZapRegisters(Register[] zappedRegisters,
JavaConstant[] zapValues) |
private Register |
findPollOnReturnScratchRegister() |
StackSlotValue |
getLockSlot(int lockDepth)
Gets a stack slot for a lock at a given lock nesting depth.
|
private HotSpotLockStack |
getLockStack() |
private StackSlotValue |
getOrInitRescueSlot() |
private AMD64HotSpotLIRGenerator.RescueSlotDummyOp |
getOrInitRescueSlotOp() |
HotSpotProviders |
getProviders() |
protected AMD64HotSpotLIRGenerator.SaveRbp |
getSaveRbp() |
Stub |
getStub()
Gets the
Stub this generator is generating code for or null if a stub is not
being generated. |
private void |
moveDeoptValuesToThread(Value actionAndReason,
Value speculation) |
private void |
moveValueToThread(Value v,
int offset) |
boolean |
needOnlyOopMaps()
Determines if only oop maps are required for the code generated from the LIR.
|
protected void |
setLockStack(HotSpotLockStack lockStack) |
protected boolean |
zapRegisters() |
asAddressValue, canStoreConstant, createStackMove, createStackMove, emitAdd, emitAddress, emitAnd, emitArrayEquals, emitAtomicReadAndAdd, emitAtomicReadAndWrite, emitBinaryMemory, emitBitCount, emitBitScanForward, emitBitScanReverse, emitByteSwap, emitCompareAndSwap, emitCompareBranch, emitCompareBranchMemory, emitConditionalMove, emitConvertMemoryOp, emitCountLeadingZeros, emitCountTrailingZeros, emitDiv, emitFloatConvert, emitIntegerDivRem, emitIntegerTestBranch, emitIntegerTestMove, emitJump, emitLoad, emitMathAbs, emitMathCos, emitMathLog, emitMathSin, emitMathSqrt, emitMathTan, emitMembar, emitMove, emitMul, emitMulHigh, emitNarrow, emitNegate, emitNot, emitOr, emitOverflowCheckBranch, emitReinterpret, emitRem, emitRol, emitRor, emitShl, emitShr, emitSignExtend, emitStore, emitStore, emitStrategySwitch, emitSub, emitTableSwitch, emitUDiv, emitUMulHigh, emitURem, emitUShr, emitXor, emitZeroExtend, emitZeroExtendMemory, getScratchRegister, getSpillMoveFactoryappend, asAllocatable, attributes, emitAdd, emitBlackhole, emitIncomingValues, emitLoadConstant, emitMove, emitStrategySwitch, emitSub, getAddressKind, getBlockScope, getCallingConvention, getCodeCache, getCurrentBlock, getForeignCalls, getLIRKind, getLIRKindTool, getMetaAccess, getResult, hasBlockEnd, load, loadNonConst, newVariable, resultOperandFor, target, toStackKind, zapValueForKindclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappend, asAllocatable, attributes, emitAddress, emitArrayEquals, emitAtomicReadAndAdd, emitAtomicReadAndWrite, emitBitCount, emitBitScanForward, emitBitScanReverse, emitBlackhole, emitByteSwap, emitCompareAndSwap, emitCompareBranch, emitConditionalMove, emitCountLeadingZeros, emitCountTrailingZeros, emitIncomingValues, emitIntegerTestBranch, emitIntegerTestMove, emitJump, emitLoad, emitLoadConstant, emitMembar, emitMove, emitMove, emitOverflowCheckBranch, emitStore, emitStrategySwitch, emitStrategySwitch, getBlockScope, getCallingConvention, getCodeCache, getCurrentBlock, getForeignCalls, getMetaAccess, getResult, getSpillMoveFactory, hasBlockEnd, load, loadNonConst, newVariable, resultOperandFor, targetemitAdd, emitAnd, emitDiv, emitFloatConvert, emitMathAbs, emitMathSqrt, emitMul, emitMulHigh, emitNarrow, emitNegate, emitNot, emitOr, emitReinterpret, emitRem, emitShl, emitShr, emitSignExtend, emitSub, emitUDiv, emitUMulHigh, emitURem, emitUShr, emitXor, emitZeroExtend, getLIRKindfinal HotSpotVMConfig config
private HotSpotLockStack lockStack
private AMD64HotSpotLIRGenerator.SaveRbp saveRbp
private AMD64HotSpotLIRGenerator.RescueSlotDummyOp rescueSlotOp
private Register pollOnReturnScratchRegister
private LIRFrameState currentRuntimeCallInfo
protected AMD64HotSpotLIRGenerator(HotSpotProviders providers, HotSpotVMConfig config, CallingConvention cc, LIRGenerationResult lirGenRes)
protected AMD64HotSpotLIRGenerator(LIRKindTool lirKindTool, HotSpotProviders providers, HotSpotVMConfig config, CallingConvention cc, LIRGenerationResult lirGenRes)
public HotSpotProviders getProviders()
getProviders in interface HotSpotLIRGeneratorgetProviders in interface LIRGeneratorToolgetProviders in class LIRGeneratorprotected void emitSaveRbp()
protected AMD64HotSpotLIRGenerator.SaveRbp getSaveRbp()
private StackSlotValue getOrInitRescueSlot()
private AMD64HotSpotLIRGenerator.RescueSlotDummyOp getOrInitRescueSlotOp()
public StackSlotValue getLockSlot(int lockDepth)
HotSpotLIRGeneratorgetLockSlot in interface HotSpotLIRGeneratorprivate HotSpotLockStack getLockStack()
protected void setLockStack(HotSpotLockStack lockStack)
private Register findPollOnReturnScratchRegister()
public void emitReturn(Value input)
LIRGeneratorToolemitReturn in interface LIRGeneratorToolemitReturn in class AMD64LIRGeneratorpublic boolean needOnlyOopMaps()
LIRGeneratorneedOnlyOopMaps in interface LIRGeneratorToolneedOnlyOopMaps in class LIRGeneratorpublic void emitData(AllocatableValue dst, byte[] data)
LIRGeneratorToolemitData in interface LIRGeneratorToolemitData in class AMD64LIRGeneratordst - the variable into which the address is loadeddata - the data to be installed with the generated codeprotected void emitForeignCallOp(ForeignCallLinkage linkage, Value result, Value[] arguments, Value[] temps, LIRFrameState info)
LIRGeneratoremitForeignCallOp in class AMD64LIRGeneratorpublic void emitLeaveCurrentStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGeneratorLeaveCurrentStackFrameNode.emitLeaveCurrentStackFrame in interface HotSpotLIRGeneratorsaveRegisterOp - saved registerspublic void emitLeaveDeoptimizedStackFrame(Value frameSize, Value initialInfo)
HotSpotLIRGeneratorLeaveDeoptimizedStackFrameNode.emitLeaveDeoptimizedStackFrame in interface HotSpotLIRGeneratorpublic void emitEnterUnpackFramesStackFrame(Value framePc, Value senderSp, Value senderFp, StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGeneratorEnterUnpackFramesStackFrameNode.emitEnterUnpackFramesStackFrame in interface HotSpotLIRGeneratorpublic void emitLeaveUnpackFramesStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGeneratorLeaveUnpackFramesStackFrameNode.emitLeaveUnpackFramesStackFrame in interface HotSpotLIRGeneratorpublic Value emitCardTableShift()
emitCardTableShift in interface HotSpotLIRGeneratorpublic Value emitCardTableAddress()
emitCardTableAddress in interface HotSpotLIRGeneratorprotected AMD64SaveRegistersOp emitSaveRegisters(Register[] savedRegisters, StackSlotValue[] savedRegisterLocations, boolean supportsRemove)
savedRegisters - the registers saved by this operation which may be subject to pruningsavedRegisterLocations - the slots to which the registers are savedsupportsRemove - determines if registers can be prunedprivate AMD64SaveRegistersOp emitSaveAllRegisters(Register[] savedRegisters, boolean supportsRemove)
supportsRemove - determines if registers can be prunedpublic StandardOp.SaveRegistersOp emitSaveAllRegisters()
HotSpotLIRGeneratorSaveAllRegistersNode.emitSaveAllRegisters in interface HotSpotLIRGeneratorStandardOp.SaveRegistersOp operationprotected void emitRestoreRegisters(AMD64SaveRegistersOp save)
public Stub getStub()
Stub this generator is generating code for or null if a stub is not
being generated.public Variable emitForeignCall(ForeignCallLinkage linkage, LIRFrameState state, Value... args)
emitForeignCall in interface LIRGeneratorToolemitForeignCall in class LIRGeneratorpublic Value emitUncommonTrapCall(Value trapRequest, StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGeneratorUncommonTrapCallNode.emitUncommonTrapCall in interface HotSpotLIRGeneratorDeoptimization::UnrollBlock pointerpublic Value emitDeoptimizationFetchUnrollInfoCall(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGeneratorDeoptimizationFetchUnrollInfoCallNode.emitDeoptimizationFetchUnrollInfoCall in interface HotSpotLIRGeneratorDeoptimization::UnrollBlock pointerprotected AMD64ZapRegistersOp emitZapRegisters(Register[] zappedRegisters, JavaConstant[] zapValues)
protected boolean zapRegisters()
public void emitTailcall(Value[] args, Value address)
HotSpotLIRGeneratoremitTailcall in interface HotSpotLIRGeneratorargs - the arguments of the calladdress - the target address of the callpublic void emitCCall(long address, CallingConvention nativeCallingConvention, Value[] args, int numberOfFloatingPointArguments)
emitCCall in class AMD64LIRGeneratorpublic void emitUnwind(Value exception)
emitUnwind in interface LIRGeneratorToolprivate void moveDeoptValuesToThread(Value actionAndReason, Value speculation)
private void moveValueToThread(Value v, int offset)
public void emitDeoptimize(Value actionAndReason, Value speculation, LIRFrameState state)
emitDeoptimize in interface LIRGeneratorToolpublic void emitDeoptimizeCaller(DeoptimizationAction action, DeoptimizationReason reason)
emitDeoptimizeCaller in interface HotSpotLIRGeneratorpublic void beforeRegisterAllocation()
LIRGeneratorToolbeforeRegisterAllocation in interface LIRGeneratorToolbeforeRegisterAllocation in class LIRGeneratorpublic void emitPushInterpreterFrame(Value frameSize, Value framePc, Value senderSp, Value initialInfo)
HotSpotLIRGeneratorPushInterpreterFrameNode.emitPushInterpreterFrame in interface HotSpotLIRGeneratorprotected void emitStoreConst(Kind kind, AMD64AddressValue address, JavaConstant value, LIRFrameState state)
emitStoreConst in class AMD64LIRGeneratorpublic Value emitCompress(Value pointer, HotSpotVMConfig.CompressEncoding encoding, boolean nonNull)
emitCompress in interface HotSpotLIRGeneratorpublic Value emitUncompress(Value pointer, HotSpotVMConfig.CompressEncoding encoding, boolean nonNull)
emitUncompress in interface HotSpotLIRGeneratorprotected AMD64LIRInstruction createMove(AllocatableValue dst, Value src)
createMove in class AMD64LIRGeneratorpublic void emitNullCheck(Value address, LIRFrameState state)
emitNullCheck in interface LIRGeneratorToolemitNullCheck in class AMD64LIRGeneratorprotected void emitCompareOp(PlatformKind cmpKind, Variable left, Value right)
emitCompareOp in class AMD64LIRGeneratorprotected boolean emitCompareMemoryConOp(AMD64Assembler.OperandSize size, JavaConstant a, AMD64AddressValue b, LIRFrameState state)
emitCompareMemoryConOp in class AMD64LIRGeneratorpublic boolean canInlineConstant(JavaConstant c)
LIRGeneratorcanInlineConstant in class AMD64LIRGeneratorc - The constant to check.public LIRInstruction createBenchmarkCounter(String name, String group, Value increment)
createBenchmarkCounter in interface BenchmarkCounterFactorycreateBenchmarkCounter in class LIRGeneratorpublic LIRInstruction createMultiBenchmarkCounter(String[] names, String[] groups, Value[] increments)
createMultiBenchmarkCounter in interface BenchmarkCounterFactorycreateMultiBenchmarkCounter in class LIRGeneratorpublic void emitPrefetchAllocate(Value address)
emitPrefetchAllocate in interface HotSpotLIRGenerator