5 #ifndef V8_X87_LITHIUM_CODEGEN_X87_H_
6 #define V8_X87_LITHIUM_CODEGEN_X87_H_
25 class SafepointGenerator;
50 return chunk()->LookupDestination(block_id);
59 info()->is_non_deferred_calling() ||
61 info()->requires_frame();
73 bool IsSmi(LConstantOperand* op)
const;
158 #define DECLARE_DO(type) void Do##type(L##type* node);
229 int formal_parameter_count,
238 Safepoint::DeoptMode
mode);
244 return FLAG_deopt_every_n_times != 0 && !info()->IsStub();
248 Translation* translation,
252 int* object_index_pointer,
253 int* dematerialized_index_pointer);
279 Safepoint::Kind kind,
281 Safepoint::DeoptMode
mode);
286 Safepoint::DeoptMode
mode);
294 template<
class InstrType>
296 template<
class InstrType>
312 Label* is_not_object,
320 Label* is_not_string,
346 void EmitReturn(LReturn* instr,
bool dynamic_frame_alignment);
365 void MakeSureStackPagesMapped(
int offset);
454 : codegen_(codegen) {
455 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kSimple);
456 codegen_->masm_->PushSafepointRegisters();
457 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters;
458 DCHECK(codegen_->info()->is_calling());
462 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kWithRegisters);
463 codegen_->masm_->PopSafepointRegisters();
464 codegen_->expected_safepoint_kind_ = Safepoint::kSimple;
Isolate * isolate() const
Source to read snapshot and builtins files from.
~PushSafepointRegistersScope()
PushSafepointRegistersScope(LCodeGen *codegen)
void FlushIfNecessary(LInstruction *instr, LCodeGen *cgen)
Isolate * isolate() const
void Free(X87Register reg)
void push(X87Register reg)
X87Stack & operator=(const X87Stack &other)
void CommitWrite(X87Register reg)
X87Stack(MacroAssembler *masm)
MacroAssembler * masm() const
X87Register stack_[X87Register::kMaxNumAllocatableRegisters]
bool Contains(X87Register reg)
int ArrayIndex(X87Register reg)
X87Stack(const X87Stack &other)
void Fxch(X87Register reg, int other_slot=0)
void LeavingBlock(int current_block_id, LGoto *goto_instr, LCodeGen *cgen)
bool operator==(const X87Stack &other) const
void PrepareToWrite(X87Register reg)
void X87Fxch(X87Register reg, int other_slot=0)
bool IsNextEmittedBlock(int block_id) const
void CallRuntime(const Runtime::Function *fun, int argc, LInstruction *instr, SaveFPRegsMode save_doubles=kDontSaveFPRegs)
Condition EmitTypeofIs(LTypeofIsAndBranch *instr, Register input)
void X87PrepareBinaryOp(X87Register left, X87Register right, X87Register result)
Register ToRegister(int index) const
void DoStoreKeyedFixedArray(LStoreKeyed *instr)
void AddDeferredCode(LDeferredCode *code)
void RecordSafepointWithRegisters(LPointerMap *pointers, int arguments, Safepoint::DeoptMode mode)
@ RECORD_SIMPLE_SAFEPOINT
@ RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS
void EmitDeepCopy(Handle< JSObject > object, Register result, Register source, int *offset, AllocationSiteMode mode)
int inlined_function_count_
bool IsSmi(LConstantOperand *op) const
friend class SafepointGenerator
void EmitBranch(InstrType instr, Condition cc)
TranslationBuffer translations_
Condition EmitIsString(Register input, Register temp1, Label *is_not_string, SmiCheck check_needed)
void EmitFalseBranch(InstrType instr, Condition cc)
Operand BuildSeqStringOperand(Register string, LOperand *index, String::Encoding encoding)
void DoDeferredStackCheck(LStackCheck *instr)
void DeoptimizeIf(Condition cc, LInstruction *instr, const char *detail)
X87Register ToX87Register(LOperand *op) const
SafepointTableBuilder safepoints_
void EmitVectorLoadICRegisters(T *instr)
ZoneList< Handle< Object > > deoptimization_literals_
void X87CommitWrite(X87Register reg)
void X87PrepareToWrite(X87Register reg)
void RecordSafepoint(Safepoint::DeoptMode mode)
bool dynamic_frame_alignment_
void X87Mov(X87Register reg, X87Register src, X87OperandType operand=kX87DoubleOperand)
void PopulateDeoptimizationLiteralsWithInlinedFunctions()
void AddToTranslation(LEnvironment *environment, Translation *translation, LOperand *op, bool is_tagged, bool is_uint32, int *object_index_pointer, int *dematerialized_index_pointer)
ZoneList< LEnvironment * > deoptimizations_
DISALLOW_COPY_AND_ASSIGN(LCodeGen)
void EmitIntegerMathAbs(LMathAbs *instr)
int32_t ToRepresentation(LConstantOperand *op, const Representation &r) const
void CallRuntimeFromDeferred(Runtime::FunctionId id, int argc, LInstruction *instr, LOperand *context)
void EmitPushTaggedOperand(LOperand *operand)
void X87Mov(X87Register reg, Operand src, X87OperandType operand=kX87DoubleOperand)
int32_t ToInteger32(LConstantOperand *op) const
LPlatformChunk * chunk() const
friend class LGapResolver
void FinishCode(Handle< Code > code)
Handle< Object > ToHandle(LConstantOperand *op) const
X87Register ToX87Register(int index) const
ExternalReference ToExternalReference(LConstantOperand *op) const
int LookupDestination(int block_id) const
void DoDeferredAllocate(LAllocate *instr)
void RecordSafepoint(LPointerMap *pointers, Safepoint::Kind kind, int arguments, Safepoint::DeoptMode mode)
void DoDeferredLoadMutableDouble(LLoadFieldByIndex *instr, Register object, Register index)
void DeoptimizeIf(Condition cc, LInstruction *instr, const char *detail, Deoptimizer::BailoutType bailout_type)
void DoDeferredStringCharCodeAt(LStringCharCodeAt *instr)
Safepoint::Kind expected_safepoint_kind_
ZoneList< LDeferredCode * > deferred_
Operand HighOperand(LOperand *op)
bool GenerateDeferredCode()
void RecordSafepoint(LPointerMap *pointers, Safepoint::DeoptMode mode)
void X87Fld(Operand src, X87OperandType opts)
bool NeedsEagerFrame() const
StrictMode strict_mode() const
void CallKnownFunction(Handle< JSFunction > function, int formal_parameter_count, int arity, LInstruction *instr, EDIState edi_state)
void GenerateBodyInstructionPost(LInstruction *instr) OVERRIDE
void RegisterEnvironmentForDeoptimization(LEnvironment *environment, Safepoint::DeoptMode mode)
void LoadContextFromDeferred(LOperand *context)
void CallCodeGeneric(Handle< Code > code, RelocInfo::Mode mode, LInstruction *instr, SafepointMode safepoint_mode)
void GenerateOsrPrologue()
void EmitFlushX87ForDeopt()
Operand BuildFastArrayOperand(LOperand *elements_pointer, LOperand *key, Representation key_representation, ElementsKind elements_kind, uint32_t base_offset)
void X87Free(X87Register reg)
bool NeedsDeferredFrame() const
void DoDeferredInstanceMigration(LCheckMaps *instr, Register object)
bool support_aligned_spilled_doubles_
int DefineDeoptimizationLiteral(Handle< Object > literal)
void EnsureRelocSpaceForDeoptimization()
void X87LoadForUsage(X87Register reg)
void EmitIsConstructCall(Register temp)
int GetStackSlotCount() const
X87StackMap x87_stack_map_
void CallRuntime(Runtime::FunctionId id, int argc, LInstruction *instr)
void WriteTranslation(LEnvironment *environment, Translation *translation)
void DoDeferredMathAbsTaggedHeapNumber(LMathAbs *instr)
void DoLoadKeyedFixedDoubleArray(LLoadKeyed *instr)
void DoDeferredNumberTagIU(LInstruction *instr, LOperand *value, LOperand *temp, IntegerSignedness signedness)
bool GenerateSafepointTable()
void DoDeferredTaggedToI(LTaggedToI *instr, Label *done)
static Condition TokenToCondition(Token::Value op, bool is_unsigned)
void EmitClassOfTest(Label *if_true, Label *if_false, Handle< String > class_name, Register input, Register temporary, Register temporary2)
void DoLoadKeyedExternalArray(LLoadKeyed *instr)
void EmitReturn(LReturn *instr, bool dynamic_frame_alignment)
void EmitNumberUntagDNoSSE2(LNumberUntagD *instr, Register input, Register temp, X87Register res_reg, NumberUntagDMode mode)
Immediate ToImmediate(LOperand *op, const Representation &r) const
double ToDouble(LConstantOperand *op) const
void X87LoadForUsage(X87Register reg1, X87Register reg2)
Register ToRegister(LOperand *op) const
void DoStoreKeyedExternalArray(LStoreKeyed *instr)
void RecordAndWritePosition(int position) OVERRIDE
void X87Mov(Operand src, X87Register reg, X87OperandType operand=kX87DoubleOperand)
bool IsInteger32(LConstantOperand *op) const
void PopulateDeoptimizationData(Handle< Code > code)
void DoParallelMove(LParallelMove *move)
void CallRuntime(const Runtime::Function *function, int num_arguments, LInstruction *instr, SaveFPRegsMode save_doubles=kDontSaveFPRegs)
Operand ToOperand(LOperand *op) const
void CallCode(Handle< Code > code, RelocInfo::Mode mode, LInstruction *instr)
std::map< int, X87Stack * > X87StackMap
void DoDeferredStringCharFromCode(LStringCharFromCode *instr)
void FlushX87StackIfNecessary(LInstruction *instr)
ZoneList< Deoptimizer::JumpTableEntry > jump_table_
Condition EmitIsObject(Register input, Register temp1, Label *is_not_object, Label *is_object)
void EnsureSpaceForLazyDeopt(int space_needed) OVERRIDE
void GenerateBodyInstructionPre(LInstruction *instr) OVERRIDE
void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal *instr, Label *map_check)
void RecordSafepointWithLazyDeopt(LInstruction *instr, SafepointMode safepoint_mode)
void DoLoadKeyedFixedArray(LLoadKeyed *instr)
LCodeGen(LChunk *chunk, MacroAssembler *assembler, CompilationInfo *info)
void DoDeferredNumberTagD(LNumberTagD *instr)
void DoStoreKeyedFixedDoubleArray(LStoreKeyed *instr)
friend class LEnvironment
LDeferredCode(LCodeGen *codegen, const LCodeGen::X87Stack &x87_stack)
MacroAssembler * masm() const
virtual void Generate()=0
const LCodeGen::X87Stack & x87_stack() const
LCodeGen * codegen() const
int instruction_index() const
void SetExit(Label *exit)
virtual LInstruction * instr()=0
LCodeGen::X87Stack x87_stack_
static const Function * FunctionForId(FunctionId id)
enable harmony numeric enable harmony object literal extensions true
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 NULL
#define LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
#define DCHECK(condition)
Debugger support for the V8 JavaScript engine.
static const int kMaxNumAllocatableRegisters
#define T(name, string, precedence)