Commit 0d858b05 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[Liftoff] Allow the assembler to bail out

Currently, the LiftoffCompiler can bail out on unsupported
instructions, but the LiftoffAssembler can not. This makes it difficult
to iteratively implement the platform specific part of the assembler.
With this CL, also the assembler can bail out if an unimplemented
assembler method is called. This allows to test already implemented
methods.

R=ahaas@chromium.org
CC=sreten.kovacevic@mips.com

Bug: v8:6600
Change-Id: Ieb7abc2188266bb93c40fe55fd6ee0e5b1e0d220
Reviewed-on: https://chromium-review.googlesource.com/909390
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51242}
parent 496279bd
......@@ -7,103 +7,110 @@
#include "src/wasm/baseline/liftoff-assembler.h"
#define BAILOUT(reason) bailout("arm " reason)
namespace v8 {
namespace internal {
namespace wasm {
void LiftoffAssembler::ReserveStackSpace(uint32_t stack_slots) {
UNIMPLEMENTED();
BAILOUT("ReserveStackSpace");
}
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
UNIMPLEMENTED();
BAILOUT("LoadConstant");
}
void LiftoffAssembler::LoadFromContext(Register dst, uint32_t offset,
int size) {
UNIMPLEMENTED();
BAILOUT("LoadFromContext");
}
void LiftoffAssembler::SpillContext(Register context) { UNIMPLEMENTED(); }
void LiftoffAssembler::SpillContext(Register context) {
BAILOUT("SpillContext");
}
void LiftoffAssembler::FillContextInto(Register dst) { UNIMPLEMENTED(); }
void LiftoffAssembler::FillContextInto(Register dst) {
BAILOUT("FillContextInto");
}
void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
Register offset_reg, uint32_t offset_imm,
LoadType type, LiftoffRegList pinned,
uint32_t* protected_load_pc) {
UNIMPLEMENTED();
BAILOUT("Load");
}
void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
uint32_t offset_imm, LiftoffRegister src,
StoreType type, LiftoffRegList pinned,
uint32_t* protected_store_pc) {
UNIMPLEMENTED();
BAILOUT("Store");
}
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("LoadCallerFrameSlot");
}
void LiftoffAssembler::MoveStackValue(uint32_t dst_index, uint32_t src_index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("MoveStackValue");
}
void LiftoffAssembler::MoveToReturnRegister(LiftoffRegister reg,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("MoveToReturnRegister");
}
void LiftoffAssembler::Move(Register dst, Register src, ValueType type) {
UNIMPLEMENTED();
BAILOUT("Move Register");
}
void LiftoffAssembler::Move(DoubleRegister dst, DoubleRegister src,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Move DoubleRegister");
}
void LiftoffAssembler::Spill(uint32_t index, LiftoffRegister reg,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Spill register");
}
void LiftoffAssembler::Spill(uint32_t index, WasmValue value) {
UNIMPLEMENTED();
BAILOUT("Spill value");
}
void LiftoffAssembler::Fill(LiftoffRegister reg, uint32_t index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Fill");
}
void LiftoffAssembler::FillI64Half(Register, uint32_t half_index) {
UNREACHABLE();
BAILOUT("FillI64Half");
}
#define UNIMPLEMENTED_GP_BINOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, \
Register rhs) { \
UNIMPLEMENTED(); \
BAILOUT("gp binop"); \
}
#define UNIMPLEMENTED_GP_UNOP(name) \
bool LiftoffAssembler::emit_##name(Register dst, Register src) { \
UNIMPLEMENTED(); \
BAILOUT("gp unop"); \
return true; \
}
#define UNIMPLEMENTED_FP_BINOP(name) \
void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister lhs, \
DoubleRegister rhs) { \
UNIMPLEMENTED(); \
BAILOUT("fp binop"); \
}
#define UNIMPLEMENTED_SHIFTOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, Register rhs, \
LiftoffRegList pinned) { \
UNIMPLEMENTED(); \
BAILOUT("shiftop"); \
}
UNIMPLEMENTED_GP_BINOP(i32_add)
......@@ -128,91 +135,103 @@ UNIMPLEMENTED_FP_BINOP(f32_mul)
#undef UNIMPLEMENTED_FP_BINOP
#undef UNIMPLEMENTED_SHIFTOP
void LiftoffAssembler::emit_i32_test(Register reg) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_i32_test(Register reg) { BAILOUT("emit_i32_test"); }
void LiftoffAssembler::emit_i32_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_i32_compare");
}
void LiftoffAssembler::emit_ptrsize_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_ptrsize_compare");
}
void LiftoffAssembler::emit_jump(Label* label) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_jump(Label* label) { BAILOUT("emit_jump"); }
void LiftoffAssembler::emit_cond_jump(Condition cond, Label* label) {
UNIMPLEMENTED();
BAILOUT("emit_cond_jump");
}
void LiftoffAssembler::emit_i32_set_cond(Condition cond, Register dst) {
UNIMPLEMENTED();
BAILOUT("emit_i32_set_cond");
}
void LiftoffAssembler::StackCheck(Label* ool_code) { UNIMPLEMENTED(); }
void LiftoffAssembler::StackCheck(Label* ool_code) { BAILOUT("StackCheck"); }
void LiftoffAssembler::CallTrapCallbackForTesting() { UNIMPLEMENTED(); }
void LiftoffAssembler::CallTrapCallbackForTesting() {
BAILOUT("CallTrapCallbackForTesting");
}
void LiftoffAssembler::AssertUnreachable(AbortReason reason) {
UNIMPLEMENTED();
BAILOUT("AssertUnreachable");
}
void LiftoffAssembler::PushCallerFrameSlot(const VarState& src,
uint32_t src_index,
RegPairHalf half) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot");
}
void LiftoffAssembler::PushCallerFrameSlot(LiftoffRegister reg) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot reg");
}
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) {
BAILOUT("PushRegisters");
}
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) {
BAILOUT("PopRegisters");
}
void LiftoffAssembler::DropStackSlotsAndRet(uint32_t num_stack_slots) {
UNIMPLEMENTED();
BAILOUT("DropStackSlotsAndRet");
}
void LiftoffAssembler::PrepareCCall(uint32_t num_params, const Register* args) {
UNIMPLEMENTED();
BAILOUT("PrepareCCall");
}
void LiftoffAssembler::SetCCallRegParamAddr(Register dst, uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallRegParamAddr");
}
void LiftoffAssembler::SetCCallStackParamAddr(uint32_t stack_param_idx,
uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallStackParamAddr");
}
void LiftoffAssembler::CallC(ExternalReference ext_ref, uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("CallC");
}
void LiftoffAssembler::CallNativeWasmCode(Address addr) { UNIMPLEMENTED(); }
void LiftoffAssembler::CallNativeWasmCode(Address addr) {
BAILOUT("CallNativeWasmCode");
}
void LiftoffAssembler::CallRuntime(Zone* zone, Runtime::FunctionId fid) {
UNIMPLEMENTED();
BAILOUT("CallRuntime");
}
void LiftoffAssembler::CallIndirect(wasm::FunctionSig* sig,
compiler::CallDescriptor* call_descriptor,
Register target) {
UNIMPLEMENTED();
BAILOUT("CallIndirect");
}
void LiftoffAssembler::AllocateStackSlot(Register addr, uint32_t size) {
UNIMPLEMENTED();
BAILOUT("AllocateStackSlot");
}
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) { UNIMPLEMENTED(); }
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) {
BAILOUT("DeallocateStackSlot");
}
} // namespace wasm
} // namespace internal
} // namespace v8
#undef BAILOUT
#endif // V8_WASM_BASELINE_ARM_LIFTOFF_ASSEMBLER_ARM_H_
......@@ -7,103 +7,110 @@
#include "src/wasm/baseline/liftoff-assembler.h"
#define BAILOUT(reason) bailout("arm64 " reason)
namespace v8 {
namespace internal {
namespace wasm {
void LiftoffAssembler::ReserveStackSpace(uint32_t stack_slots) {
UNIMPLEMENTED();
BAILOUT("ReserveStackSpace");
}
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
UNIMPLEMENTED();
BAILOUT("LoadConstant");
}
void LiftoffAssembler::LoadFromContext(Register dst, uint32_t offset,
int size) {
UNIMPLEMENTED();
BAILOUT("LoadFromContext");
}
void LiftoffAssembler::SpillContext(Register context) { UNIMPLEMENTED(); }
void LiftoffAssembler::SpillContext(Register context) {
BAILOUT("SpillContext");
}
void LiftoffAssembler::FillContextInto(Register dst) { UNIMPLEMENTED(); }
void LiftoffAssembler::FillContextInto(Register dst) {
BAILOUT("FillContextInto");
}
void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
Register offset_reg, uint32_t offset_imm,
LoadType type, LiftoffRegList pinned,
uint32_t* protected_load_pc) {
UNIMPLEMENTED();
BAILOUT("Load");
}
void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
uint32_t offset_imm, LiftoffRegister src,
StoreType type, LiftoffRegList pinned,
uint32_t* protected_store_pc) {
UNIMPLEMENTED();
BAILOUT("Store");
}
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("LoadCallerFrameSlot");
}
void LiftoffAssembler::MoveStackValue(uint32_t dst_index, uint32_t src_index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("MoveStackValue");
}
void LiftoffAssembler::MoveToReturnRegister(LiftoffRegister reg,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("MoveToReturnRegister");
}
void LiftoffAssembler::Move(Register dst, Register src, ValueType type) {
UNIMPLEMENTED();
BAILOUT("Move Register");
}
void LiftoffAssembler::Move(DoubleRegister dst, DoubleRegister src,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Move DoubleRegister");
}
void LiftoffAssembler::Spill(uint32_t index, LiftoffRegister reg,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Spill register");
}
void LiftoffAssembler::Spill(uint32_t index, WasmValue value) {
UNIMPLEMENTED();
BAILOUT("Spill value");
}
void LiftoffAssembler::Fill(LiftoffRegister reg, uint32_t index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Fill");
}
void LiftoffAssembler::FillI64Half(Register, uint32_t half_index) {
UNREACHABLE();
BAILOUT("FillI64Half");
}
#define UNIMPLEMENTED_GP_BINOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, \
Register rhs) { \
UNIMPLEMENTED(); \
BAILOUT("gp binop"); \
}
#define UNIMPLEMENTED_GP_UNOP(name) \
bool LiftoffAssembler::emit_##name(Register dst, Register src) { \
UNIMPLEMENTED(); \
BAILOUT("gp unop"); \
return false; \
}
#define UNIMPLEMENTED_FP_BINOP(name) \
void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister lhs, \
DoubleRegister rhs) { \
UNIMPLEMENTED(); \
BAILOUT("fp binop"); \
}
#define UNIMPLEMENTED_SHIFTOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, Register rhs, \
LiftoffRegList pinned) { \
UNIMPLEMENTED(); \
BAILOUT("shiftop"); \
}
UNIMPLEMENTED_GP_BINOP(i32_add)
......@@ -128,91 +135,103 @@ UNIMPLEMENTED_FP_BINOP(f32_mul)
#undef UNIMPLEMENTED_FP_BINOP
#undef UNIMPLEMENTED_SHIFTOP
void LiftoffAssembler::emit_i32_test(Register reg) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_i32_test(Register reg) { BAILOUT("emit_i32_test"); }
void LiftoffAssembler::emit_i32_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_i32_compare");
}
void LiftoffAssembler::emit_ptrsize_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_ptrsize_compare");
}
void LiftoffAssembler::emit_jump(Label* label) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_jump(Label* label) { BAILOUT("emit_jump"); }
void LiftoffAssembler::emit_cond_jump(Condition cond, Label* label) {
UNIMPLEMENTED();
BAILOUT("emit_cond_jump");
}
void LiftoffAssembler::emit_i32_set_cond(Condition cond, Register dst) {
UNIMPLEMENTED();
BAILOUT("emit_i32_set_cond");
}
void LiftoffAssembler::StackCheck(Label* ool_code) { UNIMPLEMENTED(); }
void LiftoffAssembler::StackCheck(Label* ool_code) { BAILOUT("StackCheck"); }
void LiftoffAssembler::CallTrapCallbackForTesting() { UNIMPLEMENTED(); }
void LiftoffAssembler::CallTrapCallbackForTesting() {
BAILOUT("CallTrapCallbackForTesting");
}
void LiftoffAssembler::AssertUnreachable(AbortReason reason) {
UNIMPLEMENTED();
BAILOUT("AssertUnreachable");
}
void LiftoffAssembler::PushCallerFrameSlot(const VarState& src,
uint32_t src_index,
RegPairHalf half) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot");
}
void LiftoffAssembler::PushCallerFrameSlot(LiftoffRegister reg) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot reg");
}
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) {
BAILOUT("PushRegisters");
}
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) {
BAILOUT("PopRegisters");
}
void LiftoffAssembler::DropStackSlotsAndRet(uint32_t num_stack_slots) {
UNIMPLEMENTED();
BAILOUT("DropStackSlotsAndRet");
}
void LiftoffAssembler::PrepareCCall(uint32_t num_params, const Register* args) {
UNIMPLEMENTED();
BAILOUT("PrepareCCall");
}
void LiftoffAssembler::SetCCallRegParamAddr(Register dst, uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallRegParamAddr");
}
void LiftoffAssembler::SetCCallStackParamAddr(uint32_t stack_param_idx,
uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallStackParamAddr");
}
void LiftoffAssembler::CallC(ExternalReference ext_ref, uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("CallC");
}
void LiftoffAssembler::CallNativeWasmCode(Address addr) { UNIMPLEMENTED(); }
void LiftoffAssembler::CallNativeWasmCode(Address addr) {
BAILOUT("CallNativeWasmCode");
}
void LiftoffAssembler::CallRuntime(Zone* zone, Runtime::FunctionId fid) {
UNIMPLEMENTED();
BAILOUT("CallRuntime");
}
void LiftoffAssembler::CallIndirect(wasm::FunctionSig* sig,
compiler::CallDescriptor* call_descriptor,
Register target) {
UNIMPLEMENTED();
BAILOUT("CallIndirect");
}
void LiftoffAssembler::AllocateStackSlot(Register addr, uint32_t size) {
UNIMPLEMENTED();
BAILOUT("AllocateStackSlot");
}
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) { UNIMPLEMENTED(); }
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) {
BAILOUT("DeallocateStackSlot");
}
} // namespace wasm
} // namespace internal
} // namespace v8
#undef BAILOUT
#endif // V8_WASM_BASELINE_ARM64_LIFTOFF_ASSEMBLER_ARM64_H_
......@@ -23,8 +23,6 @@ namespace wasm {
#if V8_TARGET_ARCH_IA32
constexpr bool kLiftoffAssemblerImplementedOnThisPlatform = true;
constexpr RegList kLiftoffAssemblerGpCacheRegs =
Register::ListOf<eax, ecx, edx, ebx, esi, edi>();
......@@ -34,8 +32,6 @@ constexpr RegList kLiftoffAssemblerFpCacheRegs =
#elif V8_TARGET_ARCH_X64
constexpr bool kLiftoffAssemblerImplementedOnThisPlatform = true;
constexpr RegList kLiftoffAssemblerGpCacheRegs =
Register::ListOf<rax, rcx, rdx, rbx, rsi, rdi>();
......@@ -44,8 +40,6 @@ constexpr RegList kLiftoffAssemblerFpCacheRegs =
#elif V8_TARGET_ARCH_MIPS
constexpr bool kLiftoffAssemblerImplementedOnThisPlatform = false;
constexpr RegList kLiftoffAssemblerGpCacheRegs =
Register::ListOf<a0, a1, a2, a3, t0, t1, t2, t3, t4, t5, t6, s7, v0, v1>();
......@@ -55,8 +49,6 @@ constexpr RegList kLiftoffAssemblerFpCacheRegs =
#elif V8_TARGET_ARCH_MIPS64
constexpr bool kLiftoffAssemblerImplementedOnThisPlatform = false;
constexpr RegList kLiftoffAssemblerGpCacheRegs =
Register::ListOf<a0, a1, a2, a3, a4, a5, a6, a7, t0, t1, t2, s7, v0, v1>();
......@@ -66,8 +58,6 @@ constexpr RegList kLiftoffAssemblerFpCacheRegs =
#else
constexpr bool kLiftoffAssemblerImplementedOnThisPlatform = false;
constexpr RegList kLiftoffAssemblerGpCacheRegs = 0xff;
constexpr RegList kLiftoffAssemblerFpCacheRegs = 0xff;
......@@ -75,6 +65,7 @@ constexpr RegList kLiftoffAssemblerFpCacheRegs = 0xff;
#endif
#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64
constexpr Condition kEqual = equal;
constexpr Condition kUnequal = not_equal;
constexpr Condition kSignedLessThan = less;
......@@ -100,6 +91,7 @@ constexpr Condition kUnsignedGreaterThan = ugt;
constexpr Condition kUnsignedGreaterEqual = uge;
#else
// On unimplemented platforms, just make this compile.
constexpr Condition kEqual = static_cast<Condition>(0);
constexpr Condition kUnequal = static_cast<Condition>(0);
......@@ -111,6 +103,7 @@ constexpr Condition kUnsignedLessThan = static_cast<Condition>(0);
constexpr Condition kUnsignedLessEqual = static_cast<Condition>(0);
constexpr Condition kUnsignedGreaterThan = static_cast<Condition>(0);
constexpr Condition kUnsignedGreaterEqual = static_cast<Condition>(0);
#endif
} // namespace wasm
......
......@@ -442,6 +442,9 @@ class LiftoffAssembler : public TurboAssembler {
CacheState* cache_state() { return &cache_state_; }
bool did_bailout() { return bailout_reason_ != nullptr; }
const char* bailout_reason() const { return bailout_reason_; }
private:
uint32_t num_locals_ = 0;
static constexpr uint32_t kInlineLocalTypes = 8;
......@@ -452,9 +455,14 @@ class LiftoffAssembler : public TurboAssembler {
static_assert(sizeof(ValueType) == 1,
"Reconsider this inlining if ValueType gets bigger");
CacheState cache_state_;
const char* bailout_reason_ = nullptr;
LiftoffRegister SpillOneRegister(LiftoffRegList candidates,
LiftoffRegList pinned);
void bailout(const char* reason) {
if (bailout_reason_ == nullptr) bailout_reason_ = reason;
}
};
std::ostream& operator<<(std::ostream& os, LiftoffAssembler::VarState);
......
......@@ -157,6 +157,12 @@ class LiftoffCompiler {
BindUnboundLabels(decoder);
}
bool DidAssemblerBailout(Decoder* decoder) {
if (decoder->failed() || !asm_->did_bailout()) return false;
unsupported(decoder, asm_->bailout_reason());
return true;
}
bool CheckSupportedType(Decoder* decoder,
Vector<const ValueType> supported_types,
ValueType type, const char* context) {
......@@ -264,13 +270,16 @@ class LiftoffCompiler {
}
void StartFunctionBody(Decoder* decoder, Control* block) {
if (!kLiftoffAssemblerImplementedOnThisPlatform) {
unsupported(decoder, "platform");
return;
}
__ EnterFrame(StackFrame::WASM_COMPILED);
__ set_has_frame(true);
__ ReserveStackSpace(__ GetTotalFrameSlotCount());
// {ReserveStackSpace} is the first platform-specific assembler method.
// If this failed, we can bail out immediately, avoiding runtime overhead
// and potential failures because of other unimplemented methods.
// A platform implementing {ReserveStackSpace} must ensure that we can
// finish compilation without errors even if we hit unimplemented
// LiftoffAssembler methods.
if (DidAssemblerBailout(decoder)) return;
// Parameter 0 is the wasm context.
uint32_t num_params =
static_cast<uint32_t>(decoder->sig_->parameter_count());
......@@ -368,6 +377,7 @@ class LiftoffCompiler {
}
void FinishFunction(Decoder* decoder) {
if (DidAssemblerBailout(decoder)) return;
for (OutOfLineCode& ool : out_of_line_code_) {
GenerateOutOfLineCode(ool);
}
......
......@@ -7,6 +7,8 @@
#include "src/wasm/baseline/liftoff-assembler.h"
#define BAILOUT(reason) bailout("mips " reason)
namespace v8 {
namespace internal {
namespace wasm {
......@@ -69,25 +71,25 @@ void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
Register offset_reg, uint32_t offset_imm,
LoadType type, LiftoffRegList pinned,
uint32_t* protected_load_pc) {
UNIMPLEMENTED();
BAILOUT("Load");
}
void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
uint32_t offset_imm, LiftoffRegister src,
StoreType type, LiftoffRegList pinned,
uint32_t* protected_store_pc) {
UNIMPLEMENTED();
BAILOUT("Store");
}
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("LoadCallerFrameSlot");
}
void LiftoffAssembler::MoveStackValue(uint32_t dst_index, uint32_t src_index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("MoveStackValue");
}
void LiftoffAssembler::MoveToReturnRegister(LiftoffRegister reg,
......@@ -114,40 +116,41 @@ void LiftoffAssembler::Move(DoubleRegister dst, DoubleRegister src,
void LiftoffAssembler::Spill(uint32_t index, LiftoffRegister reg,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Spill register");
}
void LiftoffAssembler::Spill(uint32_t index, WasmValue value) {
UNIMPLEMENTED();
BAILOUT("Spill value");
}
void LiftoffAssembler::Fill(LiftoffRegister reg, uint32_t index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Fill");
}
void LiftoffAssembler::FillI64Half(Register, uint32_t half_index) {
UNREACHABLE();
BAILOUT("FillI64Half");
}
#define UNIMPLEMENTED_GP_BINOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, \
Register rhs) { \
UNIMPLEMENTED(); \
BAILOUT("gp binop"); \
}
#define UNIMPLEMENTED_GP_UNOP(name) \
bool LiftoffAssembler::emit_##name(Register dst, Register src) { \
UNIMPLEMENTED(); \
BAILOUT("gp unop"); \
return false; \
}
#define UNIMPLEMENTED_FP_BINOP(name) \
void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister lhs, \
DoubleRegister rhs) { \
UNIMPLEMENTED(); \
BAILOUT("fp binop"); \
}
#define UNIMPLEMENTED_SHIFTOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, Register rhs, \
LiftoffRegList pinned) { \
UNIMPLEMENTED(); \
BAILOUT("shiftop"); \
}
UNIMPLEMENTED_GP_BINOP(i32_add)
......@@ -172,47 +175,53 @@ UNIMPLEMENTED_FP_BINOP(f32_mul)
#undef UNIMPLEMENTED_FP_BINOP
#undef UNIMPLEMENTED_SHIFTOP
void LiftoffAssembler::emit_i32_test(Register reg) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_i32_test(Register reg) { BAILOUT("emit_i32_test"); }
void LiftoffAssembler::emit_i32_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_i32_compare");
}
void LiftoffAssembler::emit_ptrsize_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_ptrsize_compare");
}
void LiftoffAssembler::emit_jump(Label* label) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_jump(Label* label) { BAILOUT("emit_jump"); }
void LiftoffAssembler::emit_cond_jump(Condition cond, Label* label) {
UNIMPLEMENTED();
BAILOUT("emit_cond_jump");
}
void LiftoffAssembler::emit_i32_set_cond(Condition cond, Register dst) {
UNIMPLEMENTED();
BAILOUT("emit_i32_set_cond");
}
void LiftoffAssembler::StackCheck(Label* ool_code) { UNIMPLEMENTED(); }
void LiftoffAssembler::StackCheck(Label* ool_code) { BAILOUT("StackCheck"); }
void LiftoffAssembler::CallTrapCallbackForTesting() { UNIMPLEMENTED(); }
void LiftoffAssembler::CallTrapCallbackForTesting() {
BAILOUT("CallTrapCallbackForTesting");
}
void LiftoffAssembler::AssertUnreachable(AbortReason reason) {
UNIMPLEMENTED();
BAILOUT("AssertUnreachable");
}
void LiftoffAssembler::PushCallerFrameSlot(const VarState& src,
uint32_t src_index,
RegPairHalf half) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot");
}
void LiftoffAssembler::PushCallerFrameSlot(LiftoffRegister reg) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot reg");
}
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) {
BAILOUT("PushRegisters");
}
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) {
BAILOUT("PopRegisters");
}
void LiftoffAssembler::DropStackSlotsAndRet(uint32_t num_stack_slots) {
DCHECK_LT(num_stack_slots, (1 << 16) / kPointerSize); // 16 bit immediate
......@@ -220,44 +229,50 @@ void LiftoffAssembler::DropStackSlotsAndRet(uint32_t num_stack_slots) {
}
void LiftoffAssembler::PrepareCCall(uint32_t num_params, const Register* args) {
UNIMPLEMENTED();
BAILOUT("PrepareCCall");
}
void LiftoffAssembler::SetCCallRegParamAddr(Register dst, uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallRegParamAddr");
}
void LiftoffAssembler::SetCCallStackParamAddr(uint32_t stack_param_idx,
uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallStackParamAddr");
}
void LiftoffAssembler::CallC(ExternalReference ext_ref, uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("CallC");
}
void LiftoffAssembler::CallNativeWasmCode(Address addr) { UNIMPLEMENTED(); }
void LiftoffAssembler::CallNativeWasmCode(Address addr) {
BAILOUT("CallNativeWasmCode");
}
void LiftoffAssembler::CallRuntime(Zone* zone, Runtime::FunctionId fid) {
UNIMPLEMENTED();
BAILOUT("CallRuntime");
}
void LiftoffAssembler::CallIndirect(wasm::FunctionSig* sig,
compiler::CallDescriptor* call_descriptor,
Register target) {
UNIMPLEMENTED();
BAILOUT("CallIndirect");
}
void LiftoffAssembler::AllocateStackSlot(Register addr, uint32_t size) {
UNIMPLEMENTED();
BAILOUT("AllocateStackSlot");
}
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) { UNIMPLEMENTED(); }
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) {
BAILOUT("DeallocateStackSlot");
}
} // namespace wasm
} // namespace internal
} // namespace v8
#undef BAILOUT
#endif // V8_WASM_BASELINE_MIPS_LIFTOFF_ASSEMBLER_MIPS_H_
......@@ -7,6 +7,8 @@
#include "src/wasm/baseline/liftoff-assembler.h"
#define BAILOUT(reason) bailout("mips64 " reason)
namespace v8 {
namespace internal {
namespace wasm {
......@@ -68,25 +70,25 @@ void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
Register offset_reg, uint32_t offset_imm,
LoadType type, LiftoffRegList pinned,
uint32_t* protected_load_pc) {
UNIMPLEMENTED();
BAILOUT("Load");
}
void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
uint32_t offset_imm, LiftoffRegister src,
StoreType type, LiftoffRegList pinned,
uint32_t* protected_store_pc) {
UNIMPLEMENTED();
BAILOUT("Store");
}
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("LoadCallerFrameSlot");
}
void LiftoffAssembler::MoveStackValue(uint32_t dst_index, uint32_t src_index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("MoveStackValue");
}
void LiftoffAssembler::MoveToReturnRegister(LiftoffRegister reg,
......@@ -109,16 +111,16 @@ void LiftoffAssembler::Move(DoubleRegister dst, DoubleRegister src,
void LiftoffAssembler::Spill(uint32_t index, LiftoffRegister reg,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Spill register");
}
void LiftoffAssembler::Spill(uint32_t index, WasmValue value) {
UNIMPLEMENTED();
BAILOUT("Spill value");
}
void LiftoffAssembler::Fill(LiftoffRegister reg, uint32_t index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Fill");
}
void LiftoffAssembler::FillI64Half(Register, uint32_t half_index) {
......@@ -128,21 +130,22 @@ void LiftoffAssembler::FillI64Half(Register, uint32_t half_index) {
#define UNIMPLEMENTED_GP_BINOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, \
Register rhs) { \
UNIMPLEMENTED(); \
BAILOUT("gp binop"); \
}
#define UNIMPLEMENTED_GP_UNOP(name) \
bool LiftoffAssembler::emit_##name(Register dst, Register src) { \
UNIMPLEMENTED(); \
BAILOUT("gp unop"); \
return false; \
}
#define UNIMPLEMENTED_FP_BINOP(name) \
void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister lhs, \
DoubleRegister rhs) { \
UNIMPLEMENTED(); \
BAILOUT("fp binop"); \
}
#define UNIMPLEMENTED_SHIFTOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, Register rhs, \
LiftoffRegList pinned) { \
UNIMPLEMENTED(); \
BAILOUT("shiftop"); \
}
UNIMPLEMENTED_GP_BINOP(i32_add)
......@@ -167,47 +170,53 @@ UNIMPLEMENTED_FP_BINOP(f32_mul)
#undef UNIMPLEMENTED_FP_BINOP
#undef UNIMPLEMENTED_SHIFTOP
void LiftoffAssembler::emit_i32_test(Register reg) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_i32_test(Register reg) { BAILOUT("emit_i32_test"); }
void LiftoffAssembler::emit_i32_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_i32_compare");
}
void LiftoffAssembler::emit_ptrsize_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_ptrsize_compare");
}
void LiftoffAssembler::emit_jump(Label* label) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_jump(Label* label) { BAILOUT("emit_jump"); }
void LiftoffAssembler::emit_cond_jump(Condition cond, Label* label) {
UNIMPLEMENTED();
BAILOUT("emit_cond_jump");
}
void LiftoffAssembler::emit_i32_set_cond(Condition cond, Register dst) {
UNIMPLEMENTED();
BAILOUT("emit_i32_set_cond");
}
void LiftoffAssembler::StackCheck(Label* ool_code) { UNIMPLEMENTED(); }
void LiftoffAssembler::StackCheck(Label* ool_code) { BAILOUT("StackCheck"); }
void LiftoffAssembler::CallTrapCallbackForTesting() { UNIMPLEMENTED(); }
void LiftoffAssembler::CallTrapCallbackForTesting() {
BAILOUT("CallTrapCallbackForTesting");
}
void LiftoffAssembler::AssertUnreachable(AbortReason reason) {
UNIMPLEMENTED();
BAILOUT("AssertUnreachable");
}
void LiftoffAssembler::PushCallerFrameSlot(const VarState& src,
uint32_t src_index,
RegPairHalf half) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot");
}
void LiftoffAssembler::PushCallerFrameSlot(LiftoffRegister reg) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot reg");
}
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) {
BAILOUT("PushRegisters");
}
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) {
BAILOUT("PopRegisters");
}
void LiftoffAssembler::DropStackSlotsAndRet(uint32_t num_stack_slots) {
DCHECK_LT(num_stack_slots, (1 << 16) / kPointerSize);
......@@ -215,44 +224,50 @@ void LiftoffAssembler::DropStackSlotsAndRet(uint32_t num_stack_slots) {
}
void LiftoffAssembler::PrepareCCall(uint32_t num_params, const Register* args) {
UNIMPLEMENTED();
BAILOUT("PrepareCCall");
}
void LiftoffAssembler::SetCCallRegParamAddr(Register dst, uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallRegParamAddr");
}
void LiftoffAssembler::SetCCallStackParamAddr(uint32_t stack_param_idx,
uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallStackParamAddr");
}
void LiftoffAssembler::CallC(ExternalReference ext_ref, uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("CallC");
}
void LiftoffAssembler::CallNativeWasmCode(Address addr) { UNIMPLEMENTED(); }
void LiftoffAssembler::CallNativeWasmCode(Address addr) {
BAILOUT("CallNativeWasmCode");
}
void LiftoffAssembler::CallRuntime(Zone* zone, Runtime::FunctionId fid) {
UNIMPLEMENTED();
BAILOUT("CallRuntime");
}
void LiftoffAssembler::CallIndirect(wasm::FunctionSig* sig,
compiler::CallDescriptor* call_descriptor,
Register target) {
UNIMPLEMENTED();
BAILOUT("CallIndirect");
}
void LiftoffAssembler::AllocateStackSlot(Register addr, uint32_t size) {
UNIMPLEMENTED();
BAILOUT("AllocateStackSlot");
}
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) { UNIMPLEMENTED(); }
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) {
BAILOUT("DeallocateStackSlot");
}
} // namespace wasm
} // namespace internal
} // namespace v8
#undef BAILOUT
#endif // V8_WASM_BASELINE_MIPS64_LIFTOFF_ASSEMBLER_MIPS64_H_
......@@ -7,103 +7,110 @@
#include "src/wasm/baseline/liftoff-assembler.h"
#define BAILOUT(reason) bailout("ppc " reason)
namespace v8 {
namespace internal {
namespace wasm {
void LiftoffAssembler::ReserveStackSpace(uint32_t stack_slots) {
UNIMPLEMENTED();
BAILOUT("ReserveStackSpace");
}
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
UNIMPLEMENTED();
BAILOUT("LoadConstant");
}
void LiftoffAssembler::LoadFromContext(Register dst, uint32_t offset,
int size) {
UNIMPLEMENTED();
BAILOUT("LoadFromContext");
}
void LiftoffAssembler::SpillContext(Register context) { UNIMPLEMENTED(); }
void LiftoffAssembler::SpillContext(Register context) {
BAILOUT("SpillContext");
}
void LiftoffAssembler::FillContextInto(Register dst) { UNIMPLEMENTED(); }
void LiftoffAssembler::FillContextInto(Register dst) {
BAILOUT("FillContextInto");
}
void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
Register offset_reg, uint32_t offset_imm,
LoadType type, LiftoffRegList pinned,
uint32_t* protected_load_pc) {
UNIMPLEMENTED();
BAILOUT("Load");
}
void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
uint32_t offset_imm, LiftoffRegister src,
StoreType type, LiftoffRegList pinned,
uint32_t* protected_store_pc) {
UNIMPLEMENTED();
BAILOUT("Store");
}
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("LoadCallerFrameSlot");
}
void LiftoffAssembler::MoveStackValue(uint32_t dst_index, uint32_t src_index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("MoveStackValue");
}
void LiftoffAssembler::MoveToReturnRegister(LiftoffRegister reg,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("MoveToReturnRegister");
}
void LiftoffAssembler::Move(Register dst, Register src, ValueType type) {
UNIMPLEMENTED();
BAILOUT("Move Register");
}
void LiftoffAssembler::Move(DoubleRegister dst, DoubleRegister src,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Move DoubleRegister");
}
void LiftoffAssembler::Spill(uint32_t index, LiftoffRegister reg,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Spill register");
}
void LiftoffAssembler::Spill(uint32_t index, WasmValue value) {
UNIMPLEMENTED();
BAILOUT("Spill value");
}
void LiftoffAssembler::Fill(LiftoffRegister reg, uint32_t index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Fill");
}
void LiftoffAssembler::FillI64Half(Register, uint32_t half_index) {
UNREACHABLE();
BAILOUT("FillI64Half");
}
#define UNIMPLEMENTED_GP_BINOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, \
Register rhs) { \
UNIMPLEMENTED(); \
BAILOUT("gp binop"); \
}
#define UNIMPLEMENTED_GP_UNOP(name) \
bool LiftoffAssembler::emit_##name(Register dst, Register src) { \
UNIMPLEMENTED(); \
BAILOUT("gp unop"); \
return false; \
}
#define UNIMPLEMENTED_FP_BINOP(name) \
void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister lhs, \
DoubleRegister rhs) { \
UNIMPLEMENTED(); \
BAILOUT("fp binop"); \
}
#define UNIMPLEMENTED_SHIFTOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, Register rhs, \
LiftoffRegList pinned) { \
UNIMPLEMENTED(); \
BAILOUT("shiftop"); \
}
UNIMPLEMENTED_GP_BINOP(i32_add)
......@@ -128,91 +135,103 @@ UNIMPLEMENTED_FP_BINOP(f32_mul)
#undef UNIMPLEMENTED_FP_BINOP
#undef UNIMPLEMENTED_SHIFTOP
void LiftoffAssembler::emit_i32_test(Register reg) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_i32_test(Register reg) { BAILOUT("emit_i32_test"); }
void LiftoffAssembler::emit_i32_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_i32_compare");
}
void LiftoffAssembler::emit_ptrsize_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_ptrsize_compare");
}
void LiftoffAssembler::emit_jump(Label* label) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_jump(Label* label) { BAILOUT("emit_jump"); }
void LiftoffAssembler::emit_cond_jump(Condition cond, Label* label) {
UNIMPLEMENTED();
BAILOUT("emit_cond_jump");
}
void LiftoffAssembler::emit_i32_set_cond(Condition cond, Register dst) {
UNIMPLEMENTED();
BAILOUT("emit_i32_set_cond");
}
void LiftoffAssembler::StackCheck(Label* ool_code) { UNIMPLEMENTED(); }
void LiftoffAssembler::StackCheck(Label* ool_code) { BAILOUT("StackCheck"); }
void LiftoffAssembler::CallTrapCallbackForTesting() { UNIMPLEMENTED(); }
void LiftoffAssembler::CallTrapCallbackForTesting() {
BAILOUT("CallTrapCallbackForTesting");
}
void LiftoffAssembler::AssertUnreachable(AbortReason reason) {
UNIMPLEMENTED();
BAILOUT("AssertUnreachable");
}
void LiftoffAssembler::PushCallerFrameSlot(const VarState& src,
uint32_t src_index,
RegPairHalf half) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot");
}
void LiftoffAssembler::PushCallerFrameSlot(LiftoffRegister reg) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot reg");
}
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) {
BAILOUT("PushRegisters");
}
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) {
BAILOUT("PopRegisters");
}
void LiftoffAssembler::DropStackSlotsAndRet(uint32_t num_stack_slots) {
UNIMPLEMENTED();
BAILOUT("DropStackSlotsAndRet");
}
void LiftoffAssembler::PrepareCCall(uint32_t num_params, const Register* args) {
UNIMPLEMENTED();
BAILOUT("PrepareCCall");
}
void LiftoffAssembler::SetCCallRegParamAddr(Register dst, uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallRegParamAddr");
}
void LiftoffAssembler::SetCCallStackParamAddr(uint32_t stack_param_idx,
uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallStackParamAddr");
}
void LiftoffAssembler::CallC(ExternalReference ext_ref, uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("CallC");
}
void LiftoffAssembler::CallNativeWasmCode(Address addr) { UNIMPLEMENTED(); }
void LiftoffAssembler::CallNativeWasmCode(Address addr) {
BAILOUT("CallNativeWasmCode");
}
void LiftoffAssembler::CallRuntime(Zone* zone, Runtime::FunctionId fid) {
UNIMPLEMENTED();
BAILOUT("CallRuntime");
}
void LiftoffAssembler::CallIndirect(wasm::FunctionSig* sig,
compiler::CallDescriptor* call_descriptor,
Register target) {
UNIMPLEMENTED();
BAILOUT("CallIndirect");
}
void LiftoffAssembler::AllocateStackSlot(Register addr, uint32_t size) {
UNIMPLEMENTED();
BAILOUT("AllocateStackSlot");
}
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) { UNIMPLEMENTED(); }
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) {
BAILOUT("DeallocateStackSlot");
}
} // namespace wasm
} // namespace internal
} // namespace v8
#undef BAILOUT
#endif // V8_WASM_BASELINE_PPC_LIFTOFF_ASSEMBLER_PPC_H_
......@@ -7,103 +7,110 @@
#include "src/wasm/baseline/liftoff-assembler.h"
#define BAILOUT(reason) bailout("s390 " reason)
namespace v8 {
namespace internal {
namespace wasm {
void LiftoffAssembler::ReserveStackSpace(uint32_t stack_slots) {
UNIMPLEMENTED();
BAILOUT("ReserveStackSpace");
}
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
UNIMPLEMENTED();
BAILOUT("LoadConstant");
}
void LiftoffAssembler::LoadFromContext(Register dst, uint32_t offset,
int size) {
UNIMPLEMENTED();
BAILOUT("LoadFromContext");
}
void LiftoffAssembler::SpillContext(Register context) { UNIMPLEMENTED(); }
void LiftoffAssembler::SpillContext(Register context) {
BAILOUT("SpillContext");
}
void LiftoffAssembler::FillContextInto(Register dst) { UNIMPLEMENTED(); }
void LiftoffAssembler::FillContextInto(Register dst) {
BAILOUT("FillContextInto");
}
void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
Register offset_reg, uint32_t offset_imm,
LoadType type, LiftoffRegList pinned,
uint32_t* protected_load_pc) {
UNIMPLEMENTED();
BAILOUT("Load");
}
void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
uint32_t offset_imm, LiftoffRegister src,
StoreType type, LiftoffRegList pinned,
uint32_t* protected_store_pc) {
UNIMPLEMENTED();
BAILOUT("Store");
}
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("LoadCallerFrameSlot");
}
void LiftoffAssembler::MoveStackValue(uint32_t dst_index, uint32_t src_index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("MoveStackValue");
}
void LiftoffAssembler::MoveToReturnRegister(LiftoffRegister reg,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("MoveToReturnRegister");
}
void LiftoffAssembler::Move(Register dst, Register src, ValueType type) {
UNIMPLEMENTED();
BAILOUT("Move Register");
}
void LiftoffAssembler::Move(DoubleRegister dst, DoubleRegister src,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Move DoubleRegister");
}
void LiftoffAssembler::Spill(uint32_t index, LiftoffRegister reg,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Spill register");
}
void LiftoffAssembler::Spill(uint32_t index, WasmValue value) {
UNIMPLEMENTED();
BAILOUT("Spill value");
}
void LiftoffAssembler::Fill(LiftoffRegister reg, uint32_t index,
ValueType type) {
UNIMPLEMENTED();
BAILOUT("Fill");
}
void LiftoffAssembler::FillI64Half(Register, uint32_t half_index) {
UNREACHABLE();
BAILOUT("FillI64Half");
}
#define UNIMPLEMENTED_GP_BINOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, \
Register rhs) { \
UNIMPLEMENTED(); \
BAILOUT("gp binop"); \
}
#define UNIMPLEMENTED_GP_UNOP(name) \
bool LiftoffAssembler::emit_##name(Register dst, Register src) { \
UNIMPLEMENTED(); \
BAILOUT("gp unop"); \
return false; \
}
#define UNIMPLEMENTED_FP_BINOP(name) \
void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister lhs, \
DoubleRegister rhs) { \
UNIMPLEMENTED(); \
BAILOUT("fp binop"); \
}
#define UNIMPLEMENTED_SHIFTOP(name) \
void LiftoffAssembler::emit_##name(Register dst, Register lhs, Register rhs, \
LiftoffRegList pinned) { \
UNIMPLEMENTED(); \
BAILOUT("shiftop"); \
}
UNIMPLEMENTED_GP_BINOP(i32_add)
......@@ -128,91 +135,103 @@ UNIMPLEMENTED_FP_BINOP(f32_mul)
#undef UNIMPLEMENTED_FP_BINOP
#undef UNIMPLEMENTED_SHIFTOP
void LiftoffAssembler::emit_i32_test(Register reg) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_i32_test(Register reg) { BAILOUT("emit_i32_test"); }
void LiftoffAssembler::emit_i32_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_i32_compare");
}
void LiftoffAssembler::emit_ptrsize_compare(Register lhs, Register rhs) {
UNIMPLEMENTED();
BAILOUT("emit_ptrsize_compare");
}
void LiftoffAssembler::emit_jump(Label* label) { UNIMPLEMENTED(); }
void LiftoffAssembler::emit_jump(Label* label) { BAILOUT("emit_jump"); }
void LiftoffAssembler::emit_cond_jump(Condition cond, Label* label) {
UNIMPLEMENTED();
BAILOUT("emit_cond_jump");
}
void LiftoffAssembler::emit_i32_set_cond(Condition cond, Register dst) {
UNIMPLEMENTED();
BAILOUT("emit_i32_set_cond");
}
void LiftoffAssembler::StackCheck(Label* ool_code) { UNIMPLEMENTED(); }
void LiftoffAssembler::StackCheck(Label* ool_code) { BAILOUT("StackCheck"); }
void LiftoffAssembler::CallTrapCallbackForTesting() { UNIMPLEMENTED(); }
void LiftoffAssembler::CallTrapCallbackForTesting() {
BAILOUT("CallTrapCallbackForTesting");
}
void LiftoffAssembler::AssertUnreachable(AbortReason reason) {
UNIMPLEMENTED();
BAILOUT("AssertUnreachable");
}
void LiftoffAssembler::PushCallerFrameSlot(const VarState& src,
uint32_t src_index,
RegPairHalf half) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot");
}
void LiftoffAssembler::PushCallerFrameSlot(LiftoffRegister reg) {
UNIMPLEMENTED();
BAILOUT("PushCallerFrameSlot reg");
}
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) {
BAILOUT("PushRegisters");
}
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) { UNIMPLEMENTED(); }
void LiftoffAssembler::PopRegisters(LiftoffRegList regs) {
BAILOUT("PopRegisters");
}
void LiftoffAssembler::DropStackSlotsAndRet(uint32_t num_stack_slots) {
UNIMPLEMENTED();
BAILOUT("DropStackSlotsAndRet");
}
void LiftoffAssembler::PrepareCCall(uint32_t num_params, const Register* args) {
UNIMPLEMENTED();
BAILOUT("PrepareCCall");
}
void LiftoffAssembler::SetCCallRegParamAddr(Register dst, uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallRegParamAddr");
}
void LiftoffAssembler::SetCCallStackParamAddr(uint32_t stack_param_idx,
uint32_t param_idx,
uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("SetCCallStackParamAddr");
}
void LiftoffAssembler::CallC(ExternalReference ext_ref, uint32_t num_params) {
UNIMPLEMENTED();
BAILOUT("CallC");
}
void LiftoffAssembler::CallNativeWasmCode(Address addr) { UNIMPLEMENTED(); }
void LiftoffAssembler::CallNativeWasmCode(Address addr) {
BAILOUT("CallNativeWasmCode");
}
void LiftoffAssembler::CallRuntime(Zone* zone, Runtime::FunctionId fid) {
UNIMPLEMENTED();
BAILOUT("CallRuntime");
}
void LiftoffAssembler::CallIndirect(wasm::FunctionSig* sig,
compiler::CallDescriptor* call_descriptor,
Register target) {
UNIMPLEMENTED();
BAILOUT("CallIndirect");
}
void LiftoffAssembler::AllocateStackSlot(Register addr, uint32_t size) {
UNIMPLEMENTED();
BAILOUT("AllocateStackSlot");
}
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) { UNIMPLEMENTED(); }
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) {
BAILOUT("DeallocateStackSlot");
}
} // namespace wasm
} // namespace internal
} // namespace v8
#undef BAILOUT
#endif // V8_WASM_BASELINE_S390_LIFTOFF_ASSEMBLER_S390_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment