5 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
20 #define ASM_UNIMPLEMENTED(message) \
21 __ Debug(message, __LINE__, NO_PARAM)
22 #define ASM_UNIMPLEMENTED_BREAK(message) \
23 __ Debug(message, __LINE__, \
24 FLAG_ignore_asm_unimplemented_break ? NO_PARAM : BREAK)
25 #define ASM_LOCATION(message) \
26 __ Debug("LOCATION: " message, __LINE__, NO_PARAM)
28 #define ASM_UNIMPLEMENTED(message)
29 #define ASM_UNIMPLEMENTED_BREAK(message)
30 #define ASM_LOCATION(message)
37 #define LS_MACRO_LIST(V) \
38 V(Ldrb, Register&, rt, LDRB_w) \
39 V(Strb, Register&, rt, STRB_w) \
40 V(Ldrsb, Register&, rt, rt.Is64Bits() ? LDRSB_x : LDRSB_w) \
41 V(Ldrh, Register&, rt, LDRH_w) \
42 V(Strh, Register&, rt, STRH_w) \
43 V(Ldrsh, Register&, rt, rt.Is64Bits() ? LDRSH_x : LDRSH_w) \
44 V(Ldr, CPURegister&, rt, LoadOpFor(rt)) \
45 V(Str, CPURegister&, rt, StoreOpFor(rt)) \
46 V(Ldrsw, Register&, rt, LDRSW_x)
48 #define LSPAIR_MACRO_LIST(V) \
49 V(Ldp, CPURegister&, rt, rt2, LoadPairOpFor(rt, rt2)) \
50 V(Stp, CPURegister&, rt, rt2, StorePairOpFor(rt, rt2)) \
51 V(Ldpsw, CPURegister&, rt, rt2, LDPSW_x)
132 class MacroAssembler :
public Assembler {
262 #define DECLARE_FUNCTION(FN, REGTYPE, REG, OP) \
263 inline void FN(const REGTYPE REG, const MemOperand& addr);
265 #undef DECLARE_FUNCTION
271 #define DECLARE_FUNCTION(FN, REGTYPE, REG, REG2, OP) \
272 inline void FN(const REGTYPE REG, const REGTYPE REG2, const MemOperand& addr);
274 #undef DECLARE_FUNCTION
303 inline void B(Label* label);
314 inline void Bind(Label* label);
315 inline void Bl(Label* label);
318 inline void Brk(
int code);
402 DCHECK(allow_macro_instructions_);
403 Fmov(fd,
static_cast<double>(imm));
431 inline void Hlt(
int code);
533 Label * is_not_representable =
NULL,
534 Label * is_representable =
NULL);
705 inline void Claim(uint64_t count, uint64_t unit_size =
kXRegSize);
708 inline void Drop(uint64_t count, uint64_t unit_size =
kXRegSize);
729 const uint64_t bit_pattern,
735 const uint64_t bit_pattern,
812 DCHECK(sp_alignment >= 16);
865 if (object->IsHeapObject()) {
885 template<
typename Field>
887 static const uint64_t
shift = Field::kShift;
888 static const uint64_t setbits =
CountSetBits(Field::kMask, 32);
892 template<
typename Field>
894 DecodeField<Field>(reg, reg);
916 Label* not_smi_label =
NULL);
920 Label* both_smi_label,
921 Label* not_smi_label =
NULL);
924 Label* either_smi_label,
925 Label* not_smi_label =
NULL);
928 Label* not_smi_label);
931 Label* not_smi_label);
995 Label* on_successful_conversion =
NULL,
996 Label* on_failed_conversion =
NULL) {
999 on_failed_conversion);
1010 Label* on_successful_conversion =
NULL,
1011 Label* on_failed_conversion =
NULL) {
1014 on_failed_conversion);
1125 int num_reg_arguments);
1127 int num_reg_arguments,
1128 int num_double_arguments);
1130 int num_reg_arguments,
1131 int num_double_arguments);
1140 ExternalReference thunk_ref,
1207 const ParameterCount& actual,
1212 bool* definitely_mismatches,
1215 const ParameterCount& expected,
1216 const ParameterCount& actual,
1222 const ParameterCount& actual,
1226 const ParameterCount& expected,
1227 const ParameterCount& actual,
1231 const ParameterCount& expected,
1232 const ParameterCount& actual,
1276 void set_allow_macro_instructions(
bool value) {
1277 allow_macro_instructions_ = value;
1279 bool allow_macro_instructions()
const {
return allow_macro_instructions_; }
1351 Label* gc_required);
1354 Register scratch3, Label* gc_required);
1359 Label* gc_required);
1362 Label* gc_required);
1367 Label* gc_required);
1370 Label* gc_required);
1428 Label* if_cond_pass,
1435 Label* if_not_object);
1509 Label* if_not_equal);
1539 Label* not_string, Label*
string =
NULL);
1548 Label* fall_through);
1553 uint64_t bit_pattern,
1554 Label* if_all_clear,
1556 Label* fall_through);
1575 int elements_offset = 0);
1639 Label* call_runtime);
1650 Label* no_memento_found);
1655 Label* memento_found) {
1656 Label no_memento_found;
1659 B(
eq, memento_found);
1660 Bind(&no_memento_found);
1699 int extra_space = 0);
1713 bool restore_context);
1775 Label* if_all_clear);
1779 Label* if_deprecated);
1829 remembered_set_action,
1831 pointers_to_here_check_for_value);
1865 Label* object_is_white_and_not_data);
1871 Label* not_data_object);
1945 Label* no_map_match);
2110 Label* on_successful_conversion =
NULL,
2111 Label* on_failed_conversion =
NULL);
2118 bool allow_macro_instructions_;
2187 masm_->CheckConstPool(
false,
true);
2188 masm_->CheckVeneerPool(
false,
true);
2190 masm_->StartBlockPools();
2193 masm_->bind(&start_);
2195 previous_allow_macro_instructions_ = masm_->allow_macro_instructions();
2196 masm_->set_allow_macro_instructions(
false);
2201 masm_->EndBlockPools();
2203 if (start_.is_bound()) {
2204 DCHECK(masm_->SizeOfCodeGeneratedSince(&start_) == size_);
2206 masm_->set_allow_macro_instructions(previous_allow_macro_instructions_);
2215 bool previous_allow_macro_instructions_;
2302 const Label* smi_check);
2307 Emit(masm, NoReg, &unbound);
2328 #ifdef GENERATED_CODE_COVERAGE
2329 #error "Unsupported option"
2330 #define CODE_COVERAGE_STRINGIFY(x) #x
2331 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
2332 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
2333 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
2335 #define ACCESS_MASM(masm) masm->
Isolate * isolate() const
void hint(SystemHint code)
void shift(Register dst, Immediate shift_amount, int subcode, int size)
InstructionAccurateScope(MacroAssembler *masm, size_t count=0)
~InstructionAccurateScope()
CPURegister::RegisterType type() const
static int SlotOffset(int index)
const Register & SmiRegister() const
static void EmitNotInlined(MacroAssembler *masm)
static void Emit(MacroAssembler *masm, const Register ®, const Label *smi_check)
InlineSmiCheckInfo(Address info)
Instruction * SmiCheck() const
NoUseRealAbortsScope(MacroAssembler *masm)
PushPopQueue(MacroAssembler *masm)
void Queue(const CPURegister &rt)
void PushQueued(PreambleDirective preamble_directive=WITH_PREAMBLE)
std::vector< CPURegister > queued_
void Fcvtzs(const Register &rd, const FPRegister &fn)
void Mul(const Register &rd, const Register &rn, const Register &rm)
void CallStub(CodeStub *stub, TypeFeedbackId ast_id=TypeFeedbackId::None())
void CmovX(const Register &rd, const Register &rn, Condition cond)
void Asr(const Register &rd, const Register &rn, unsigned shift)
void Msub(const Register &rd, const Register &rn, const Register &rm, const Register &ra)
void PushXRegList(RegList regs)
void JumpIfJSArrayHasAllocationMemento(Register receiver, Register scratch1, Register scratch2, Label *memento_found)
void SyncSystemStackPointer()
void AssertSmi(Register object, BailoutReason reason=kOperandIsNotASmi)
void ExitFrameRestoreFPRegs()
void Sxtb(const Register &rd, const Register &rn)
void InitializeRootRegister()
void Fsub(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
void PopPostamble(int count, int size)
void Throw(Register value, Register scratch1, Register scratch2, Register scratch3, Register scratch4)
void JumpIfDataObject(Register value, Register scratch, Label *not_data_object)
void CanonicalizeNaN(const FPRegister &dst, const FPRegister &src)
void Stnp(const CPURegister &rt, const CPURegister &rt2, const MemOperand &dst)
void AddSubWithCarryMacro(const Register &rd, const Register &rn, const Operand &operand, FlagsUpdate S, AddSubWithCarryOp op)
void Frintz(const FPRegister &fd, const FPRegister &fn)
void PopXRegList(RegList regs)
void Fnmsub(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm, const FPRegister &fa)
void PushPreamble(Operand total_size)
void JumpIfBothInstanceTypesAreNotSequentialOneByte(Register first_object_instance_type, Register second_object_instance_type, Register scratch1, Register scratch2, Label *failure)
void PushTryHandler(StackHandler::Kind kind, int handler_index)
void Bic(const Register &rd, const Register &rn, const Operand &operand)
void AssertFPCRState(Register fpcr=NoReg)
void AnnotateInstrumentation(const char *marker_name)
void CallPrintf(int arg_count=0, const CPURegister *args=NULL)
void InNewSpace(Register object, Condition cond, Label *branch)
void DecodeField(Register reg)
void AddSubMacro(const Register &rd, const Register &rn, const Operand &operand, FlagsUpdate S, AddSubOp op)
void JumpIfEitherInstanceTypeIsNotSequentialOneByte(Register first_object_instance_type, Register second_object_instance_type, Register scratch1, Register scratch2, Label *failure)
void Madd(const Register &rd, const Register &rn, const Register &rm, const Register &ra)
void LoadObject(Register result, Handle< Object > object)
static int CallSize(Handle< Code > code, RelocInfo::Mode rmode=RelocInfo::CODE_TARGET, TypeFeedbackId ast_id=TypeFeedbackId::None())
void Fmaxnm(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
void InitializeNewString(Register string, Register length, Heap::RootListIndex map_index, Register scratch1, Register scratch2)
void Drop(int count, Condition cond=al)
void CompareInstanceType(Register map, Register type_reg, InstanceType type)
void SmiTagAndPush(Register src)
void Dsb(BarrierDomain domain, BarrierType type)
void AssertName(Register object)
void CheckMap(Register obj_map, Handle< Map > map, Label *fail, SmiCheckType smi_check_type)
void Udiv(const Register &rd, const Register &rn, const Register &rm)
void Orr(const Register &rd, const Register &rn, const Operand &operand)
void InvokeFunction(Handle< JSFunction > function, const ParameterCount &expected, const ParameterCount &actual, InvokeFlag flag, const CallWrapper &call_wrapper)
void Neg(const Register &rd, const Operand &operand)
void AllocateOneByteString(Register result, Register length, Register scratch1, Register scratch2, Register scratch3, Label *gc_required)
void Adcs(const Register &rd, const Register &rn, const Operand &operand)
void Fmov(FPRegister fd, T imm)
void TruncateDoubleToI(Register result, DoubleRegister double_input)
void EnterFrame(StackFrame::Type type)
void ExitFramePreserveFPRegs()
void CopyFieldsLoopPairsHelper(Register dst, Register src, unsigned count, Register scratch1, Register scratch2, Register scratch3, Register scratch4, Register scratch5)
void ThrowUncatchable(Register value, Register scratch1, Register scratch2, Register scratch3, Register scratch4)
void Add(const Register &rd, const Register &rn, const Operand &operand)
void LoadContext(Register dst, int context_chain_length)
void Bics(const Register &rd, const Register &rn, const Operand &operand)
void AssertIsString(const Register &object)
void Push(const CPURegister &src0, const CPURegister &src1, const CPURegister &src2, const CPURegister &src3, const CPURegister &src4, const CPURegister &src5=NoReg, const CPURegister &src6=NoReg, const CPURegister &src7=NoReg)
void Mneg(const Register &rd, const Register &rn, const Register &rm)
void Umaddl(const Register &rd, const Register &rn, const Register &rm, const Register &ra)
void CheckPageFlagClear(const Register &object, const Register &scratch, int mask, Label *if_all_clear)
void Adds(const Register &rd, const Register &rn, const Operand &operand)
void SmiUntag(Register reg, SBit s=LeaveCC)
void IsObjectJSStringType(Register object, Register scratch, Label *fail)
void DecodeField(Register dst, Register src)
Handle< Object > CodeObject()
void PopSizeRegList(RegList registers, unsigned reg_size, CPURegister::RegisterType type=CPURegister::kRegister)
void EnterExitFrame(bool save_doubles, const Register &scratch, int extra_space=0)
void Csneg(const Register &rd, const Register &rn, const Register &rm, Condition cond)
void PushMultipleTimes(CPURegister src, Register count)
void Umsubl(const Register &rd, const Register &rn, const Register &rm, const Register &ra)
bool generating_stub() const
void Fabs(const FPRegister &fd, const FPRegister &fn)
void Fmov(FPRegister fd, FPRegister fn)
void CallCFunction(ExternalReference function, int num_reg_arguments)
void FillFields(Register dst, Register field_count, Register filler)
void RecordWriteForMap(Register object, Register map, Register dst, LinkRegisterStatus lr_status, SaveFPRegsMode save_fp)
void Ands(const Register &rd, const Register &rn, const Operand &operand)
static CPURegList DefaultTmpList()
void LoadRoot(CPURegister destination, Heap::RootListIndex index)
Handle< Object > code_object_
void Check(Condition cond, BailoutReason reason)
void TryRepresentDoubleAsInt32(Register as_int, FPRegister value, FPRegister scratch_d, Label *on_successful_conversion=NULL, Label *on_failed_conversion=NULL)
void CallRuntime(Runtime::FunctionId id, int num_arguments, SaveFPRegsMode save_doubles=kDontSaveFPRegs)
void ClampInt32ToUint8(Register output, Register input)
void Uxth(const Register &rd, const Register &rn)
void LoadHeapObject(Register dst, Handle< HeapObject > object)
void EmitCodeAgeSequence(Code *stub)
void CompareObjectMap(Register obj, Register scratch, Handle< Map > map)
void Peek(const CPURegister &dst, const Operand &offset)
void Fdiv(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
void JumpIfInNewSpace(Register object, Label *branch)
void AlignAndSetCSPForFrame()
void Fcvtms(const Register &rd, const FPRegister &fn)
void RecordWrite(Register object, Register address, Register value, LinkRegisterStatus lr_status, SaveFPRegsMode save_fp, RememberedSetAction remembered_set_action=EMIT_REMEMBERED_SET, SmiCheck smi_check=INLINE_SMI_CHECK, PointersToHereCheck pointers_to_here_check_for_value=kPointersToHereMaybeInteresting)
void JumpToExternalReference(const ExternalReference &builtin)
void SetStackPointer(const Register &stack_pointer)
void TryGetFunctionPrototype(Register function, Register result, Register scratch, Label *miss, BoundFunctionAction action=kDontMissOnBoundFunction)
void CompareAndBranch(const Register &lhs, const Operand &rhs, Condition cond, Label *label)
void UndoAllocationInNewSpace(Register object, Register scratch)
void Ngcs(const Register &rd, const Operand &operand)
void CallRuntime(const Runtime::Function *f, int num_arguments, SaveFPRegsMode save_doubles=kDontSaveFPRegs)
void LeaveExitFrame(bool save_doubles, const Register &scratch, bool restore_context)
void LoadFromNumberDictionary(Label *miss, Register elements, Register key, Register result, Register scratch0, Register scratch1, Register scratch2, Register scratch3)
void CanonicalizeNaN(const FPRegister ®)
void Jump(intptr_t target, RelocInfo::Mode rmode)
void CheckRegisterIsClear(Register reg, BailoutReason reason)
void RecordWriteContextSlot(Register context, int offset, Register value, Register scratch, LinkRegisterStatus lr_status, SaveFPRegsMode save_fp, RememberedSetAction remembered_set_action=EMIT_REMEMBERED_SET, SmiCheck smi_check=INLINE_SMI_CHECK, PointersToHereCheck pointers_to_here_check_for_value=kPointersToHereMaybeInteresting)
void Move(Register dst, Register src)
void AssertNotSmi(Register object, BailoutReason reason=kOperandIsASmi)
void InvokeFunction(Register function, const ParameterCount &expected, const ParameterCount &actual, InvokeFlag flag, const CallWrapper &call_wrapper)
void Load(const Register &rt, const MemOperand &addr, Representation r)
void CompareObjectType(Register heap_object, Register map, Register type_reg, InstanceType type)
void JumpIfEitherIsNotSequentialOneByteStrings(Register first, Register second, Register scratch1, Register scratch2, Label *failure, SmiCheckType smi_check=DO_SMI_CHECK)
void Msr(SystemRegister sysreg, const Register &rt)
void RecordWriteField(Register object, int offset, Register value, Register scratch, LinkRegisterStatus lr_status, SaveFPRegsMode save_fp, RememberedSetAction remembered_set_action=EMIT_REMEMBERED_SET, SmiCheck smi_check=INLINE_SMI_CHECK, PointersToHereCheck pointers_to_here_check_for_value=kPointersToHereMaybeInteresting)
void JumpIfMinusZero(Register input, Label *on_negative_zero)
void Lsr(const Register &rd, const Register &rn, unsigned shift)
void CopyFields(Register dst, Register src, CPURegList temps, unsigned count)
void Tst(const Register &rn, const Operand &operand)
void Smsubl(const Register &rd, const Register &rn, const Register &rm, const Register &ra)
void JumpIfBothNotSmi(Register value1, Register value2, Label *not_smi_label)
void Bfxil(const Register &rd, const Register &rn, unsigned lsb, unsigned width)
void InNewSpace(Register object, Register scratch, Condition cond, Label *branch)
void PushSRegList(RegList regs)
void AssertRegisterIsRoot(Register reg, Heap::RootListIndex index, BailoutReason reason=kRegisterDidNotMatchExpectedRoot)
void Sxth(const Register &rd, const Register &rn)
void Abs(const Register &rd, const Register &rm, Label *is_not_representable=NULL, Label *is_representable=NULL)
void BumpSystemStackPointer(const Operand &space)
void Fcvtmu(const Register &rd, const FPRegister &fn)
void CheckMapDeprecated(Handle< Map > map, Register scratch, Label *if_deprecated)
void Fmax(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
void IsObjectNameType(Register object, Register type, Label *fail)
void JumpIfSmi(Register value, Label *smi_label)
void PopHelper(int count, int size, const CPURegister &dst0, const CPURegister &dst1, const CPURegister &dst2, const CPURegister &dst3)
void Fsqrt(const FPRegister &fd, const FPRegister &fn)
void Store(const Register &rt, const MemOperand &addr, Representation r)
void Smull(const Register &rd, const Register &rn, const Register &rm)
void Cmn(const Register &rn, const Operand &operand)
void Ldnp(const CPURegister &rt, const CPURegister &rt2, const MemOperand &src)
static int ActivationFrameAlignment()
void JumpIfObjectType(Register object, Register map, Register type_reg, InstanceType type, Label *if_cond_pass, Condition cond=eq)
void AllocateTwoByteString(Register result, Register length, Register scratch1, Register scratch2, Register scratch3, Label *gc_required)
void InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag, const CallWrapper &call_wrapper=NullCallWrapper())
void Sbc(const Register &rd, const Register &rn, const Operand &operand)
void Fnmadd(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm, const FPRegister &fa)
void Hint(SystemHint code)
void PushCalleeSavedRegisters()
void SmiUntagToDouble(FPRegister dst, Register src, UntagMode mode=kNotSpeculativeUntag)
void TailCallStub(CodeStub *stub)
void Ror(const Register &rd, const Register &rs, unsigned shift)
void EnumLengthSmi(Register dst, Register map)
void Fcvtas(const Register &rd, const FPRegister &fn)
void TestAndBranchIfAllClear(const Register ®, const uint64_t bit_pattern, Label *label)
void Smaddl(const Register &rd, const Register &rn, const Register &rm, const Register &ra)
void B(Label *label, BranchType type, Register reg=NoReg, int bit=-1)
void AllocateOneByteSlicedString(Register result, Register length, Register scratch1, Register scratch2, Label *gc_required)
void Clz(const Register &rd, const Register &rn)
static int SafepointRegisterStackIndex(int reg_code)
void RememberedSetHelper(Register object, Register addr, Register scratch1, SaveFPRegsMode save_fp, RememberedSetFinalAction and_then)
void Bfi(Register dst, Register src, Register scratch, int lsb, int width, Condition cond=al)
void TryConvertDoubleToInt64(Register result, DoubleRegister input, Label *done)
void TestJSArrayForAllocationMemento(Register receiver, Register scratch1, Register scratch2, Label *no_memento_found)
void PushSizeRegList(RegList registers, unsigned reg_size, CPURegister::RegisterType type=CPURegister::kRegister)
void Fmadd(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm, const FPRegister &fa)
void Uxtw(const Register &rd, const Register &rn)
STATIC_ASSERT((reg_zero==(reg_not_zero ^ 1)) &&(reg_bit_clear==(reg_bit_set ^ 1)) &&(always==(never ^ 1)))
void Tbz(const Register &rt, unsigned bit_pos, Label *label)
void LoadGlobalFunctionInitialMap(Register function, Register map, Register scratch)
void Jump(Register target)
void JumpIfNotUniqueNameInstanceType(Register type, Label *not_unique_name)
static int CallSize(Address target, RelocInfo::Mode rmode)
void CopyBytes(Register dst, Register src, Register length, Register scratch, CopyHint hint=kCopyUnknown)
void Allocate(int object_size, Register result, Register scratch1, Register scratch2, Label *gc_required, AllocationFlags flags)
void AssertRegisterIsClear(Register reg, BailoutReason reason)
void Dmb(BarrierDomain domain, BarrierType type)
void Ccmn(const Register &rn, const Operand &operand, StatusFlags nzcv, Condition cond)
void Fmul(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
void Mrs(const Register &rt, SystemRegister sysreg)
void Cinc(const Register &rd, const Register &rn, Condition cond)
void StoreRoot(Register source, Heap::RootListIndex index)
const Register & StackPointer() const
@ kDontMissOnBoundFunction
void Debug(const char *message, uint32_t code, Instr params=BREAK)
void Lsl(const Register &rd, const Register &rn, unsigned shift)
void GetNumberHash(Register key, Register scratch)
void JumpIfMinusZero(DoubleRegister input, Label *on_negative_zero)
void Frintm(const FPRegister &fd, const FPRegister &fn)
void SmiTag(Register reg, SBit s=LeaveCC)
void InlineData(uint64_t data)
void Eor(const Register &rd, const Register &rn, const Operand &operand)
void Fcsel(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm, Condition cond)
void PushWRegList(RegList regs)
void IsInstanceJSObjectType(Register map, Register scratch, Label *fail)
void Fmin(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
void Push(const Register &src0, const FPRegister &src1)
void Sbcs(const Register &rd, const Register &rn, const Operand &operand)
void Allocate(Register object_size, Register result, Register scratch1, Register scratch2, Label *gc_required, AllocationFlags flags)
void LoadTrueFalseRoots(Register true_root, Register false_root)
void AssertString(Register object)
void CheckFastObjectElements(Register map, Register scratch, Label *fail)
void JumpIfEitherNotSmi(Register value1, Register value2, Label *not_smi_label)
void Jump(Handle< Code > code, RelocInfo::Mode rmode)
void Mvn(const Register &rd, const Operand &operand)
void StoreToSafepointRegisterSlot(Register src, Register dst)
void CopyFieldsUnrolledPairsHelper(Register dst, Register src, unsigned count, Register scratch1, Register scratch2, Register scratch3, Register scratch4)
void AssertFastElements(Register elements)
void AllocateTwoByteConsString(Register result, Register length, Register scratch1, Register scratch2, Label *gc_required)
bool AllowThisStubCall(CodeStub *stub)
void JumpIfEitherSmi(Register reg1, Register reg2, Label *on_either_smi)
void ClaimBySMI(const Register &count_smi, uint64_t unit_size=kXRegSize)
void IncrementCounter(StatsCounter *counter, int value, Register scratch1, Register scratch2)
void Ubfiz(const Register &rd, const Register &rn, unsigned lsb, unsigned width)
void Uxtb(const Register &rd, const Register &rn)
void Fneg(const FPRegister &fd, const FPRegister &fn)
void Fcvtzu(const Register &rd, const FPRegister &fn)
void JumpIfRoot(const Register &obj, Heap::RootListIndex index, Label *if_equal)
void PopPostamble(Operand total_size)
void Blr(const Register &xn)
void ObjectTag(Register tagged_obj, Register obj)
void CheckAccessGlobalProxy(Register holder_reg, Register scratch1, Register scratch2, Label *miss)
void Mov(const Register &rd, const Operand &operand, DiscardMoveMode discard_mode=kDontDiscardForSameWReg)
void IndexFromHash(Register hash, Register index)
void Sbfiz(const Register &rd, const Register &rn, unsigned lsb, unsigned width)
void GetBuiltinFunction(Register target, Builtins::JavaScript id)
void Abort(BailoutReason reason)
void LeaveFrame(StackFrame::Type type)
void CompareRoot(const Register &obj, Heap::RootListIndex index)
void JumpIfHeapNumber(Register object, Label *on_heap_number, SmiCheckType smi_check_type=DONT_DO_SMI_CHECK)
void And(Register dst, Register src1, const Operand &src2, Condition cond=al)
void Poke(const CPURegister &src, const Operand &offset)
static bool IsImmMovz(uint64_t imm, unsigned reg_size)
void TailCallExternalReference(const ExternalReference &ext, int num_arguments, int result_size)
void EmitFrameSetupForCodeAgePatching()
bool NeedExtraInstructionsOrRegisterBranch(Label *label, ImmBranchType branch_type)
void InvokeFunction(Register function, const ParameterCount &actual, InvokeFlag flag, const CallWrapper &call_wrapper)
void Csinc(const Register &rd, const Register &rn, const Register &rm, Condition cond)
void DispatchMap(Register obj, Register scratch, Handle< Map > map, Handle< Code > success, SmiCheckType smi_check_type)
void set_generating_stub(bool value)
void DropBySMI(const Register &count_smi, uint64_t unit_size=kXRegSize)
void ClampInt32ToUint8(Register in_out)
void Sdiv(const Register &rd, const Register &rn, const Register &rm)
void Fminnm(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
void GetBuiltinEntry(Register target, Register function, Builtins::JavaScript id)
void InvokeCode(Register code, const ParameterCount &expected, const ParameterCount &actual, InvokeFlag flag, const CallWrapper &call_wrapper)
void JumpIfNotInNewSpace(Register object, Label *branch)
void Negs(const Register &rd, const Operand &operand)
void JumpIfNotRoot(const Register &obj, Heap::RootListIndex index, Label *if_not_equal)
void DisableInstrumentation()
void Fccmp(const FPRegister &fn, const FPRegister &fm, StatusFlags nzcv, Condition cond)
void Fcvtns(const Register &rd, const FPRegister &fn)
static bool IsImmMovn(uint64_t imm, unsigned reg_size)
void LoadInstanceDescriptors(Register map, Register descriptors)
void EnableInstrumentation()
void Csel(const Register &rd, const Register &rn, const Operand &operand, Condition cond)
void GetMarkBits(Register addr_reg, Register bitmap_reg, Register shift_reg)
void set_has_frame(bool value)
static void EmitCodeAgeSequence(Assembler *assm, Code *stub)
void Fadd(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
void Fcmp(const FPRegister &fn, const FPRegister &fm)
void CallCFunction(ExternalReference function, int num_reg_arguments, int num_double_arguments)
static const int kCallApiFunctionSpillSpace
void DecrementCounter(StatsCounter *counter, int value, Register scratch1, Register scratch2)
void Rbit(const Register &rd, const Register &rn)
static bool IsYoungSequence(Isolate *isolate, byte *sequence)
void CheckMap(Register obj, Register scratch, Heap::RootListIndex index, Label *fail, SmiCheckType smi_check_type)
void PushDRegList(RegList regs)
void ClampDoubleToUint8(Register output, DoubleRegister input, DoubleRegister dbl_scratch)
void Fcvtau(const Register &rd, const FPRegister &fn)
void Orn(const Register &rd, const Register &rn, const Operand &operand)
bool use_real_aborts() const
int ActivationFrameAlignment()
static void EmitFrameSetupForCodeAgePatching(Assembler *assm)
void LogicalMacro(const Register &rd, const Register &rn, const Operand &operand, LogicalOp op)
void Frintn(const FPRegister &fd, const FPRegister &fn)
void PokePair(const CPURegister &src1, const CPURegister &src2, int offset)
void Cls(const Register &rd, const Register &rn)
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments, int result_size)
void AllocateTwoByteSlicedString(Register result, Register length, Register scratch1, Register scratch2, Label *gc_required)
void Sbfx(Register dst, Register src, int lsb, int width, Condition cond=al)
void LoadStorePairMacro(const CPURegister &rt, const CPURegister &rt2, const MemOperand &addr, LoadStorePairOp op)
void JumpIfInstanceTypeIsNotSequentialOneByte(Register type, Register scratch, Label *failure)
void AssertHasValidColor(const Register ®)
void PushPreamble(int count, int size)
void Tbnz(const Register &rt, unsigned bit_pos, Label *label)
void PushCPURegList(CPURegList registers)
void Subs(const Register &rd, const Register &rn, const Operand &operand)
void Rev(const Register &rd, const Register &rn)
void Cset(const Register &rd, Condition cond)
void Printf(const char *format, CPURegister arg0=NoCPUReg, CPURegister arg1=NoCPUReg, CPURegister arg2=NoCPUReg, CPURegister arg3=NoCPUReg)
void JumpIfNotSmi(Register value, Label *not_smi_label)
void EnsureNotWhite(Register object, Register scratch1, Register scratch2, Register scratch3, Register scratch4, Label *object_is_white_and_not_data)
void Smulh(const Register &rd, const Register &rn, const Register &rm)
void Assert(Condition cond, BailoutReason reason)
void PrintfNoPreserve(const char *format, const CPURegister &arg0=NoCPUReg, const CPURegister &arg1=NoCPUReg, const CPURegister &arg2=NoCPUReg, const CPURegister &arg3=NoCPUReg)
void LookupNumberStringCache(Register object, Register result, Register scratch1, Register scratch2, Register scratch3, Label *not_found)
void LoadStoreMacro(const CPURegister &rt, const MemOperand &addr, LoadStoreOp op)
void PopWRegList(RegList regs)
void CheckEnumCache(Register object, Register null_value, Register scratch0, Register scratch1, Register scratch2, Register scratch3, Label *call_runtime)
static int CallSize(Register target)
void JumpIfNotHeapNumber(Register object, Label *on_not_heap_number, SmiCheckType smi_check_type=DONT_DO_SMI_CHECK)
void Pop(const CPURegister &dst0, const CPURegister &dst1=NoReg, const CPURegister &dst2=NoReg, const CPURegister &dst3=NoReg)
void EmitSeqStringSetCharCheck(Register string, Register index, SeqStringSetCharCheckIndexType index_type, Register scratch, uint32_t encoding_mask)
void Prologue(bool code_pre_aging)
void Frinta(const FPRegister &fd, const FPRegister &fn)
void CheckFastElements(Register map, Register scratch, Label *fail)
void SetCounter(StatsCounter *counter, int value, Register scratch1, Register scratch2)
void Cneg(const Register &rd, const Register &rn, Condition cond)
void Ucvtf(const FPRegister &fd, const Register &rn, unsigned fbits=0)
void Fmsub(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm, const FPRegister &fa)
void CompareAndSplit(const Register &lhs, const Operand &rhs, Condition cond, Label *if_true, Label *if_false, Label *fall_through)
void PopCPURegList(CPURegList registers)
void PopDRegList(RegList regs)
void Ldr(const CPURegister &rt, const Immediate &imm)
void Ubfx(Register dst, Register src, int lsb, int width, Condition cond=al)
void PeekPair(const CPURegister &dst1, const CPURegister &dst2, int offset)
void TruncatingDiv(Register result, Register dividend, int32_t divisor)
void Cinv(const Register &rd, const Register &rn, Condition cond)
void InvokePrologue(const ParameterCount &expected, const ParameterCount &actual, Handle< Code > code_constant, Register code_reg, Label *done, InvokeFlag flag, bool *definitely_mismatches, const CallWrapper &call_wrapper)
void PushMultipleTimes(CPURegister src, int count)
void LoadFromSafepointRegisterSlot(Register dst, Register src)
void Cmp(const Register &rn, const Operand &operand)
void CallExternalReference(const ExternalReference &ext, int num_arguments)
void JumpToHandlerEntry(Register exception, Register object, Register state, Register scratch1, Register scratch2)
void TestAndBranchIfAnySet(const Register ®, const uint64_t bit_pattern, Label *label)
void CallApiFunctionAndReturn(Register function_address, ExternalReference thunk_ref, int stack_space, int spill_offset, MemOperand return_value_operand, MemOperand *context_restore_operand)
void Push(const CPURegister &src0, const CPURegister &src1=NoReg, const CPURegister &src2=NoReg, const CPURegister &src3=NoReg)
void IsObjectJSObjectType(Register heap_object, Register map, Register scratch, Label *fail)
void JumpIfNotObjectType(Register object, Register map, Register type_reg, InstanceType type, Label *if_not_object)
void GetRelocatedValueLocation(Register ldr_location, Register result)
void JumpIfBothSmi(Register value1, Register value2, Label *both_smi_label, Label *not_smi_label=NULL)
void StoreNumberToDoubleElements(Register value_reg, Register key_reg, Register elements_reg, Register scratch1, FPRegister fpscratch1, Label *fail, int elements_offset=0)
void EnumLengthUntagged(Register dst, Register map)
MacroAssembler(Isolate *isolate, byte *buffer, unsigned buffer_size)
void AssertUndefinedOrAllocationSite(Register object, Register scratch)
void CallCFunction(Register function, int num_reg_arguments, int num_double_arguments)
void Mvn(const Register &rd, uint64_t imm)
void PushSafepointRegistersAndDoubles()
void LoadGlobalFunction(int index, Register function)
void AllocateOneByteConsString(Register result, Register length, Register scratch1, Register scratch2, Label *gc_required)
void AllocateHeapNumber(Register result, Label *gc_required, Register scratch1, Register scratch2, CPURegister value=NoFPReg, CPURegister heap_number_map=NoReg, MutableMode mode=IMMUTABLE)
void PushSafepointRegisters()
void Adr(const Register &rd, Label *label, AdrHint=kAdrNear)
void Fcvt(const FPRegister &fd, const FPRegister &fn)
void Ccmp(const Register &rn, const Operand &operand, StatusFlags nzcv, Condition cond)
void Adc(const Register &rd, const Register &rn, const Operand &operand)
void PopSafepointRegisters()
void PopSRegList(RegList regs)
void Sub(const Register &rd, const Register &rn, const Operand &operand)
void Jump(Address target, RelocInfo::Mode rmode)
void CzeroX(const Register &rd, Condition cond)
void TryRepresentDoubleAsInt64(Register as_int, FPRegister value, FPRegister scratch_d, Label *on_successful_conversion=NULL, Label *on_failed_conversion=NULL)
void Rev16(const Register &rd, const Register &rn)
void CompareObjectMap(Register obj, Heap::RootListIndex index)
void TruncateHeapNumberToI(Register result, Register object)
void Fcvtnu(const Register &rd, const FPRegister &fn)
void ObjectUntag(Register untagged_obj, Register obj)
void LoadElementsKindFromMap(Register result, Register map)
void Mov(const Register &rd, uint64_t imm)
void ConditionalCompareMacro(const Register &rn, const Operand &operand, StatusFlags nzcv, Condition cond, ConditionalCompareOp op)
void Eon(const Register &rd, const Register &rn, const Operand &operand)
void Cbnz(const Register &rt, Label *label)
void Cbz(const Register &rt, Label *label)
void Call(Register target)
void PopCalleeSavedRegisters()
void Csetm(const Register &rd, Condition cond)
void PopSafepointRegistersAndDoubles()
void Csinv(const Register &rd, const Register &rn, const Register &rm, Condition cond)
void TestMapBitfield(Register object, uint64_t mask)
void CheckPageFlagSet(const Register &object, const Register &scratch, int mask, Label *if_any_set)
void CopyFieldsUnrolledHelper(Register dst, Register src, unsigned count, Register scratch1, Register scratch2, Register scratch3)
void TestJSArrayForAllocationMemento(Register receiver_reg, Register scratch_reg, Label *no_memento_found)
void CompareMap(Register obj_map, Handle< Map > map)
void Sxtw(const Register &rd, const Register &rn)
bool TryOneInstrMoveImmediate(const Register &dst, int64_t imm)
void Rev32(const Register &rd, const Register &rn)
void TestAndSplit(const Register ®, uint64_t bit_pattern, Label *if_all_clear, Label *if_any_set, Label *fall_through)
static int CallSize(Label *target)
void Claim(uint64_t count, uint64_t unit_size=kXRegSize)
void Call(Address target, RelocInfo::Mode rmode)
void B(Label *label, Condition cond)
void NumberOfOwnDescriptors(Register dst, Register map)
Operand MoveImmediateForShiftedOp(const Register &dst, int64_t imm)
static unsigned CountClearHalfWords(uint64_t imm, unsigned reg_size)
void PushHelper(int count, int size, const CPURegister &src0, const CPURegister &src1, const CPURegister &src2, const CPURegister &src3)
void SmiUntagToFloat(FPRegister dst, Register src, UntagMode mode=kNotSpeculativeUntag)
void HasColor(Register object, Register scratch0, Register scratch1, Label *has_color, int first_bit, int second_bit)
static CPURegList DefaultFPTmpList()
void TestForMinusZero(DoubleRegister input)
void LoadTransitionedArrayMapConditional(ElementsKind expected_kind, ElementsKind transitioned_kind, Register map_in_out, Register scratch1, Register scratch2, Label *no_map_match)
void AssertStackConsistency()
void JumpIfDictionaryInPrototypeChain(Register object, Register scratch0, Register scratch1, Label *found)
void Extr(const Register &rd, const Register &rn, const Register &rm, unsigned lsb)
void Movk(const Register &rd, uint64_t imm, int shift=-1)
void JumpIfBlack(Register object, Register scratch0, Register scratch1, Label *on_black)
void Call(Handle< Code > code, RelocInfo::Mode rmode=RelocInfo::CODE_TARGET, TypeFeedbackId ast_id=TypeFeedbackId::None())
void TruncateNumberToI(Register object, Register result, Register heap_number_map, Label *not_int32)
void Br(const Register &xn)
void Ngc(const Register &rd, const Operand &operand)
void CheckMap(Register obj, Register scratch, Handle< Map > map, Label *fail, SmiCheckType smi_check_type)
void TryRepresentDoubleAsInt(Register as_int, FPRegister value, FPRegister scratch_d, Label *on_successful_conversion=NULL, Label *on_failed_conversion=NULL)
void CallRuntimeSaveDoubles(Runtime::FunctionId id)
void Push(Handle< Object > handle)
void Scvtf(const FPRegister &fd, const Register &rn, unsigned fbits=0)
static const Function * FunctionForId(FunctionId id)
static TypeFeedbackId None()
FPRegister AcquireSameSizeAs(const FPRegister ®)
Register AcquireSameSizeAs(const Register ®)
static CPURegister UnsafeAcquire(CPURegList *available, const CPURegister ®)
~UseScratchRegisterScope()
CPURegList * availablefp_
Register UnsafeAcquire(const Register ®)
UseScratchRegisterScope(MacroAssembler *masm)
static CPURegister AcquireNextAvailable(CPURegList *available)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi space(in MBytes)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if available(X64 only)") DEFINE_BOOL(enable_vfp3
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK(condition)
#define DECLARE_FUNCTION(FN, REGTYPE, REG, OP)
#define LSPAIR_MACRO_LIST(V)
bool IsPowerOfTwo32(uint32_t value)
const unsigned kDRegSizeInBits
const unsigned kXRegSizeInBits
TypeImpl< ZoneTypeConfig > Type
MemOperand GlobalObjectMemOperand()
const unsigned kWRegSizeInBits
const unsigned kSRegSizeInBits
MemOperand ContextMemOperand(Register context, int index)
Handle< T > handle(T *t, Isolate *isolate)
MemOperand FieldMemOperand(Register object, int offset)
Condition NegateCondition(Condition cond)
@ CAN_INLINE_TARGET_ADDRESS
@ NEVER_INLINE_TARGET_ADDRESS
@ kDontDiscardForSameWReg
BranchType InvertBranchType(BranchType type)
SeqStringSetCharCheckIndexType
MemOperand UntagSmiFieldMemOperand(Register object, int offset)
kFeedbackVectorOffset flag
int CountSetBits(uint64_t value, int width)
const unsigned kInstructionSize
@ kBranchTypeLastCondition
@ kBranchTypeFirstUsingReg
@ kBranchTypeFirstUsingBit
@ kBranchTypeFirstCondition
@ kPointersToHereMaybeInteresting
@ kPointersToHereAreAlwaysInteresting
MemOperand UntagSmiMemOperand(Register object, int offset)
Debugger support for the V8 JavaScript engine.
#define T(name, string, precedence)