5#ifndef V8_WASM_WASM_LINKAGE_H_
6#define V8_WASM_WASM_LINKAGE_H_
8#if !V8_ENABLE_WEBASSEMBLY
9#error This header should only be included if WebAssembly is enabled.
25#if V8_TARGET_ARCH_IA32
35#elif V8_TARGET_ARCH_X64
45#elif V8_TARGET_ARCH_ARM
55#elif V8_TARGET_ARCH_ARM64
64#elif V8_TARGET_ARCH_MIPS64
73#elif V8_TARGET_ARCH_LOONG64
82#elif V8_TARGET_ARCH_PPC64
91#elif V8_TARGET_ARCH_S390X
100#elif V8_TARGET_ARCH_RISCV32 || V8_TARGET_ARCH_RISCV64
124#if V8_TARGET_ARCH_PPC64
131#if V8_TARGET_BIG_ENDIAN
136#if V8_TARGET_ARCH_S390X_LE_SIM
150 template <
size_t kNumGpRegs,
size_t kNumFpRegs>
161#if V8_TARGET_ARCH_ARM
165 int next = fp_allocator_.NextSlot(2) / 2;
170 int next = fp_allocator_.NextSlot(2) / 2;
174 int next = fp_allocator_.NextSlot(4) / 2;
193#if V8_TARGET_ARCH_ARM
201 return d_reg_code * 2;
204 int next = fp_allocator_.Allocate(2) / 2;
208 int next = fp_allocator_.Allocate(4) / 2;
209 int d_reg_code =
fp_regs_[next].code();
213 return d_reg_code / 2;
251#if V8_TARGET_ARCH_ARM
266 template <
size_t kNumGpRegs,
size_t kNumFpRegs>
static int NumSlotsForWidth(int bytes)
int AllocateUnaligned(int n)
static LinkageLocation ForRegister(int32_t reg, MachineType type=MachineType::None())
static LinkageLocation ForCallerFrameSlot(int32_t slot, MachineType type)
static MachineType TypeForRepresentation(const MachineRepresentation &rep, bool isSigned=true)
const DoubleRegister *const fp_regs_
int NextStackSlot(MachineRepresentation type)
int NextFpReg(MachineRepresentation rep)
int NumStackSlots() const
bool CanAllocateGP() const
constexpr LinkageAllocator(const Register(&gp)[kNumGpRegs], const DoubleRegister(&fp)[kNumFpRegs])
void SetStackOffset(int offset)
bool CanAllocateFP(MachineRepresentation rep) const
constexpr LinkageAllocator(const Register *gp, int gpc, const DoubleRegister *fp, int fpc)
AlignedSlotAllocator slot_allocator_
const Register *const gp_regs_
int NumStackSlots() const
constexpr LinkageLocationAllocator(const Register(&gp)[kNumGpRegs], const DoubleRegister(&fp)[kNumFpRegs], int slot_offset)
LinkageAllocator allocator_
LinkageLocation Next(MachineRepresentation rep)
constexpr bool kIsFpAlwaysDouble
constexpr DoubleRegister kFpReturnRegisters[]
constexpr Register kGpParamRegisters[]
constexpr DoubleRegister kFpParamRegisters[]
constexpr int kWasmInstanceDataParameterIndex
constexpr bool kIsBigEndianOnSim
uint32_t WasmInterpreterRuntime int64_t r0
constexpr Register kGpReturnRegisters[]
constexpr bool kIsBigEndian
DwVfpRegister DoubleRegister
constexpr bool IsFloatingPoint(MachineRepresentation rep)
constexpr Register kWasmImplicitArgRegister
V8_EXPORT_PRIVATE constexpr int ElementSizeInBytes(MachineRepresentation)
#define DCHECK_LE(v1, v2)
#define DCHECK(condition)
#define DCHECK_LT(v1, v2)
#define DCHECK_EQ(v1, v2)
#define DCHECK_GT(v1, v2)