#ifndef V8_BASELINE_X64_BASELINE_ASSEMBLER_X64_INL_H_
#define V8_BASELINE_X64_BASELINE_ASSEMBLER_X64_INL_H_
#include "src/base/macros.h"
#include "src/baseline/baseline-assembler.h"
#include "src/codegen/x64/register-x64.h"
#include "src/objects/feedback-vector.h"
#include "src/objects/literal-objects-inl.h"
namespace v8 {
namespace internal {
namespace baseline {
detail
class BaselineAssembler::ScratchRegisterScope { … };
namespace detail {
#define __ …
#ifdef DEBUG
inline bool Clobbers(Register target, MemOperand op) { … }
#endif
}
MemOperand BaselineAssembler::RegisterFrameOperand(
interpreter::Register interpreter_register) { … }
void BaselineAssembler::RegisterFrameAddress(
interpreter::Register interpreter_register, Register rscratch) { … }
MemOperand BaselineAssembler::FeedbackVectorOperand() { … }
MemOperand BaselineAssembler::FeedbackCellOperand() { … }
void BaselineAssembler::Bind(Label* label) { … }
void BaselineAssembler::JumpTarget() { … }
void BaselineAssembler::Jump(Label* target, Label::Distance distance) { … }
void BaselineAssembler::JumpIfRoot(Register value, RootIndex index,
Label* target, Label::Distance distance) { … }
void BaselineAssembler::JumpIfNotRoot(Register value, RootIndex index,
Label* target, Label::Distance distance) { … }
void BaselineAssembler::JumpIfSmi(Register value, Label* target,
Label::Distance distance) { … }
void BaselineAssembler::JumpIfNotSmi(Register value, Label* target,
Label::Distance distance) { … }
void BaselineAssembler::TestAndBranch(Register value, int mask, Condition cc,
Label* target, Label::Distance distance) { … }
void BaselineAssembler::JumpIf(Condition cc, Register lhs, const Operand& rhs,
Label* target, Label::Distance distance) { … }
#if V8_STATIC_ROOTS_BOOL
void BaselineAssembler::JumpIfJSAnyIsPrimitive(Register heap_object,
Label* target,
Label::Distance distance) { … }
#endif
void BaselineAssembler::JumpIfObjectTypeFast(Condition cc, Register object,
InstanceType instance_type,
Label* target,
Label::Distance distance) { … }
void BaselineAssembler::JumpIfObjectType(Condition cc, Register object,
InstanceType instance_type,
Register map, Label* target,
Label::Distance distance) { … }
void BaselineAssembler::JumpIfInstanceType(Condition cc, Register map,
InstanceType instance_type,
Label* target,
Label::Distance distance) { … }
void BaselineAssembler::JumpIfPointer(Condition cc, Register value,
MemOperand operand, Label* target,
Label::Distance distance) { … }
void BaselineAssembler::JumpIfSmi(Condition cc, Register lhs, Tagged<Smi> smi,
Label* target, Label::Distance distance) { … }
void BaselineAssembler::JumpIfSmi(Condition cc, Register lhs, Register rhs,
Label* target, Label::Distance distance) { … }
void BaselineAssembler::JumpIfImmediate(Condition cc, Register left, int right,
Label* target,
Label::Distance distance) { … }
void BaselineAssembler::JumpIfTagged(Condition cc, Register value,
MemOperand operand, Label* target,
Label::Distance distance) { … }
void BaselineAssembler::JumpIfTagged(Condition cc, MemOperand operand,
Register value, Label* target,
Label::Distance distance) { … }
void BaselineAssembler::JumpIfByte(Condition cc, Register value, int32_t byte,
Label* target, Label::Distance distance) { … }
void BaselineAssembler::Move(interpreter::Register output, Register source) { … }
void BaselineAssembler::Move(Register output, Tagged<TaggedIndex> value) { … }
void BaselineAssembler::Move(MemOperand output, Register source) { … }
void BaselineAssembler::Move(Register output, ExternalReference reference) { … }
void BaselineAssembler::Move(Register output, Handle<HeapObject> value) { … }
void BaselineAssembler::Move(Register output, int32_t value) { … }
void BaselineAssembler::MoveMaybeSmi(Register output, Register source) { … }
void BaselineAssembler::MoveSmi(Register output, Register source) { … }
namespace detail {
inline void PushSingle(MacroAssembler* masm, RootIndex source) { … }
inline void PushSingle(MacroAssembler* masm, Register reg) { … }
inline void PushSingle(MacroAssembler* masm, Tagged<TaggedIndex> value) { … }
inline void PushSingle(MacroAssembler* masm, Tagged<Smi> value) { … }
inline void PushSingle(MacroAssembler* masm, Handle<HeapObject> object) { … }
inline void PushSingle(MacroAssembler* masm, int32_t immediate) { … }
inline void PushSingle(MacroAssembler* masm, MemOperand operand) { … }
inline void PushSingle(MacroAssembler* masm, interpreter::Register source) { … }
template <typename Arg>
struct PushHelper { … };
template <>
struct PushHelper<interpreter::RegisterList> { … };
template <typename... Args>
struct PushAllHelper;
template <>
struct PushAllHelper<> { … };
PushAllHelper<Arg, Args...>;
}
template <typename... T>
int BaselineAssembler::Push(T... vals) { … }
template <typename... T>
void BaselineAssembler::PushReverse(T... vals) { … }
template <typename... T>
void BaselineAssembler::Pop(T... registers) { … }
void BaselineAssembler::LoadTaggedField(Register output, Register source,
int offset) { … }
void BaselineAssembler::LoadTaggedSignedField(Register output, Register source,
int offset) { … }
void BaselineAssembler::LoadTaggedSignedFieldAndUntag(Register output,
Register source,
int offset) { … }
void BaselineAssembler::LoadWord16FieldZeroExtend(Register output,
Register source, int offset) { … }
void BaselineAssembler::LoadWord8Field(Register output, Register source,
int offset) { … }
void BaselineAssembler::StoreTaggedSignedField(Register target, int offset,
Tagged<Smi> value) { … }
void BaselineAssembler::StoreTaggedFieldWithWriteBarrier(Register target,
int offset,
Register value) { … }
void BaselineAssembler::StoreTaggedFieldNoWriteBarrier(Register target,
int offset,
Register value) { … }
void BaselineAssembler::LoadTaggedField(TaggedRegister output, Register source,
int offset) { … }
void BaselineAssembler::LoadTaggedField(TaggedRegister output,
TaggedRegister source, int offset) { … }
void BaselineAssembler::LoadTaggedField(Register output, TaggedRegister source,
int offset) { … }
void BaselineAssembler::LoadFixedArrayElement(Register output,
TaggedRegister array,
int32_t index) { … }
void BaselineAssembler::LoadFixedArrayElement(TaggedRegister output,
TaggedRegister array,
int32_t index) { … }
void BaselineAssembler::TryLoadOptimizedOsrCode(Register scratch_and_result,
Register feedback_vector,
FeedbackSlot slot,
Label* on_result,
Label::Distance distance) { … }
void BaselineAssembler::AddToInterruptBudgetAndJumpIfNotExceeded(
int32_t weight, Label* skip_interrupt_label) { … }
void BaselineAssembler::AddToInterruptBudgetAndJumpIfNotExceeded(
Register weight, Label* skip_interrupt_label) { … }
void BaselineAssembler::LdaContextSlot(Register context, uint32_t index,
uint32_t depth) { … }
void BaselineAssembler::StaContextSlot(Register context, Register value,
uint32_t index, uint32_t depth) { … }
void BaselineAssembler::LdaModuleVariable(Register context, int cell_index,
uint32_t depth) { … }
void BaselineAssembler::StaModuleVariable(Register context, Register value,
int cell_index, uint32_t depth) { … }
void BaselineAssembler::IncrementSmi(MemOperand lhs) { … }
void BaselineAssembler::Word32And(Register output, Register lhs, int rhs) { … }
void BaselineAssembler::Switch(Register reg, int case_value_base,
Label** labels, int num_labels) { … }
#undef __
#define __ …
void BaselineAssembler::EmitReturn(MacroAssembler* masm) { … }
#undef __
inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
Register reg) { … }
}
}
}
#endif