5#ifndef RUNTIME_VM_CONSTANTS_ARM64_H_
6#define RUNTIME_VM_CONSTANTS_ARM64_H_
8#ifndef RUNTIME_VM_CONSTANTS_H_
9#error Do not include constants_arm64.h directly; use constants.h instead.
32#define LR LR_DO_NOT_USE_DIRECTLY
158#define DART_ASSEMBLER_HAS_NULL_REG 1
170struct SharedSlowPathStubABI {
175struct InstantiationABI {
186struct InstantiateTAVInternalRegs {
200struct TTSInternalRegs {
218struct STCInternalRegs {
265struct AssertSubtypeABI {
282struct InitStaticFieldABI {
288struct InitLateStaticFieldInternalRegs {
294struct InitInstanceFieldABI {
301struct InitLateInstanceFieldInternalRegs {
307struct LateInitializationErrorABI {
323struct AssertBooleanABI {
328struct RangeErrorABI {
334struct AllocateObjectABI {
341struct AllocateClosureABI {
350struct AllocateMintABI {
356struct AllocateBoxABI {
362struct AllocateArrayABI {
369struct AllocateRecordABI {
378struct AllocateSmallRecordABI {
388struct AllocateTypedDataArrayABI {
394struct BoxDoubleStubABI {
401struct DoubleToIntegerStubABI {
409struct SuspendStubABI {
422struct InitSuspendableFunctionStubABI {
427struct ResumeStubABI {
444struct ReturnStubABI {
449struct AsyncExceptionHandlerStubABI {
454struct CloneSuspendStateStubABI {
464struct FfiAsyncCallbackSendStubABI {
472struct DispatchTableNullErrorABI {
493#define R(reg) (static_cast<RegList>(1) << (reg))
501#if defined(DART_TARGET_OS_FUCHSIA)
581#if defined(DART_TARGET_OS_MACOS_IOS) || defined(DART_TARGET_OS_MACOS)
602#if defined(DART_TARGET_OS_MACOS_IOS) || defined(DART_TARGET_OS_MACOS)
637 return ((r ==
ZR) || (r ==
CSP)) ?
R31 : r;
1092#define APPLY_OP_LIST(_V) \
1100 _V(CompareAndBranch) \
1101 _V(ConditionalBranch) \
1105 _V(UnconditionalBranch) \
1106 _V(UnconditionalBranchReg) \
1108 _V(LoadStoreRegPair) \
1109 _V(LoadRegLiteral) \
1110 _V(LoadStoreExclusive) \
1117 _V(AddSubShiftExt) \
1118 _V(AddSubWithCarry) \
1119 _V(ConditionalSelect) \
1275 uint8_t right =
rotate & 63;
1277 return ((
value & ((1ULL << right) - 1ULL)) << left) | (
value >> right);
1287 for (
unsigned i =
width;
i < reg_size;
i *= 2) {
1301#if defined(TARGET_ARCH_IS_64_BIT)
1307#error "Unexpected word size"
1309#if !defined(DART_COMPRESSED_POINTERS)
1367 return *
reinterpret_cast<const int32_t*
>(
this);
1372 *
reinterpret_cast<int32_t*
>(
this) =
value;
1380 ASSERT((hw >= 0) && (hw <= 3));
1383 (
static_cast<int32_t
>(hw) <<
kHWShift) |
1393 ASSERT((imm12 & 0xfffff000) == 0);
1445 return (
static_cast<int32_t
>(
Imm7Field()) << 25) >> 25;
1451 return (
static_cast<int32_t
>(
Imm9Field()) << 23) >> 23;
1467 return (
static_cast<int32_t
>(
Imm14Field()) << 18) >> 18;
1471 return (
static_cast<int32_t
>(
Imm19Field()) << 13) >> 13;
1475 return (
static_cast<int32_t
>(
Imm26Field()) << 6) >> 6;
1503 inline bool Is##op##Op() const { \
1504 return ((InstructionBits() & op##Mask) == (op##Fixed & op##Mask)); \
1519 if (IsAddSubImmOp() || (IsAddSubShiftExtOp() &&
IsExtend())) {
1526 if (IsLogicalImmOp()) {
1527 const int op =
Bits(29, 2);
1528 const bool set_flags = op == 3;
1546 if (IsLoadStoreOp() || IsAddSubImmOp() ||
1547 (IsAddSubShiftExtOp() &&
IsExtend())) {
1558 const int64_t n =
NField();
1579 if (imm_s == 0x3F) {
1582 uint64_t
bits = (1ULL << (imm_s + 1)) - 1;
1585 if ((imm_s >> 1) == 0x1F) {
1589 if ((imm_s &
width) == 0) {
1590 int mask =
width - 1;
1591 if ((imm_s & mask) == mask) {
1594 uint64_t
bits = (1ULL << ((imm_s & mask) + 1)) - 1;
1605 const int64_t
sign =
static_cast<int64_t
>((imm8 & 0x80) >> 7) << 63;
1606 const int64_t hi_exp =
static_cast<int64_t
>(!((imm8 & 0x40) >> 6)) << 62;
1607 const int64_t mid_exp = (((imm8 & 0x40) >> 6) == 0) ? 0 : (0xffLL << 54);
1608 const int64_t low_exp =
static_cast<int64_t
>((imm8 & 0x30) >> 4) << 52;
1609 const int64_t frac =
static_cast<int64_t
>(imm8 & 0x0f) << 48;
1610 return sign | hi_exp | mid_exp | low_exp | frac;
1620 DISALLOW_ALLOCATION();
1621 DISALLOW_IMPLICIT_CONSTRUCTORS(
Instr);
1626struct LinkRegister {};
1642#define LINK_REGISTER (LinkRegister())
1654#if defined(DART_TARGET_OS_MACOS_IOS) || defined(DART_TARGET_OS_MACOS)
static bool rotate(const SkDCubic &cubic, int zero, int index, SkDCubic &rotPath)
static int sign(SkScalar x)
static constexpr ExtensionStrategy kArgumentStackExtension
static constexpr Register kSecondReturnReg
static constexpr intptr_t kCalleeSaveCpuRegisters
static constexpr AlignmentStrategy kArgumentRegisterAlignmentVarArgs
static constexpr AlignmentStrategy kFieldAlignment
static const FpuRegister FpuArgumentRegisters[]
static const Register ArgumentRegisters[]
static constexpr bool kArgumentIntRegXorFpuReg
static constexpr intptr_t kFpuArgumentRegisters
static constexpr FpuRegister kReturnFpuReg
static constexpr intptr_t kNumFpuArgRegs
static constexpr Register kPointerToReturnStructRegisterCall
static constexpr Register kFirstNonArgumentRegister
static constexpr Register kFfiAnyNonAbiRegister
static constexpr AlignmentStrategy kArgumentStackAlignmentVarArgs
static constexpr Register kPointerToReturnStructRegisterReturn
static constexpr AlignmentStrategy kArgumentRegisterAlignment
static constexpr ExtensionStrategy kReturnRegisterExtension
COMPILE_ASSERT(((R(kFirstNonArgumentRegister)|R(kSecondNonArgumentRegister)) &(kArgumentRegisters|R(kPointerToReturnStructRegisterCall)))==0)
static constexpr Register kStackPointerRegister
static constexpr Register kReturnReg
static constexpr intptr_t kArgumentRegisters
static constexpr Register kSecondNonArgumentRegister
static constexpr ExtensionStrategy kArgumentRegisterExtension
static constexpr intptr_t kNumArgRegs
static constexpr AlignmentStrategy kArgumentStackAlignment
static Instr * At(uword pc)
int64_t SImm7Field() const
Shift ShiftTypeField() const
static constexpr int32_t kSimulatorBreakCode
int ShiftAmountField() const
Extend ExtendTypeField() const
Condition SelectConditionField() const
static constexpr int32_t kSimulatorBreakpointInstruction
VRegister VtField() const
void SetMoveWideBits(MoveWideOp op, Register rd, uint16_t imm, int hw, WideSize sz)
void SetInstructionBits(int32_t value)
static constexpr int32_t kBreakPointInstruction
int32_t InstructionBits() const
void SetImm12Bits(int32_t orig, int32_t imm12)
int64_t SImm26Field() const
int Imm12ShiftField() const
VRegister VmField() const
Condition ConditionField() const
int64_t SImm19Field() const
static int64_t VFPExpandImm(uint8_t imm8)
int ExtShiftAmountField() const
void SetUnconditionalBranchRegBits(UnconditionalBranchRegOp op, Register rn)
VRegister VnField() const
int64_t SImm9Field() const
static constexpr int32_t kNopInstruction
VRegister VdField() const
static constexpr int32_t kSimulatorRedirectCode
VRegister Vt2Field() const
static constexpr int32_t kBreakPointCode
Register Rt2Field() const
int64_t SImm14Field() const
static constexpr int32_t kSimulatorRedirectInstruction
int Bits(int shift, int count) const
static constexpr int CountOneBits32(uint32_t x)
#define APPLY_OP_LIST(_V)
const QRegister kAbiLastPreservedFpuReg
const FpuRegister kNoFpuRegister
const int kXRegSizeInBits
const Register kWriteBarrierSlotReg
constexpr bool operator!=(Register r, LinkRegister lr)
@ TIMES_COMPRESSED_HALF_WORD_SIZE
@ TIMES_COMPRESSED_WORD_SIZE
const int kDartVolatileCpuRegCount
static Condition InvertCondition(Condition c)
const RegList kAbiVolatileCpuRegs
static uint64_t RotateRight(uint64_t value, uint8_t rotate, uint8_t width)
const Register kExceptionObjectReg
const RegList kReservedCpuRegisters
const Register kWriteBarrierObjectReg
const RegList kAllFpuRegistersList
const Register kWriteBarrierValueReg
const char *const fpu_reg_names[kNumberOfFpuRegisters]
@ LoadStoreExclusiveFixed
Register ConcreteRegister(LinkRegister)
const Register CALLEE_SAVED_TEMP
constexpr uword kBreakInstructionFiller
const Register kDartLastVolatileCpuReg
const Register ARGS_DESC_REG
const Register kDartFirstVolatileCpuReg
const Register DISPATCH_TABLE_REG
const int kNumberOfFpuRegisters
const RegList kAbiPreservedCpuRegs
const Register kAbiLastPreservedCpuReg
constexpr bool operator==(Register r, LinkRegister)
constexpr RegList kDartAvailableCpuRegs
const int kAbiPreservedCpuRegCount
const RegList kDartVolatileCpuRegs
const Register kAbiFirstPreservedCpuReg
const intptr_t kStoreBufferWrapperSize
const int kAbiPreservedFpuRegCount
constexpr int kRegisterAllocationBias
const Register FUNCTION_REG
constexpr intptr_t kNumberOfReservedCpuRegisters
const Register IC_DATA_REG
const char *const cpu_reg_names[kNumberOfCpuRegisters]
constexpr intptr_t kInt64SizeLog2
const int kWRegSizeInBits
const RegList kAbiArgumentCpuRegs
const Register kStackTraceObjectReg
const RegList kAllCpuRegistersList
const intptr_t kPreferredLoopAlignment
simd128_value_t fpu_register_t
const RegList kAbiVolatileFpuRegs
@ UnconditionalBranchRegFixed
@ UnconditionalBranchRegMask
static uint64_t RepeatBitsAcrossReg(uint8_t reg_size, uint64_t value, uint8_t width)
const Register CALLEE_SAVED_TEMP2
const int kDartVolatileFpuRegCount
COMPILE_ASSERT(kUnreachableReference==WeakTable::kNoValue)
@ UnconditionalBranchMask
@ UnconditionalBranchFixed
const char *const cpu_reg_abi_names[kNumberOfCpuRegisters]
const int kFpuRegisterSize
constexpr int kNumberOfDartAvailableCpuRegs
const QRegister kAbiFirstPreservedFpuReg
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
static constexpr Register kResultReg
static constexpr Register kLengthReg
static constexpr Register kTypeArgumentsReg
static constexpr Register kResultReg
static constexpr Register kTempReg
static constexpr Register kFunctionReg
static constexpr Register kContextReg
static constexpr Register kResultReg
static constexpr Register kInstantiatorTypeArgsReg
static constexpr Register kScratchReg
static constexpr Register kResultReg
static constexpr Register kTempReg
static constexpr Register kTypeArgumentsReg
static constexpr Register kResultReg
static constexpr Register kTagsReg
static constexpr Register kShapeReg
static constexpr Register kResultReg
static constexpr Register kTemp1Reg
static constexpr Register kTemp2Reg
static constexpr Register kResultReg
static constexpr Register kShapeReg
static constexpr Register kValue2Reg
static constexpr Register kValue0Reg
static constexpr Register kTempReg
static constexpr Register kValue1Reg
static constexpr Register kLengthReg
static constexpr Register kResultReg
static constexpr Register kObjectReg
static constexpr Register kSubTypeReg
static constexpr Register kSuperTypeReg
static constexpr Register kFunctionTypeArgumentsReg
static constexpr intptr_t kAbiRegisters
static constexpr Register kInstantiatorTypeArgumentsReg
static constexpr Register kDstNameReg
static constexpr Register kSuspendStateReg
static constexpr Register kTempReg
static constexpr Register kResultReg
static constexpr FpuRegister kValueReg
static constexpr Register kDestinationReg
static constexpr Register kSrcFrameReg
static constexpr Register kFrameSizeReg
static constexpr Register kSourceReg
static constexpr Register kTempReg
static constexpr Register kDstFrameReg
static constexpr Register kCpuRegistersForArgs[]
static constexpr FpuRegister kFpuRegistersForArgs[]
static constexpr Register kClassIdReg
static constexpr Register kResultReg
static constexpr Register kRecognizedKindReg
static constexpr FpuRegister kInputReg
static constexpr Register kArgsReg
static constexpr Register kFieldReg
static constexpr Register kResultReg
static constexpr Register kInstanceReg
static constexpr Register kAddressReg
static constexpr Register kScratchReg
static constexpr Register kAddressReg
static constexpr Register kScratchReg
static constexpr Register kResultReg
static constexpr Register kFieldReg
static constexpr Register kTypeArgsReg
static constexpr Register kEntryStartReg
static constexpr intptr_t kSavedRegisters
static constexpr Register kCurrentEntryIndexReg
static constexpr Register kProbeMaskReg
static constexpr Register kProbeDistanceReg
static constexpr Register kInstantiatorTypeArgumentsReg
static constexpr Register kScratchReg
static constexpr Register kResultTypeReg
static constexpr Register kUninstantiatedTypeArgumentsReg
static constexpr Register kResultTypeArgumentsReg
static constexpr Register kFunctionTypeArgumentsReg
static constexpr Register kFieldReg
static constexpr Register kLengthReg
static constexpr Register kIndexReg
static constexpr Register kStackTraceReg
static constexpr Register kExceptionReg
static constexpr Register kSrcFrameReg
static constexpr Register kDstFrameReg
static constexpr Register kFrameSizeReg
static constexpr Register kSuspendStateReg
static constexpr Register kExceptionReg
static constexpr Register kTempReg
static constexpr Register kResumePcReg
static constexpr Register kStackTraceReg
static constexpr Register kSuspendStateReg
static constexpr Register kCacheContentsSizeReg
static constexpr Register kInstanceInstantiatorTypeArgumentsReg
static constexpr intptr_t kInternalRegisters
static constexpr Register kInstanceParentFunctionTypeArgumentsReg
static constexpr Register kProbeDistanceReg
static constexpr Register kInstanceCidOrSignatureReg
static constexpr Register kCacheEntriesEndReg
static constexpr Register kInstanceDelayedFunctionTypeArgumentsReg
static constexpr Register kResultReg
static constexpr Register kSrcFrameReg
static constexpr Register kFunctionDataReg
static constexpr Register kSuspendStateReg
static constexpr Register kTempReg
static constexpr Register kArgumentReg
static constexpr Register kDstFrameReg
static constexpr Register kTypeArgsReg
static constexpr Register kFrameSizeReg
static constexpr intptr_t kInternalRegisters
static constexpr intptr_t kSavedTypeArgumentRegisters
static constexpr Register kSuperTypeArgumentReg
static constexpr Register kSubTypeArgumentReg
static constexpr Register kInstanceTypeArgumentsReg
static constexpr Register kScratchReg
static constexpr Register kExceptionReg
static constexpr Register kSubtypeTestCacheReg
static constexpr Register kDstTypeReg
static constexpr Register kInstanceReg
static constexpr Register kFunctionTypeArgumentsReg
static constexpr Register kInstantiatorTypeArgumentsReg
static constexpr intptr_t kNonPreservedAbiRegisters
static constexpr Register kSubtypeTestCacheResultReg
static constexpr intptr_t kPreservedAbiRegisters
static constexpr Register kScratchReg
static constexpr intptr_t kAbiRegisters
static constexpr Register kInstanceOfResultReg