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.Options
LIRGeneratorTool.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, getSpillMoveFactory
append, 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, zapValueForKind
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, 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, target
emitAdd, emitAnd, emitDiv, emitFloatConvert, emitMathAbs, emitMathSqrt, emitMul, emitMulHigh, emitNarrow, emitNegate, emitNot, emitOr, emitReinterpret, emitRem, emitShl, emitShr, emitSignExtend, emitSub, emitUDiv, emitUMulHigh, emitURem, emitUShr, emitXor, emitZeroExtend, getLIRKind
final 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 HotSpotLIRGenerator
getProviders
in interface LIRGeneratorTool
getProviders
in class LIRGenerator
protected void emitSaveRbp()
protected AMD64HotSpotLIRGenerator.SaveRbp getSaveRbp()
private StackSlotValue getOrInitRescueSlot()
private AMD64HotSpotLIRGenerator.RescueSlotDummyOp getOrInitRescueSlotOp()
public StackSlotValue getLockSlot(int lockDepth)
HotSpotLIRGenerator
getLockSlot
in interface HotSpotLIRGenerator
private HotSpotLockStack getLockStack()
protected void setLockStack(HotSpotLockStack lockStack)
private Register findPollOnReturnScratchRegister()
public void emitReturn(Value input)
LIRGeneratorTool
emitReturn
in interface LIRGeneratorTool
emitReturn
in class AMD64LIRGenerator
public boolean needOnlyOopMaps()
LIRGenerator
needOnlyOopMaps
in interface LIRGeneratorTool
needOnlyOopMaps
in class LIRGenerator
public void emitData(AllocatableValue dst, byte[] data)
LIRGeneratorTool
emitData
in interface LIRGeneratorTool
emitData
in class AMD64LIRGenerator
dst
- 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)
LIRGenerator
emitForeignCallOp
in class AMD64LIRGenerator
public void emitLeaveCurrentStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGenerator
LeaveCurrentStackFrameNode
.emitLeaveCurrentStackFrame
in interface HotSpotLIRGenerator
saveRegisterOp
- saved registerspublic void emitLeaveDeoptimizedStackFrame(Value frameSize, Value initialInfo)
HotSpotLIRGenerator
LeaveDeoptimizedStackFrameNode
.emitLeaveDeoptimizedStackFrame
in interface HotSpotLIRGenerator
public void emitEnterUnpackFramesStackFrame(Value framePc, Value senderSp, Value senderFp, StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGenerator
EnterUnpackFramesStackFrameNode
.emitEnterUnpackFramesStackFrame
in interface HotSpotLIRGenerator
public void emitLeaveUnpackFramesStackFrame(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGenerator
LeaveUnpackFramesStackFrameNode
.emitLeaveUnpackFramesStackFrame
in interface HotSpotLIRGenerator
public Value emitCardTableShift()
emitCardTableShift
in interface HotSpotLIRGenerator
public Value emitCardTableAddress()
emitCardTableAddress
in interface HotSpotLIRGenerator
protected 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()
HotSpotLIRGenerator
SaveAllRegistersNode
.emitSaveAllRegisters
in interface HotSpotLIRGenerator
StandardOp.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 LIRGeneratorTool
emitForeignCall
in class LIRGenerator
public Value emitUncommonTrapCall(Value trapRequest, StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGenerator
UncommonTrapCallNode
.emitUncommonTrapCall
in interface HotSpotLIRGenerator
Deoptimization::UnrollBlock
pointerpublic Value emitDeoptimizationFetchUnrollInfoCall(StandardOp.SaveRegistersOp saveRegisterOp)
HotSpotLIRGenerator
DeoptimizationFetchUnrollInfoCallNode
.emitDeoptimizationFetchUnrollInfoCall
in interface HotSpotLIRGenerator
Deoptimization::UnrollBlock
pointerprotected AMD64ZapRegistersOp emitZapRegisters(Register[] zappedRegisters, JavaConstant[] zapValues)
protected boolean zapRegisters()
public void emitTailcall(Value[] args, Value address)
HotSpotLIRGenerator
emitTailcall
in interface HotSpotLIRGenerator
args
- the arguments of the calladdress
- the target address of the callpublic void emitCCall(long address, CallingConvention nativeCallingConvention, Value[] args, int numberOfFloatingPointArguments)
emitCCall
in class AMD64LIRGenerator
public void emitUnwind(Value exception)
emitUnwind
in interface LIRGeneratorTool
private 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 LIRGeneratorTool
public void emitDeoptimizeCaller(DeoptimizationAction action, DeoptimizationReason reason)
emitDeoptimizeCaller
in interface HotSpotLIRGenerator
public void beforeRegisterAllocation()
LIRGeneratorTool
beforeRegisterAllocation
in interface LIRGeneratorTool
beforeRegisterAllocation
in class LIRGenerator
public void emitPushInterpreterFrame(Value frameSize, Value framePc, Value senderSp, Value initialInfo)
HotSpotLIRGenerator
PushInterpreterFrameNode
.emitPushInterpreterFrame
in interface HotSpotLIRGenerator
protected void emitStoreConst(Kind kind, AMD64AddressValue address, JavaConstant value, LIRFrameState state)
emitStoreConst
in class AMD64LIRGenerator
public Value emitCompress(Value pointer, HotSpotVMConfig.CompressEncoding encoding, boolean nonNull)
emitCompress
in interface HotSpotLIRGenerator
public Value emitUncompress(Value pointer, HotSpotVMConfig.CompressEncoding encoding, boolean nonNull)
emitUncompress
in interface HotSpotLIRGenerator
protected AMD64LIRInstruction createMove(AllocatableValue dst, Value src)
createMove
in class AMD64LIRGenerator
public void emitNullCheck(Value address, LIRFrameState state)
emitNullCheck
in interface LIRGeneratorTool
emitNullCheck
in class AMD64LIRGenerator
protected void emitCompareOp(PlatformKind cmpKind, Variable left, Value right)
emitCompareOp
in class AMD64LIRGenerator
protected boolean emitCompareMemoryConOp(AMD64Assembler.OperandSize size, JavaConstant a, AMD64AddressValue b, LIRFrameState state)
emitCompareMemoryConOp
in class AMD64LIRGenerator
public boolean canInlineConstant(JavaConstant c)
LIRGenerator
canInlineConstant
in class AMD64LIRGenerator
c
- The constant to check.public LIRInstruction createBenchmarkCounter(String name, String group, Value increment)
createBenchmarkCounter
in interface BenchmarkCounterFactory
createBenchmarkCounter
in class LIRGenerator
public LIRInstruction createMultiBenchmarkCounter(String[] names, String[] groups, Value[] increments)
createMultiBenchmarkCounter
in interface BenchmarkCounterFactory
createMultiBenchmarkCounter
in class LIRGenerator
public void emitPrefetchAllocate(Value address)
emitPrefetchAllocate
in interface HotSpotLIRGenerator