public abstract class AArch64LIRGenerator extends LIRGenerator
LIRGenerator.Options, LIRGenerator.VariableProviderLIRGeneratorTool.BlockScope, LIRGeneratorTool.CharsetNameDiagnosticLIRGeneratorTool.ZapRegistersAfterInstruction, DiagnosticLIRGeneratorTool.ZapStackArgumentSpaceBeforeInstructionarithmeticLIRGen| Constructor and Description |
|---|
AArch64LIRGenerator(LIRKindTool lirKindTool,
AArch64ArithmeticLIRGenerator arithmeticLIRGen,
MoveFactory moveFactory,
Providers providers,
LIRGenerationResult lirGenRes) |
| Modifier and Type | Method and Description |
|---|---|
AArch64AddressValue |
asAddressValue(Value address,
int bitTransferSize) |
protected AArch64ControlFlow.StrategySwitchOp |
createStrategySwitchOp(SwitchStrategy strategy,
LabelRef[] keyTargets,
LabelRef defaultTarget,
AllocatableValue key,
Function<Condition,AArch64Assembler.ConditionFlag> converter) |
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) |
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 |
emitArrayIndexOf(int arrayBaseOffset,
JavaKind valueKind,
boolean findTwoConsecutive,
boolean withMask,
Value arrayPointer,
Value arrayOffset,
Value arrayLength,
Value fromIndex,
Value... searchValues) |
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. |
abstract void |
emitCCall(long address,
CallingConvention nativeCallingConvention,
Value[] args) |
protected boolean |
emitCompare(PlatformKind cmpKind,
Value a,
Value b,
Condition condition,
boolean unorderedIsTrue)
This method emits the compare instruction, and may mirror (switch) the operands.
|
void |
emitCompareBranch(PlatformKind cmpKind,
Value left,
Value right,
Condition cond,
boolean unorderedIsTrue,
LabelRef trueDestination,
LabelRef falseDestination,
double trueDestinationProbability) |
Variable |
emitConditionalMove(PlatformKind cmpKind,
Value left,
Value right,
Condition cond,
boolean unorderedIsTrue,
Value trueValue,
Value falseValue)
Conditionally move trueValue into new variable if cond + unorderedIsTrue is true, else
falseValue.
|
Variable |
emitEncodeArray(Value src,
Value dst,
Value length,
LIRGeneratorTool.CharsetName charset) |
protected void |
emitHashTableSwitch(JavaConstant[] keys,
LabelRef defaultTarget,
LabelRef[] targets,
AllocatableValue value,
Value hash) |
void |
emitIntegerTestBranch(Value left,
Value right,
LabelRef trueDestination,
LabelRef falseDestination,
double trueSuccessorProbability)
Branches to label if (left & right) == 0.
|
Variable |
emitIntegerTestMove(Value left,
Value right,
Value trueValue,
Value falseValue)
Moves trueValue into result if (left & right) == 0, else 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 cmpKind,
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) |
Variable |
emitValueCompareAndSwap(LIRKind accessKind,
Value address,
Value expectedValue,
Value newValue,
MemoryOrderMode memoryOrder) |
void |
emitZeroMemory(Value address,
Value length,
boolean isAligned) |
protected void |
emitZeroMemory(Value address,
Value length,
boolean isAligned,
boolean useDcZva,
int zvaLength) |
protected Value |
getCompareValueForConstantPointer(Value v)
Returns the appropriate value to use within a comparison if the value is a pointer constant;
if not, returns the original value.
|
AllocatableValue |
moveSp(AllocatableValue val)
If val denotes the stackpointer, move it to another location.
|
<K extends <any>> |
toRegisterKind(K kind)
AArch64 cannot use anything smaller than a word in any instruction other than load and store.
|
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, emitForeignCallOp, 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, emitArrayCopyWithConversion, emitArrayCopyWithConversion, emitArrayEquals, emitArrayEquals, emitArrayEquals, emitArrayRegionCompareTo, emitArrayRegionCompareTo, emitCalcStringAttributes, emitCompress, emitConvertNullToZero, emitConvertNullToZero, emitConvertZeroToNull, emitDeoptimize, emitHasNegatives, emitPrefetchAllocate, emitReadCallerStackPointer, emitReadReturnAddress, emitReturn, emitTimeStampWithProcid, emitUncompress, emitUnwind, getMaxVectorSizepublic AArch64LIRGenerator(LIRKindTool lirKindTool, AArch64ArithmeticLIRGenerator arithmeticLIRGen, MoveFactory moveFactory, Providers providers, LIRGenerationResult lirGenRes)
public AllocatableValue moveSp(AllocatableValue val)
public <K extends <any>> K toRegisterKind(K kind)
public void emitNullCheck(Value address,
LIRFrameState state)
public Variable emitAddress(AllocatableValue stackslot)
public AArch64AddressValue asAddressValue(Value address, int bitTransferSize)
protected Value getCompareValueForConstantPointer(Value v)
public Variable emitLogicCompareAndSwap(LIRKind accessKind, Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue, MemoryOrderMode memoryOrder)
public Variable emitValueCompareAndSwap(LIRKind accessKind, Value address, Value expectedValue, Value newValue, MemoryOrderMode memoryOrder)
public 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 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 void emitMembar(int barriers)
public void emitJump(LabelRef label)
emitJump in interface LIRGeneratorToolemitJump in class LIRGeneratorpublic void emitOverflowCheckBranch(LabelRef overflow, LabelRef noOverflow, LIRKind cmpKind, double overflowProbability)
emitOverflowCheckBranch in class LIRGeneratorpublic void emitIntegerTestBranch(Value left,
Value right,
LabelRef trueDestination,
LabelRef falseDestination,
double trueSuccessorProbability)
emitIntegerTestBranch in class LIRGeneratorleft - Integer kind. Non null.right - Integer kind. Non null.trueDestination - destination if left & right == 0. Non null.falseDestination - destination if left & right != 0. Non nulltrueSuccessorProbability - hoistoric probability that comparison is truepublic Variable emitConditionalMove(PlatformKind cmpKind, Value left, Value right, Condition cond, boolean unorderedIsTrue, Value trueValue, Value falseValue)
emitConditionalMove in interface LIRGeneratorToolemitConditionalMove in class LIRGeneratorleft - Arbitrary value. Has to have same type as right. Non null.right - Arbitrary value. Has to have same type as left. Non null.cond - condition that decides whether to move trueValue or falseValue into result. Non
null.unorderedIsTrue - defines whether floating-point comparisons consider unordered true or
not. Ignored for integer comparisons.trueValue - arbitrary value same type as falseValue. Non null.falseValue - arbitrary value same type as trueValue. Non null.public void emitCompareBranch(PlatformKind cmpKind,
Value left,
Value right,
Condition cond,
boolean unorderedIsTrue,
LabelRef trueDestination,
LabelRef falseDestination,
double trueDestinationProbability)
emitCompareBranch in class LIRGeneratorprotected boolean emitCompare(PlatformKind cmpKind,
Value a,
Value b,
Condition condition,
boolean unorderedIsTrue)
a - the left operand of the comparison. Has to have same type as b. Non null.b - the right operand of the comparison. Has to have same type as a. Non null.public Variable emitIntegerTestMove(Value left, Value right, Value trueValue, Value falseValue)
emitIntegerTestMove in interface LIRGeneratorToolemitIntegerTestMove in class LIRGeneratorleft - Integer kind. Non null.right - Integer kind. Non null.trueValue - Arbitrary value, same type as falseValue. Non null.falseValue - Arbitrary value, same type as trueValue. Non null.public void emitStrategySwitch(SwitchStrategy strategy, AllocatableValue key, LabelRef[] keyTargets, LabelRef defaultTarget)
emitStrategySwitch in class LIRGeneratorprotected AArch64ControlFlow.StrategySwitchOp createStrategySwitchOp(SwitchStrategy strategy, LabelRef[] keyTargets, LabelRef defaultTarget, AllocatableValue key, Function<Condition,AArch64Assembler.ConditionFlag> converter)
protected 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 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 emitArrayEquals(JavaKind kind, int array1BaseOffset, int array2BaseOffset, Value array1, Value array2, Value length)
public Variable emitArrayEquals(JavaKind kind, int array1BaseOffset, int array2BaseOffset, Value array1, Value offset1, Value array2, Value offset2, Value length)
public Variable emitArrayIndexOf(int arrayBaseOffset, JavaKind valueKind, boolean findTwoConsecutive, boolean withMask, Value arrayPointer, Value arrayOffset, Value arrayLength, Value fromIndex, Value... searchValues)
public Variable emitEncodeArray(Value src, Value dst, Value length, LIRGeneratorTool.CharsetName charset)
public void emitStringLatin1Inflate(Value src,
Value dst,
Value len)
public Variable emitStringUTF16Compress(Value src, Value dst, Value len)
protected JavaConstant zapValueForKind(PlatformKind kind)
LIRGeneratorzapValueForKind 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 abstract void emitCCall(long address,
CallingConvention nativeCallingConvention,
Value[] args)
public void emitSpeculationFence()
LIRGeneratorToolpublic void emitZeroMemory(Value address,
Value length,
boolean isAligned)
protected final void emitZeroMemory(Value address,
Value length,
boolean isAligned,
boolean useDcZva,
int zvaLength)