5#if V8_TARGET_ARCH_ARM64
16 WritableJitAllocation* jit_allocation) {
19 jit_allocation->WriteUnalignedValue(
reinterpret_cast<Address>(
this),
83static uint64_t RotateRight(uint64_t value,
unsigned int rotate,
87 if (rotate == 0)
return value;
88 return ((value & ((1ULL << rotate) - 1ULL)) << (width - rotate)) |
92static uint64_t RepeatBitsAcrossReg(
unsigned reg_size, uint64_t value,
94 DCHECK((width == 2) || (width == 4) || (width == 8) || (width == 16) ||
97 uint64_t
result = value & ((1ULL << width) - 1ULL);
98 for (
unsigned i = width;
i < reg_size;
i *= 2) {
134 uint64_t bits = (1ULL << (imm_s + 1)) - 1;
135 return RotateRight(bits, imm_r, 64);
137 if ((imm_s >> 1) == 0x1F) {
140 for (
int width = 0x20; width >= 0x2; width >>= 1) {
141 if ((imm_s & width) == 0) {
142 int mask = width - 1;
146 uint64_t bits = (1ULL << ((imm_s &
mask) + 1)) - 1;
147 return RepeatBitsAcrossReg(
148 reg_size, RotateRight(bits, imm_r &
mask, width), width);
156 return ImmNEONabc() << 5 | ImmNEONdefgh();
171 unsigned size_log2 =
static_cast<Instr>(op) >> LSSize_offset;
172 if ((op & LSVector_mask) != 0) {
175 if (size_log2 == 0 && ((op & LSOpc_mask) >> LSOpc_offset) >= 2) {
230 Instruction* target) {
250 Instruction* target) {
260 PatchingAssembler patcher(zone, options,
reinterpret_cast<uint8_t*
>(
this),
262 patcher.PatchAdrFar(target_offset);
267 Zone* zone, AssemblerOptions options, Instruction* target) {
276 PatchingAssembler patcher(zone, options,
reinterpret_cast<uint8_t*
>(
this), 2);
298 const NEONFormatMap* format) {
304 const NEONFormatMap* format0,
305 const NEONFormatMap* format1) {
311 const NEONFormatMap* format0,
312 const NEONFormatMap* format1,
313 const NEONFormatMap* format2) {
319 const NEONFormatMap* format1,
320 const NEONFormatMap* format2) {
332 const NEONFormatMap* format) {
344 SubstitutionMode mode0,
345 SubstitutionMode mode1,
346 SubstitutionMode mode2,
347 SubstitutionMode mode3) {
367 const NEONFormatMap* format_map) {
385 return format_map->map[
PickBits(format_map->bits)];
389 static const char* formats[] = {
"undefined",
"8b",
"16b",
"4h",
"8h",
390 "2s",
"4s",
"1d",
"2d",
"b",
399 static const char* formats[] = {
400 "undefined",
"undefined",
"undefined",
"undefined",
"undefined",
401 "undefined",
"undefined",
"undefined",
"undefined",
"'B",
409 if (bits[b] == 0)
break;
static Instr ImmPCRelAddress(int imm21)
static Instr ImmLLiteral(int imm19)
static bool IsImmLLiteral(int64_t offset)
bool IsCompareBranch() const
V8_INLINE const Instruction * InstructionAtOffset(int64_t offset, CheckAlignment check=CHECK_ALIGNMENT) const
static bool IsValidPCRelOffset(ptrdiff_t offset)
double ImmNEONFP64() const
static constexpr bool IsValidImmPCOffset(ImmBranchType branch_type, ptrdiff_t offset)
void SetPCRelImmTarget(Zone *zone, AssemblerOptions options, Instruction *target)
void SetUnresolvedInternalReferenceImmTarget(Zone *zone, AssemblerOptions options, Instruction *target)
static float Imm8ToFP32(uint32_t imm8)
unsigned ImmNEONabcdefgh() const
void SetImmPCOffsetTarget(Zone *zone, AssemblerOptions options, Instruction *target)
bool IsUncondBranchImm() const
V8_EXPORT_PRIVATE int64_t ImmPCOffset()
bool IsTestBranch() const
bool IsLdrLiteral() const
float ImmNEONFP32() const
V8_EXPORT_PRIVATE Instruction * ImmPCOffsetTarget()
bool IsCondBranchImm() const
bool IsTargetInImmPCOffsetRange(Instruction *target)
int ImmUnresolvedInternalReference() const
void SetImmLLiteral(Instruction *source)
V8_EXPORT_PRIVATE void SetInstructionBits(Instr value, WritableJitAllocation *jit_allocation=nullptr)
static double Imm8ToFP64(uint32_t imm8)
bool IsUnresolvedInternalReference() const
ImmBranchType BranchType() const
V8_INLINE ptrdiff_t DistanceTo(Instruction *target)
void SetBranchImmTarget(Instruction *target, WritableJitAllocation *jit_allocation=nullptr)
bool IsPCRelAddressing() const
static constexpr int kAdrFarPatchableNInstrs
ZoneVector< RpoNumber > & result
static void WriteUnalignedValue(Address p, V value)
constexpr NEONFormatField NEON_Q
constexpr LoadStoreAnyOp LoadStoreAnyFixed
constexpr GenericInstrField SixtyFourBits
static const unsigned kNEONFormatMaxBits
constexpr uint8_t kLoadLiteralScaleLog2
constexpr int kWRegSizeLog2
constexpr int kWRegSizeInBits
constexpr LoadStoreAnyOp LoadStoreAnyFMask
constexpr int ImmPCRel_mask
constexpr LoadStorePairAnyOp LoadStorePairAnyFixed
constexpr LoadStorePairOp LoadStorePairLBit
constexpr uint8_t kInstrSizeLog2
constexpr int kQRegSizeLog2
unsigned CalcLSDataSizeLog2(LoadStoreOp op)
constexpr LoadStorePairAnyOp LoadStorePairAnyFMask
constexpr LoadStoreOp LoadStoreMask
constexpr int kXRegSizeInBits
constexpr uint8_t kInstrSize
constexpr int kXRegSizeLog2
uint32_t unsigned_bitextract_32(int msb, int lsb, uint32_t x)
V8_EXPORT_PRIVATE void V8_EXPORT_PRIVATE void const char * format
unsigned CalcLSPairDataSize(LoadStorePairOp op)
#define DCHECK_LE(v1, v2)
#define DCHECK_NOT_NULL(val)
#define DCHECK(condition)
#define DCHECK_LT(v1, v2)
#define DCHECK_EQ(v1, v2)
constexpr bool IsAligned(T value, U alignment)