7 #if V8_TARGET_ARCH_ARM64
9 #define ARM64_DEFINE_FP_STATICS
38 case LDR_d:
return true;
39 default:
return false;
60 case STR_d:
return true;
61 default:
return false;
67 static uint64_t RotateRight(uint64_t value,
72 return ((value & ((1UL << rotate) - 1UL)) << (width - rotate)) |
77 static uint64_t RepeatBitsAcrossReg(
unsigned reg_size,
80 DCHECK((width == 2) || (width == 4) || (width == 8) || (width == 16) ||
83 uint64_t result = value & ((1UL << width) - 1UL);
84 for (
unsigned i = width;
i < reg_size;
i *= 2) {
85 result |= (result <<
i);
97 int64_t imm_s = ImmSetBits();
98 int64_t imm_r = ImmRotate();
121 uint64_t bits = (1UL << (imm_s + 1)) - 1;
122 return RotateRight(bits, imm_r, 64);
124 if ((imm_s >> 1) == 0x1F) {
127 for (
int width = 0x20; width >= 0x2; width >>= 1) {
128 if ((imm_s & width) == 0) {
129 int mask = width - 1;
130 if ((imm_s & mask) == mask) {
133 uint64_t bits = (1UL << ((imm_s & mask) + 1)) - 1;
134 return RepeatBitsAcrossReg(reg_size,
135 RotateRight(bits, imm_r & mask, width),
153 uint32_t result = (bit7 << 31) | ((32 - bit6) << 25) | (bit5_to_0 << 19);
165 uint64_t bit7 = (bits >> 7) & 0x1;
166 uint64_t bit6 = (bits >> 6) & 0x1;
167 uint64_t bit5_to_0 = bits & 0x3f;
168 uint64_t result = (bit7 << 63) | ((256 - bit6) << 54) | (bit5_to_0 << 48);
242 PatchingAssembler patcher(
this,
244 patcher.PatchAdrFar(target_offset);
251 Instr branch_imm = 0;
257 imm_mask = ImmCondBranch_mask;
262 imm_mask = ImmUncondBranch_mask;
267 imm_mask = ImmCmpBranch_mask;
272 imm_mask = ImmTestBranch_mask;
285 Instr mask = ImmLLiteral_mask;
308 uint64_t payload = ImmMoveWide();
static Instr ImmTestBranch(int imm14)
static Instr ImmCmpBranch(int imm19)
static Instr ImmPCRelAddress(int imm21)
static Instr ImmLLiteral(int imm19)
static Instr ImmCondBranch(int imm19)
static Instr ImmUncondBranch(int imm26)
uint64_t InlineData() const
bool IsInlineData() const
void SetInstructionBits(Instr value)
Instr Mask(uint32_t mask) const
Instruction * InstructionAtOffset(int64_t offset, CheckAlignment check=CHECK_ALIGNMENT)
bool IsLdrLiteral() const
void SetPCRelImmTarget(Instruction *target)
void SetImmPCOffsetTarget(Instruction *target)
Instruction * ImmPCOffsetTarget()
bool IsTargetInImmPCOffsetRange(Instruction *target)
static bool IsValidImmPCOffset(ImmBranchType branch_type, int32_t offset)
static bool IsValidPCRelOffset(int offset)
void SetImmLLiteral(Instruction *source)
void SetBranchImmTarget(Instruction *target)
static int ImmBranchRangeBitwidth(ImmBranchType branch_type)
ImmBranchType BranchType() const
ptrdiff_t DistanceTo(Instruction *target)
bool IsPCRelAddressing() const
static const int kAdrFarPatchableNInstrs
#define DCHECK(condition)
LSDataSize CalcLSPairDataSize(LoadStorePairOp op)
const unsigned kXRegSizeInBits
const unsigned kWRegSizeInBits
const unsigned kLoadLiteralScaleLog2
static float rawbits_to_float(uint32_t bits)
static double rawbits_to_double(uint64_t bits)
bool is_intn(int64_t x, unsigned n)
bool IsAligned(T value, U alignment)
const unsigned kInstructionSize
const unsigned kInstructionSizeLog2
Debugger support for the V8 JavaScript engine.