public abstract class AMD64LIRGenerator extends LIRGenerator
LIRGenerator.Options, LIRGenerator.VariableProviderLIRGeneratorTool.BlockScope, LIRGeneratorTool.CharsetNameDiagnosticLIRGeneratorTool.ZapRegistersAfterInstruction, DiagnosticLIRGeneratorTool.ZapStackArgumentSpaceBeforeInstructionarithmeticLIRGen| Constructor and Description |
|---|
AMD64LIRGenerator(LIRKindTool lirKindTool,
AMD64ArithmeticLIRGenerator arithmeticLIRGen,
MoveFactory moveFactory,
Providers providers,
LIRGenerationResult lirGenRes) |
| Modifier and Type | Method and Description |
|---|---|
AMD64AddressValue |
asAddressValue(Value address) |
protected AMD64ControlFlow.StrategySwitchOp |
createStrategySwitchOp(SwitchStrategy strategy,
LabelRef[] keyTargets,
LabelRef defaultTarget,
AllocatableValue key,
AllocatableValue temp) |
LIRInstruction |
createZapArgumentSpace(StackSlot[] zappedStack,
JavaConstant[] zapValues) |
LIRInstruction |
createZapRegisters(Register[] zappedRegisters,
JavaConstant[] zapValues)
Creates an instruction that fills a given set of registers with a known garbage value.
|
Variable |
emitAddress(AllocatableValue stackslot) |
Variable |
emitArrayCompareTo(JavaKind kind1,
JavaKind kind2,
int array1BaseOffset,
int array2BaseOffset,
Value array1,
Value array2,
Value length1,
Value length2) |
void |
emitArrayCopyWithConversion(JavaKind strideSrc,
JavaKind strideDst,
Value arraySrc,
Value offsetSrc,
Value arrayDst,
Value offsetDst,
Value length) |
void |
emitArrayCopyWithConversion(Value arraySrc,
Value offsetSrc,
Value arrayDst,
Value offsetDst,
Value length,
Value stride) |
Variable |
emitArrayEquals(int baseOffsetA,
int baseOffsetB,
int baseOffsetMask,
Value arrayA,
Value offsetA,
Value arrayB,
Value offsetB,
Value mask,
Value length,
Value stride) |
Variable |
emitArrayEquals(int baseOffsetA,
int baseOffsetB,
Value arrayA,
Value offsetA,
Value arrayB,
Value offsetB,
Value length,
Value stride) |
Variable |
emitArrayEquals(JavaKind kind,
int array1BaseOffset,
int array2BaseOffset,
Value array1,
Value array2,
Value length) |
Variable |
emitArrayEquals(JavaKind kind,
int array1BaseOffset,
int array2BaseOffset,
Value array1,
Value offset1,
Value array2,
Value offset2,
Value length) |
Variable |
emitArrayEquals(JavaKind kind1,
JavaKind kind2,
int array1BaseOffset,
int array2BaseOffset,
Value array1,
Value offset1,
Value array2,
Value offset2,
Value length) |
Variable |
emitArrayEquals(JavaKind kind1,
JavaKind kind2,
JavaKind kindMask,
int array1BaseOffset,
int array2BaseOffset,
int maskBaseOffset,
Value array1,
Value offset1,
Value array2,
Value offset2,
Value mask,
Value length) |
Variable |
emitArrayIndexOf(int arrayBaseOffset,
JavaKind valueKind,
boolean findTwoConsecutive,
boolean withMask,
Value arrayPointer,
Value arrayOffset,
Value arrayLength,
Value fromIndex,
Value... searchValues) |
Variable |
emitArrayRegionCompareTo(JavaKind strideA,
JavaKind strideB,
Value arrayA,
Value offsetA,
Value arrayB,
Value offsetB,
Value length) |
Variable |
emitArrayRegionCompareTo(Value arrayA,
Value offsetA,
Value arrayB,
Value offsetB,
Value length,
Value stride) |
Value |
emitAtomicReadAndAdd(Value address,
<any> kind,
Value delta)
Emit an atomic read-and-add instruction.
|
Value |
emitAtomicReadAndWrite(Value address,
<any> kind,
Value newValue)
Emit an atomic read-and-write instruction.
|
Variable |
emitByteSwap(Value input) |
void |
emitCacheWriteback(Value address)
Emits instruction(s) to flush an individual cache line that starts at
address. |
void |
emitCacheWritebackSync(boolean isPreSync)
Emits instruction(s) to serialize cache writeback operations relative to preceding (if
isPreSync == true) or following (if isPreSync == false) memory writes. |
Variable |
emitCalcStringAttributes(Object opObj,
Value array,
Value offset,
Value length,
boolean isValid) |
abstract void |
emitCCall(long address,
CallingConvention nativeCallingConvention,
Value[] args,
int numberOfFloatingPointArguments) |
void |
emitCompareAndSwapBranch(<any> kind,
AMD64AddressValue address,
Value expectedValue,
Value newValue,
Condition condition,
LabelRef trueLabel,
LabelRef falseLabel,
double trueLabelProbability) |
void |
emitCompareBranch(PlatformKind cmpKind,
Value left,
Value right,
Condition cond,
boolean unorderedIsTrue,
LabelRef trueLabel,
LabelRef falseLabel,
double trueLabelProbability) |
void |
emitCompareBranchMemory(AMD64Kind cmpKind,
Value left,
AMD64AddressValue right,
LIRFrameState state,
Condition cond,
boolean unorderedIsTrue,
LabelRef trueLabel,
LabelRef falseLabel,
double trueLabelProbability) |
Variable |
emitConditionalMove(PlatformKind cmpKind,
Value left,
Value right,
Condition cond,
boolean unorderedIsTrue,
Value trueValue,
Value falseValue) |
Variable |
emitEncodeArray(Value src,
Value dst,
Value length,
LIRGeneratorTool.CharsetName charset) |
protected void |
emitForeignCallOp(ForeignCallLinkage linkage,
Value targetAddress,
Value result,
Value[] arguments,
Value[] temps,
LIRFrameState info)
Emits the single call operation at the heart of generating LIR for a
foreign call.
|
protected void |
emitHashTableSwitch(JavaConstant[] keys,
LabelRef defaultTarget,
LabelRef[] targets,
AllocatableValue value,
Value hash) |
Variable |
emitHasNegatives(Value array,
Value length) |
void |
emitIntegerTestBranch(Value left,
Value right,
LabelRef trueDestination,
LabelRef falseDestination,
double trueDestinationProbability) |
Variable |
emitIntegerTestMove(Value left,
Value right,
Value trueValue,
Value falseValue) |
void |
emitJump(LabelRef label) |
Variable |
emitLogicCompareAndSwap(LIRKind accessKind,
Value address,
Value expectedValue,
Value newValue,
Value trueValue,
Value falseValue,
MemoryOrderMode memoryOrder) |
void |
emitMembar(int barriers) |
void |
emitNullCheck(Value address,
LIRFrameState state) |
void |
emitOverflowCheckBranch(LabelRef overflow,
LabelRef noOverflow,
LIRKind cmpLIRKind,
double overflowProbability) |
void |
emitPause() |
protected void |
emitRangeTableSwitch(int lowKey,
LabelRef defaultTarget,
LabelRef[] targets,
AllocatableValue key) |
void |
emitSpeculationFence()
Emits an instruction that prevents speculative execution from proceeding: no instruction
after this fence will execute until all previous instructions have retired.
|
void |
emitStrategySwitch(SwitchStrategy strategy,
AllocatableValue key,
LabelRef[] keyTargets,
LabelRef defaultTarget) |
void |
emitStringLatin1Inflate(Value src,
Value dst,
Value len) |
Variable |
emitStringUTF16Compress(Value src,
Value dst,
Value len) |
Value |
emitValueCompareAndSwap(LIRKind accessKind,
Value address,
Value expectedValue,
Value newValue,
MemoryOrderMode memoryOrder) |
void |
emitZeroMemory(Value address,
Value length,
boolean isAligned) |
protected int |
getAVX3Threshold()
Return the minimal array size for using AVX3 instructions.
|
AVXKind.AVXSize |
getMaxVectorSize()
Return the maximum size of vector registers used in SSE/AVX instructions.
|
protected static AVXKind.AVXSize |
getRegisterSize(Value a) |
protected Value |
loadNonInlinableConstant(Value value) |
protected boolean |
supports(CPUFeature feature) |
boolean |
supportsCPUFeature(AMD64.CPUFeature feature) |
<K extends <any>> |
toRegisterKind(K kind)
The AMD64 backend only uses DWORD and QWORD values in registers because of a performance
penalty when accessing WORD or BYTE registers.
|
protected JavaConstant |
zapValueForKind(PlatformKind kind)
Gets a garbage value for a given kind.
|
append, asAllocatable, attributes, beforeRegisterAllocation, canInlineConstant, createBenchmarkCounter, createMultiBenchmarkCounter, createZapRegisters, createZapRegisters, emitBlackhole, emitConstant, emitForeignCall, emitIncomingValues, emitIndirectForeignCallAddress, emitJavaConstant, emitLoadConstant, emitMove, emitMove, emitMoveConstant, emitReadRegister, emitStrategySwitch, emitWriteRegister, getAddressKind, getArithmetic, getBlockScope, getCodeCache, getCurrentBlock, getForeignCalls, getLIRKind, getLIRKindTool, getMatchScope, getMetaAccess, getMoveFactory, getProviders, getRegisterConfig, getResult, getSpillMoveFactory, getValueKind, hasBlockEnd, mayEmbedConstantLoad, needOnlyOopMaps, newVariable, resultOperandFor, setSourcePosition, target, zapArgumentSpaceclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddressAsAllocatableInteger, allocateStackMemory, emitCompress, emitConvertNullToZero, emitConvertNullToZero, emitConvertZeroToNull, emitDeoptimize, emitPrefetchAllocate, emitReadCallerStackPointer, emitReadReturnAddress, emitReturn, emitTimeStampWithProcid, emitUncompress, emitUnwindpublic AMD64LIRGenerator(LIRKindTool lirKindTool, AMD64ArithmeticLIRGenerator arithmeticLIRGen, MoveFactory moveFactory, Providers providers, LIRGenerationResult lirGenRes)
protected JavaConstant zapValueForKind(PlatformKind kind)
LIRGeneratorzapValueForKind in class LIRGeneratorpublic AMD64AddressValue asAddressValue(Value address)
public Variable emitAddress(AllocatableValue stackslot)
public <K extends <any>> K toRegisterKind(K kind)
protected Value loadNonInlinableConstant(Value value)
public Variable emitLogicCompareAndSwap(LIRKind accessKind, Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue, MemoryOrderMode memoryOrder)
public Value emitValueCompareAndSwap(LIRKind accessKind, Value address, Value expectedValue, Value newValue, MemoryOrderMode memoryOrder)
public void emitCompareAndSwapBranch(<any> kind,
AMD64AddressValue address,
Value expectedValue,
Value newValue,
Condition condition,
LabelRef trueLabel,
LabelRef falseLabel,
double trueLabelProbability)
public Value emitAtomicReadAndAdd(Value address,
<any> kind,
Value delta)
LIRGeneratorTooladdress - address of the value to be read and writtenkind - the access kind for the value to be writtendelta - the value to be addedpublic Value emitAtomicReadAndWrite(Value address,
<any> kind,
Value newValue)
LIRGeneratorTooladdress - address of the value to be read and writtenkind - the access kind for the value to be writtennewValue - the new value to be writtenpublic void emitNullCheck(Value address,
LIRFrameState state)
public void emitJump(LabelRef label)
emitJump in interface LIRGeneratorToolemitJump in class LIRGeneratorpublic void emitCompareBranch(PlatformKind cmpKind,
Value left,
Value right,
Condition cond,
boolean unorderedIsTrue,
LabelRef trueLabel,
LabelRef falseLabel,
double trueLabelProbability)
emitCompareBranch in class LIRGeneratorpublic void emitCompareBranchMemory(AMD64Kind cmpKind,
Value left,
AMD64AddressValue right,
LIRFrameState state,
Condition cond,
boolean unorderedIsTrue,
LabelRef trueLabel,
LabelRef falseLabel,
double trueLabelProbability)
public void emitOverflowCheckBranch(LabelRef overflow, LabelRef noOverflow, LIRKind cmpLIRKind, double overflowProbability)
emitOverflowCheckBranch in class LIRGeneratorpublic void emitIntegerTestBranch(Value left,
Value right,
LabelRef trueDestination,
LabelRef falseDestination,
double trueDestinationProbability)
emitIntegerTestBranch in class LIRGeneratorpublic Variable emitConditionalMove(PlatformKind cmpKind, Value left, Value right, Condition cond, boolean unorderedIsTrue, Value trueValue, Value falseValue)
emitConditionalMove in interface LIRGeneratorToolemitConditionalMove in class LIRGeneratorpublic Variable emitIntegerTestMove(Value left, Value right, Value trueValue, Value falseValue)
emitIntegerTestMove in interface LIRGeneratorToolemitIntegerTestMove in class LIRGeneratorprotected static AVXKind.AVXSize getRegisterSize(Value a)
public void emitMembar(int barriers)
public abstract void emitCCall(long address,
CallingConvention nativeCallingConvention,
Value[] args,
int numberOfFloatingPointArguments)
protected void emitForeignCallOp(ForeignCallLinkage linkage, Value targetAddress, Value result, Value[] arguments, Value[] temps, LIRFrameState info)
LIRGeneratoremitForeignCallOp in class LIRGeneratorpublic Variable emitByteSwap(Value input)
public Variable emitArrayCompareTo(JavaKind kind1, JavaKind kind2, int array1BaseOffset, int array2BaseOffset, Value array1, Value array2, Value length1, Value length2)
public Variable emitArrayRegionCompareTo(Value arrayA, Value offsetA, Value arrayB, Value offsetB, Value length, Value stride)
public Variable emitArrayRegionCompareTo(JavaKind strideA, JavaKind strideB, Value arrayA, Value offsetA, Value arrayB, Value offsetB, Value length)
public Variable emitArrayEquals(JavaKind kind, int array1BaseOffset, int array2BaseOffset, Value array1, Value array2, Value length)
public Variable emitArrayEquals(int baseOffsetA, int baseOffsetB, Value arrayA, Value offsetA, Value arrayB, Value offsetB, Value length, Value stride)
public Variable emitArrayEquals(JavaKind kind, int array1BaseOffset, int array2BaseOffset, Value array1, Value offset1, Value array2, Value offset2, Value length)
public Variable emitArrayEquals(JavaKind kind1, JavaKind kind2, int array1BaseOffset, int array2BaseOffset, Value array1, Value offset1, Value array2, Value offset2, Value length)
public Variable emitArrayEquals(int baseOffsetA, int baseOffsetB, int baseOffsetMask, Value arrayA, Value offsetA, Value arrayB, Value offsetB, Value mask, Value length, Value stride)
public Variable emitArrayEquals(JavaKind kind1, JavaKind kind2, JavaKind kindMask, int array1BaseOffset, int array2BaseOffset, int maskBaseOffset, Value array1, Value offset1, Value array2, Value offset2, Value mask, Value length)
public void emitArrayCopyWithConversion(JavaKind strideSrc,
JavaKind strideDst,
Value arraySrc,
Value offsetSrc,
Value arrayDst,
Value offsetDst,
Value length)
public void emitArrayCopyWithConversion(Value arraySrc,
Value offsetSrc,
Value arrayDst,
Value offsetDst,
Value length,
Value stride)
public Variable emitCalcStringAttributes(Object opObj, Value array, Value offset, Value length, boolean isValid)
public Variable emitEncodeArray(Value src, Value dst, Value length, LIRGeneratorTool.CharsetName charset)
public Variable emitHasNegatives(Value array, Value length)
protected boolean supports(CPUFeature feature)
public AVXKind.AVXSize getMaxVectorSize()
protected int getAVX3Threshold()
public Variable emitArrayIndexOf(int arrayBaseOffset, JavaKind valueKind, boolean findTwoConsecutive, boolean withMask, Value arrayPointer, Value arrayOffset, Value arrayLength, Value fromIndex, Value... searchValues)
public void emitStringLatin1Inflate(Value src,
Value dst,
Value len)
public Variable emitStringUTF16Compress(Value src, Value dst, Value len)
protected AMD64ControlFlow.StrategySwitchOp createStrategySwitchOp(SwitchStrategy strategy, LabelRef[] keyTargets, LabelRef defaultTarget, AllocatableValue key, AllocatableValue temp)
public void emitStrategySwitch(SwitchStrategy strategy, AllocatableValue key, LabelRef[] keyTargets, LabelRef defaultTarget)
emitStrategySwitch in class LIRGeneratorprotected void emitRangeTableSwitch(int lowKey,
LabelRef defaultTarget,
LabelRef[] targets,
AllocatableValue key)
emitRangeTableSwitch in class LIRGeneratorprotected void emitHashTableSwitch(JavaConstant[] keys,
LabelRef defaultTarget,
LabelRef[] targets,
AllocatableValue value,
Value hash)
emitHashTableSwitch in class LIRGeneratorpublic void emitPause()
public void emitCacheWriteback(Value address)
LIRGeneratorTooladdress.public void emitCacheWritebackSync(boolean isPreSync)
LIRGeneratorToolisPreSync == true) or following (if isPreSync == false) memory writes.public LIRInstruction createZapRegisters(Register[] zappedRegisters, JavaConstant[] zapValues)
DiagnosticLIRGeneratorToolcreateZapRegisters in interface DiagnosticLIRGeneratorToolcreateZapRegisters in class LIRGeneratorzappedRegisters - registers to be zappedzapValues - values used for zappingDiagnosticLIRGeneratorTool.createZapRegisters()public LIRInstruction createZapArgumentSpace(StackSlot[] zappedStack, JavaConstant[] zapValues)
createZapArgumentSpace in interface DiagnosticLIRGeneratorToolcreateZapArgumentSpace in class LIRGeneratorpublic void emitSpeculationFence()
LIRGeneratorToolpublic void emitZeroMemory(Value address,
Value length,
boolean isAligned)
public boolean supportsCPUFeature(AMD64.CPUFeature feature)