summaryrefslogtreecommitdiffstats
path: root/js/src/jit/wasm32
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/src/jit/wasm32
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/jit/wasm32')
-rw-r--r--js/src/jit/wasm32/Architecture-wasm32.h174
-rw-r--r--js/src/jit/wasm32/Assembler-wasm32.h229
-rw-r--r--js/src/jit/wasm32/CodeGenerator-wasm32.cpp254
-rw-r--r--js/src/jit/wasm32/CodeGenerator-wasm32.h76
-rw-r--r--js/src/jit/wasm32/LIR-wasm32.h109
-rw-r--r--js/src/jit/wasm32/Lowering-wasm32.h128
-rw-r--r--js/src/jit/wasm32/MacroAssembler-wasm32-inl.h1176
-rw-r--r--js/src/jit/wasm32/MacroAssembler-wasm32.cpp502
-rw-r--r--js/src/jit/wasm32/MacroAssembler-wasm32.h528
-rw-r--r--js/src/jit/wasm32/MoveEmitter-wasm32.h30
-rw-r--r--js/src/jit/wasm32/SharedICHelpers-wasm32-inl.h32
-rw-r--r--js/src/jit/wasm32/SharedICHelpers-wasm32.h30
-rw-r--r--js/src/jit/wasm32/SharedICRegisters-wasm32.h36
-rw-r--r--js/src/jit/wasm32/Trampoline-wasm32.cpp46
14 files changed, 3350 insertions, 0 deletions
diff --git a/js/src/jit/wasm32/Architecture-wasm32.h b/js/src/jit/wasm32/Architecture-wasm32.h
new file mode 100644
index 0000000000..d7726eaa5f
--- /dev/null
+++ b/js/src/jit/wasm32/Architecture-wasm32.h
@@ -0,0 +1,174 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef jit_wasm32_Architecture_wasm32_h
+#define jit_wasm32_Architecture_wasm32_h
+
+// JitSpewer.h is included through MacroAssembler implementations for other
+// platforms, so include it here to avoid inadvertent build bustage.
+#include "jit/JitSpewer.h"
+
+#include "jit/shared/Architecture-shared.h"
+
+namespace js::jit {
+
+static const uint32_t SimdMemoryAlignment =
+ 4; // Make it 4 to avoid a bunch of div-by-zero warnings
+static const uint32_t WasmStackAlignment = 8;
+static const uint32_t WasmTrapInstructionLength = 0;
+
+// See comments in wasm::GenerateFunctionPrologue.
+static constexpr uint32_t WasmCheckedCallEntryOffset = 0u;
+
+class Registers {
+ public:
+ enum RegisterID {
+ sp = 0, // corresponds to global __stack_pointer which is mapped into
+ // global[0]
+ fp = 1,
+ r2 = 2,
+ r3 = 3,
+ invalid_reg,
+ invalid_reg2, // To avoid silly static_assert failures.
+ };
+ typedef uint8_t Code;
+ typedef RegisterID Encoding;
+ union RegisterContent {
+ uintptr_t r;
+ };
+
+ typedef uint8_t SetType;
+
+ static uint32_t SetSize(SetType) { MOZ_CRASH(); }
+ static uint32_t FirstBit(SetType) { MOZ_CRASH(); }
+ static uint32_t LastBit(SetType) { MOZ_CRASH(); }
+ static const char* GetName(Code) { MOZ_CRASH(); }
+ static Code FromName(const char*) { MOZ_CRASH(); }
+
+ static const Encoding StackPointer = RegisterID::sp;
+ static const Encoding FramePointer = RegisterID::fp;
+ static const Encoding Invalid = invalid_reg;
+ static const uint32_t Total = 5;
+ static const uint32_t TotalPhys = 0;
+ static const uint32_t Allocatable = 0;
+ static const SetType AllMask = 0;
+ static const SetType ArgRegMask = 0;
+ static const SetType VolatileMask = 0;
+ static const SetType NonVolatileMask = 0;
+ static const SetType NonAllocatableMask = 0;
+ static const SetType AllocatableMask = 0;
+ static const SetType JSCallMask = 0;
+ static const SetType CallMask = 0;
+};
+
+typedef uint8_t PackedRegisterMask;
+
+class FloatRegisters {
+ public:
+ enum FPRegisterID { f0 = 0, invalid_reg };
+ typedef FPRegisterID Code;
+ typedef FPRegisterID Encoding;
+ union RegisterContent {
+ float s;
+ double d;
+ };
+
+ typedef uint32_t SetType;
+
+ static const char* GetName(Code) { MOZ_CRASH(); }
+ static Code FromName(const char*) { MOZ_CRASH(); }
+
+ static const Code Invalid = invalid_reg;
+ static const uint32_t Total = 0;
+ static const uint32_t TotalPhys = 0;
+ static const uint32_t Allocatable = 0;
+ static const SetType AllMask = 0;
+ static const SetType AllDoubleMask = 0;
+ static const SetType AllSingleMask = 0;
+ static const SetType VolatileMask = 0;
+ static const SetType NonVolatileMask = 0;
+ static const SetType NonAllocatableMask = 0;
+ static const SetType AllocatableMask = 0;
+};
+
+template <typename T>
+class TypedRegisterSet;
+
+struct FloatRegister {
+ typedef FloatRegisters Codes;
+ typedef Codes::Code Code;
+ typedef Codes::Encoding Encoding;
+ typedef Codes::SetType SetType;
+
+ Code _;
+
+ static uint32_t FirstBit(SetType) { MOZ_CRASH(); }
+ static uint32_t LastBit(SetType) { MOZ_CRASH(); }
+ static FloatRegister FromCode(uint32_t) { MOZ_CRASH(); }
+ bool isSingle() const { MOZ_CRASH(); }
+ bool isDouble() const { MOZ_CRASH(); }
+ bool isSimd128() const { MOZ_CRASH(); }
+ bool isInvalid() const { MOZ_CRASH(); }
+ FloatRegister asSingle() const { MOZ_CRASH(); }
+ FloatRegister asDouble() const { MOZ_CRASH(); }
+ FloatRegister asSimd128() const { MOZ_CRASH(); }
+ Code code() const { MOZ_CRASH(); }
+ Encoding encoding() const { MOZ_CRASH(); }
+ const char* name() const { MOZ_CRASH(); }
+ bool volatile_() const { MOZ_CRASH(); }
+ bool operator!=(FloatRegister) const { MOZ_CRASH(); }
+ bool operator==(FloatRegister) const { MOZ_CRASH(); }
+ bool aliases(FloatRegister) const { MOZ_CRASH(); }
+ uint32_t numAliased() const { MOZ_CRASH(); }
+ FloatRegister aliased(uint32_t) { MOZ_CRASH(); }
+ bool equiv(FloatRegister) const { MOZ_CRASH(); }
+ uint32_t size() const { MOZ_CRASH(); }
+ uint32_t numAlignedAliased() const { MOZ_CRASH(); }
+ FloatRegister alignedAliased(uint32_t) { MOZ_CRASH(); }
+ SetType alignedOrDominatedAliasedSet() const { MOZ_CRASH(); }
+
+ static constexpr RegTypeName DefaultType = RegTypeName::Float64;
+
+ template <RegTypeName = DefaultType>
+ static SetType LiveAsIndexableSet(SetType s) {
+ return SetType(0);
+ }
+
+ template <RegTypeName Name = DefaultType>
+ static SetType AllocatableAsIndexableSet(SetType s) {
+ static_assert(Name != RegTypeName::Any, "Allocatable set are not iterable");
+ return SetType(0);
+ }
+
+ template <typename T>
+ static T ReduceSetForPush(T) {
+ MOZ_CRASH();
+ }
+ uint32_t getRegisterDumpOffsetInBytes() { MOZ_CRASH(); }
+ static uint32_t SetSize(SetType x) { MOZ_CRASH(); }
+ static Code FromName(const char* name) { MOZ_CRASH(); }
+
+ // This is used in static initializers, so produce a bogus value instead of
+ // crashing.
+ static uint32_t GetPushSizeInBytes(const TypedRegisterSet<FloatRegister>&) {
+ return 0;
+ }
+};
+
+inline bool hasUnaliasedDouble() { MOZ_CRASH(); }
+inline bool hasMultiAlias() { MOZ_CRASH(); }
+
+static const uint32_t ShadowStackSpace = 0;
+static const uint32_t JumpImmediateRange = INT32_MAX;
+
+#ifdef JS_NUNBOX32
+static const int32_t NUNBOX32_TYPE_OFFSET = 4;
+static const int32_t NUNBOX32_PAYLOAD_OFFSET = 0;
+#endif
+
+} // namespace js::jit
+
+#endif /* jit_wasm32_Architecture_wasm32_h */
diff --git a/js/src/jit/wasm32/Assembler-wasm32.h b/js/src/jit/wasm32/Assembler-wasm32.h
new file mode 100644
index 0000000000..d3816a3ea6
--- /dev/null
+++ b/js/src/jit/wasm32/Assembler-wasm32.h
@@ -0,0 +1,229 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef jit_wasm32_Assembler_wasm32_h
+#define jit_wasm32_Assembler_wasm32_h
+
+#include "mozilla/Assertions.h"
+
+#include <cstdint>
+
+#include "jit/Registers.h"
+#include "jit/RegisterSets.h"
+#include "jit/shared/Assembler-shared.h"
+#include "jit/wasm32/Architecture-wasm32.h"
+#include "js/Value.h"
+
+namespace js::jit {
+
+struct ImmTag : public Imm32 {
+ explicit ImmTag(JSValueTag mask) : Imm32(int32_t(mask)) {}
+};
+
+struct ImmType : public ImmTag {
+ explicit ImmType(JSValueType type) : ImmTag(JSVAL_TYPE_TO_TAG(type)) {}
+};
+
+class MacroAssembler;
+
+static constexpr Register StackPointer{Registers::StackPointer};
+static constexpr Register FramePointer{Registers::FramePointer};
+
+static constexpr Register ReturnReg{Registers::invalid_reg2};
+static constexpr FloatRegister ReturnFloat32Reg = {FloatRegisters::invalid_reg};
+static constexpr FloatRegister ReturnDoubleReg = {FloatRegisters::invalid_reg};
+static constexpr FloatRegister ReturnSimd128Reg = {FloatRegisters::invalid_reg};
+static constexpr FloatRegister ScratchSimd128Reg = {
+ FloatRegisters::invalid_reg};
+static constexpr FloatRegister InvalidFloatReg = {FloatRegisters::invalid_reg};
+
+struct ScratchFloat32Scope : FloatRegister {
+ explicit ScratchFloat32Scope(MacroAssembler& masm) {}
+};
+
+struct ScratchDoubleScope : FloatRegister {
+ explicit ScratchDoubleScope(MacroAssembler& masm) {}
+};
+
+static constexpr Register OsrFrameReg{Registers::invalid_reg};
+static constexpr Register PreBarrierReg{Registers::invalid_reg};
+static constexpr Register InterpreterPCReg{Registers::invalid_reg};
+static constexpr Register CallTempReg0{Registers::invalid_reg};
+static constexpr Register CallTempReg1{Registers::invalid_reg};
+static constexpr Register CallTempReg2{Registers::invalid_reg};
+static constexpr Register CallTempReg3{Registers::invalid_reg};
+static constexpr Register CallTempReg4{Registers::invalid_reg};
+static constexpr Register CallTempReg5{Registers::invalid_reg};
+static constexpr Register InvalidReg{Registers::invalid_reg};
+static constexpr Register CallTempNonArgRegs[] = {InvalidReg, InvalidReg};
+static const uint32_t NumCallTempNonArgRegs = std::size(CallTempNonArgRegs);
+
+static constexpr Register IntArgReg0{Registers::invalid_reg};
+static constexpr Register IntArgReg1{Registers::invalid_reg};
+static constexpr Register IntArgReg2{Registers::invalid_reg};
+static constexpr Register IntArgReg3{Registers::invalid_reg};
+static constexpr Register HeapReg{Registers::invalid_reg};
+
+static constexpr Register RegExpMatcherRegExpReg{Registers::invalid_reg};
+static constexpr Register RegExpMatcherStringReg{Registers::invalid_reg};
+static constexpr Register RegExpMatcherLastIndexReg{Registers::invalid_reg};
+
+static constexpr Register RegExpExecTestRegExpReg{Registers::invalid_reg};
+static constexpr Register RegExpExecTestStringReg{Registers::invalid_reg};
+
+static constexpr Register RegExpSearcherRegExpReg{Registers::invalid_reg};
+static constexpr Register RegExpSearcherStringReg{Registers::invalid_reg};
+static constexpr Register RegExpSearcherLastIndexReg{Registers::invalid_reg};
+
+// Uses |invalid_reg2| to avoid static_assert failures.
+static constexpr Register JSReturnReg_Type{Registers::invalid_reg2};
+static constexpr Register JSReturnReg_Data{Registers::invalid_reg2};
+static constexpr Register JSReturnReg{Registers::invalid_reg2};
+
+#if defined(JS_NUNBOX32)
+static constexpr ValueOperand JSReturnOperand(Register{Registers::r2},
+ Register{Registers::r3});
+static constexpr Register64 ReturnReg64(InvalidReg, InvalidReg);
+#elif defined(JS_PUNBOX64)
+static constexpr ValueOperand JSReturnOperand(InvalidReg);
+static constexpr Register64 ReturnReg64(InvalidReg);
+#else
+# error "Bad architecture"
+#endif
+
+static constexpr Register ABINonArgReg0{Registers::invalid_reg};
+static constexpr Register ABINonArgReg1{Registers::invalid_reg};
+static constexpr Register ABINonArgReg2{Registers::invalid_reg};
+static constexpr Register ABINonArgReg3{Registers::invalid_reg};
+static constexpr Register ABINonArgReturnReg0{Registers::invalid_reg};
+static constexpr Register ABINonArgReturnReg1{Registers::invalid_reg};
+static constexpr Register ABINonVolatileReg{Registers::invalid_reg};
+static constexpr Register ABINonArgReturnVolatileReg{Registers::invalid_reg};
+
+static constexpr FloatRegister ABINonArgDoubleReg = {
+ FloatRegisters::invalid_reg};
+
+static constexpr Register WasmTableCallScratchReg0{Registers::invalid_reg};
+static constexpr Register WasmTableCallScratchReg1{Registers::invalid_reg};
+static constexpr Register WasmTableCallSigReg{Registers::invalid_reg};
+static constexpr Register WasmTableCallIndexReg{Registers::invalid_reg};
+static constexpr Register InstanceReg{Registers::invalid_reg};
+static constexpr Register WasmJitEntryReturnScratch{Registers::invalid_reg};
+static constexpr Register WasmCallRefCallScratchReg0{Registers::invalid_reg};
+static constexpr Register WasmCallRefCallScratchReg1{Registers::invalid_reg};
+static constexpr Register WasmCallRefReg{Registers::invalid_reg};
+
+static constexpr uint32_t ABIStackAlignment = 4;
+static constexpr uint32_t CodeAlignment = 16;
+static constexpr uint32_t JitStackAlignment = 8;
+static constexpr uint32_t JitStackValueAlignment =
+ JitStackAlignment / sizeof(Value);
+
+static const Scale ScalePointer = TimesOne;
+
+static constexpr uint32_t Int32SizeLog2 = 2;
+
+struct MemoryArgument {
+ uint32_t align;
+ uint32_t offset;
+};
+
+class AssemblerWasm32 : public AssemblerShared {};
+
+class Assembler : public AssemblerWasm32 {
+ public:
+ enum Condition {
+ Equal,
+ NotEqual,
+ Above,
+ AboveOrEqual,
+ Below,
+ BelowOrEqual,
+ GreaterThan,
+ GreaterThanOrEqual,
+ LessThan,
+ LessThanOrEqual,
+ Overflow,
+ CarrySet,
+ CarryClear,
+ Signed,
+ NotSigned,
+ Zero,
+ NonZero,
+ Always,
+ };
+
+ enum DoubleCondition {
+ DoubleOrdered,
+ DoubleEqual,
+ DoubleNotEqual,
+ DoubleGreaterThan,
+ DoubleGreaterThanOrEqual,
+ DoubleLessThan,
+ DoubleLessThanOrEqual,
+ DoubleUnordered,
+ DoubleEqualOrUnordered,
+ DoubleNotEqualOrUnordered,
+ DoubleGreaterThanOrUnordered,
+ DoubleGreaterThanOrEqualOrUnordered,
+ DoubleLessThanOrUnordered,
+ DoubleLessThanOrEqualOrUnordered
+ };
+
+ static Condition InvertCondition(Condition) { MOZ_CRASH(); }
+
+ static DoubleCondition InvertCondition(DoubleCondition) { MOZ_CRASH(); }
+
+ template <typename T, typename S>
+ static void PatchDataWithValueCheck(CodeLocationLabel, T, S) {
+ MOZ_CRASH();
+ }
+ static void PatchWrite_Imm32(CodeLocationLabel, Imm32) { MOZ_CRASH(); }
+
+ static void PatchWrite_NearCall(CodeLocationLabel, CodeLocationLabel) {
+ MOZ_CRASH();
+ }
+ static uint32_t PatchWrite_NearCallSize() { MOZ_CRASH(); }
+
+ static void ToggleToJmp(CodeLocationLabel) { MOZ_CRASH(); }
+ static void ToggleToCmp(CodeLocationLabel) { MOZ_CRASH(); }
+ static void ToggleCall(CodeLocationLabel, bool) { MOZ_CRASH(); }
+
+ static void Bind(uint8_t*, const CodeLabel&) { MOZ_CRASH(); }
+
+ static uintptr_t GetPointer(uint8_t*) { MOZ_CRASH(); }
+
+ static bool HasRoundInstruction(RoundingMode) { return false; }
+
+ void verifyHeapAccessDisassembly(uint32_t begin, uint32_t end,
+ const Disassembler::HeapAccess& heapAccess) {
+ MOZ_CRASH();
+ }
+
+ void setUnlimitedBuffer() { MOZ_CRASH(); }
+};
+
+class Operand {
+ public:
+ explicit Operand(const Address&) { MOZ_CRASH(); }
+ explicit Operand(const Register) { MOZ_CRASH(); }
+ explicit Operand(const FloatRegister) { MOZ_CRASH(); }
+ explicit Operand(Register, Imm32) { MOZ_CRASH(); }
+ explicit Operand(Register, int32_t) { MOZ_CRASH(); }
+};
+
+class ABIArgGenerator {
+ public:
+ ABIArgGenerator() = default;
+ ABIArg next(MIRType) { MOZ_CRASH(); }
+ ABIArg& current() { MOZ_CRASH(); }
+ uint32_t stackBytesConsumedSoFar() const { MOZ_CRASH(); }
+ void increaseStackOffset(uint32_t) { MOZ_CRASH(); }
+};
+
+} // namespace js::jit
+
+#endif /* jit_wasm32_Assembler_wasm32_h */
diff --git a/js/src/jit/wasm32/CodeGenerator-wasm32.cpp b/js/src/jit/wasm32/CodeGenerator-wasm32.cpp
new file mode 100644
index 0000000000..5535eed21d
--- /dev/null
+++ b/js/src/jit/wasm32/CodeGenerator-wasm32.cpp
@@ -0,0 +1,254 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "jit/wasm32/CodeGenerator-wasm32.h"
+
+#include "jit/CodeGenerator.h"
+
+using namespace js::jit;
+
+void CodeGenerator::visitDouble(LDouble*) { MOZ_CRASH(); }
+void CodeGenerator::visitFloat32(LFloat32* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitValue(LValue* value) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmReinterpret(LWasmReinterpret* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmReinterpretToI64(LWasmReinterpretToI64* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitRotateI64(LRotateI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitTestIAndBranch(LTestIAndBranch* test) { MOZ_CRASH(); }
+void CodeGenerator::visitTestI64AndBranch(LTestI64AndBranch* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitTestDAndBranch(LTestDAndBranch* test) { MOZ_CRASH(); }
+void CodeGenerator::visitTestFAndBranch(LTestFAndBranch* test) { MOZ_CRASH(); }
+void CodeGenerator::visitCompare(LCompare* comp) { MOZ_CRASH(); }
+void CodeGenerator::visitCompareI64(LCompareI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitCompareI64AndBranch(LCompareI64AndBranch* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitCompareAndBranch(LCompareAndBranch* comp) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitCompareD(LCompareD* comp) { MOZ_CRASH(); }
+void CodeGenerator::visitCompareF(LCompareF* comp) { MOZ_CRASH(); }
+void CodeGenerator::visitCompareDAndBranch(LCompareDAndBranch* comp) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitCompareFAndBranch(LCompareFAndBranch* comp) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitBitAndAndBranch(LBitAndAndBranch* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitNotI(LNotI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitNotI64(LNotI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitNotD(LNotD* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitNotF(LNotF* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitBitNotI(LBitNotI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitBitNotI64(LBitNotI64* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitBitOpI(LBitOpI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitBitOpI64(LBitOpI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitShiftI(LShiftI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitShiftI64(LShiftI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitSignExtendInt64(LSignExtendInt64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitUrshD(LUrshD* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitMinMaxD(LMinMaxD* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitMinMaxF(LMinMaxF* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitNegI(LNegI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitNegI64(LNegI64* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitNegD(LNegD* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitNegF(LNegF* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitCopySignD(LCopySignD* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitCopySignF(LCopySignF* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitClzI(LClzI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitClzI64(LClzI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitCtzI(LCtzI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitCtzI64(LCtzI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitPopcntI(LPopcntI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitPopcntI64(LPopcntI64* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitAddI(LAddI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitAddI64(LAddI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitSubI(LSubI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitSubI64(LSubI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitMulI64(LMulI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitMathD(LMathD* math) { MOZ_CRASH(); }
+void CodeGenerator::visitMathF(LMathF* math) { MOZ_CRASH(); }
+void CodeGenerator::visitTruncateDToInt32(LTruncateDToInt32* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmBuiltinTruncateDToInt32(
+ LWasmBuiltinTruncateDToInt32* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitTruncateFToInt32(LTruncateFToInt32* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmBuiltinTruncateFToInt32(
+ LWasmBuiltinTruncateFToInt32* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmTruncateToInt32(LWasmTruncateToInt32* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWrapInt64ToInt32(LWrapInt64ToInt32* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitExtendInt32ToInt64(LExtendInt32ToInt64* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitPowHalfD(LPowHalfD* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitCompareExchangeTypedArrayElement(
+ LCompareExchangeTypedArrayElement* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitAtomicExchangeTypedArrayElement(
+ LAtomicExchangeTypedArrayElement* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitAtomicTypedArrayElementBinop64(
+ LAtomicTypedArrayElementBinop64* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitAtomicTypedArrayElementBinopForEffect64(
+ LAtomicTypedArrayElementBinopForEffect64* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitAtomicLoad64(LAtomicLoad64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitAtomicStore64(LAtomicStore64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitCompareExchangeTypedArrayElement64(
+ LCompareExchangeTypedArrayElement64* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitAtomicExchangeTypedArrayElement64(
+ LAtomicExchangeTypedArrayElement64* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitEffectiveAddress(LEffectiveAddress* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitNearbyInt(LNearbyInt*) { MOZ_CRASH(); }
+void CodeGenerator::visitNearbyIntF(LNearbyIntF*) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmSelectI64(LWasmSelectI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmCompareAndSelect(LWasmCompareAndSelect* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmAddOffset(LWasmAddOffset* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmAddOffset64(LWasmAddOffset64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmExtendU32Index(LWasmExtendU32Index* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmWrapU32Index(LWasmWrapU32Index* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitAtomicTypedArrayElementBinop(
+ LAtomicTypedArrayElementBinop* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitAtomicTypedArrayElementBinopForEffect(
+ LAtomicTypedArrayElementBinopForEffect* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmSelect(LWasmSelect* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmHeapBase(LWasmHeapBase* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmLoad(LWasmLoad* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmLoadI64(LWasmLoadI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmStore(LWasmStore* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmStoreI64(LWasmStoreI64* lir) { MOZ_CRASH(); }
+void CodeGenerator::visitAsmJSLoadHeap(LAsmJSLoadHeap* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmCompareExchangeHeap(
+ LWasmCompareExchangeHeap* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmAtomicBinopHeapForEffect(
+ LWasmAtomicBinopHeapForEffect* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmStackArg(LWasmStackArg* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmStackArgI64(LWasmStackArgI64* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitMemoryBarrier(LMemoryBarrier* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitSimd128(LSimd128* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmTernarySimd128(LWasmTernarySimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmBinarySimd128(LWasmBinarySimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmBinarySimd128WithConstant(
+ LWasmBinarySimd128WithConstant* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmVariableShiftSimd128(
+ LWasmVariableShiftSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmConstantShiftSimd128(
+ LWasmConstantShiftSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmSignReplicationSimd128(
+ LWasmSignReplicationSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmShuffleSimd128(LWasmShuffleSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmPermuteSimd128(LWasmPermuteSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmReplaceLaneSimd128(LWasmReplaceLaneSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmReplaceInt64LaneSimd128(
+ LWasmReplaceInt64LaneSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmScalarToSimd128(LWasmScalarToSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmInt64ToSimd128(LWasmInt64ToSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmUnarySimd128(LWasmUnarySimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmReduceSimd128(LWasmReduceSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmReduceAndBranchSimd128(
+ LWasmReduceAndBranchSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmReduceSimd128ToInt64(
+ LWasmReduceSimd128ToInt64* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmLoadLaneSimd128(LWasmLoadLaneSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmStoreLaneSimd128(LWasmStoreLaneSimd128* ins) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitUnbox(LUnbox* unbox) { MOZ_CRASH(); }
+void CodeGenerator::visitWasmUint32ToDouble(LWasmUint32ToDouble* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir) {
+ MOZ_CRASH();
+}
+void CodeGenerator::visitDivI(LDivI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitModI(LModI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitDivPowTwoI(LDivPowTwoI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitModPowTwoI(LModPowTwoI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitMulI(LMulI* ins) { MOZ_CRASH(); }
+void CodeGenerator::visitBox(LBox* box) { MOZ_CRASH(); }
diff --git a/js/src/jit/wasm32/CodeGenerator-wasm32.h b/js/src/jit/wasm32/CodeGenerator-wasm32.h
new file mode 100644
index 0000000000..26d4adf982
--- /dev/null
+++ b/js/src/jit/wasm32/CodeGenerator-wasm32.h
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef jit_wasm32_CodeGenerator_wasm32_h
+#define jit_wasm32_CodeGenerator_wasm32_h
+
+#include "jit/shared/CodeGenerator-shared.h"
+
+namespace js::jit {
+
+class CodeGeneratorWasm32 : public CodeGeneratorShared {
+ protected:
+ CodeGeneratorWasm32(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm)
+ : CodeGeneratorShared(gen, graph, masm) {
+ MOZ_CRASH();
+ }
+
+ MoveOperand toMoveOperand(LAllocation) const { MOZ_CRASH(); }
+ template <typename T1, typename T2>
+ void bailoutCmp32(Assembler::Condition, T1, T2, LSnapshot*) {
+ MOZ_CRASH();
+ }
+ template <typename T1, typename T2>
+ void bailoutTest32(Assembler::Condition, T1, T2, LSnapshot*) {
+ MOZ_CRASH();
+ }
+ template <typename T1, typename T2>
+ void bailoutCmpPtr(Assembler::Condition, T1, T2, LSnapshot*) {
+ MOZ_CRASH();
+ }
+ void bailoutTestPtr(Assembler::Condition, Register, Register, LSnapshot*) {
+ MOZ_CRASH();
+ }
+ void bailoutIfFalseBool(Register, LSnapshot*) { MOZ_CRASH(); }
+ void bailoutFrom(Label*, LSnapshot*) { MOZ_CRASH(); }
+ void bailout(LSnapshot*) { MOZ_CRASH(); }
+ void bailoutIf(Assembler::Condition, LSnapshot*) { MOZ_CRASH(); }
+ bool generateOutOfLineCode() { MOZ_CRASH(); }
+ void testNullEmitBranch(Assembler::Condition, ValueOperand, MBasicBlock*,
+ MBasicBlock*) {
+ MOZ_CRASH();
+ }
+ void testUndefinedEmitBranch(Assembler::Condition, ValueOperand, MBasicBlock*,
+ MBasicBlock*) {
+ MOZ_CRASH();
+ }
+ void testObjectEmitBranch(Assembler::Condition, ValueOperand, MBasicBlock*,
+ MBasicBlock*) {
+ MOZ_CRASH();
+ }
+ void testZeroEmitBranch(Assembler::Condition, Register, MBasicBlock*,
+ MBasicBlock*) {
+ MOZ_CRASH();
+ }
+ void emitTableSwitchDispatch(MTableSwitch*, Register, Register) {
+ MOZ_CRASH();
+ }
+ void emitBigIntDiv(LBigIntDiv*, Register, Register, Register, Label*) {
+ MOZ_CRASH();
+ }
+ void emitBigIntMod(LBigIntMod*, Register, Register, Register, Label*) {
+ MOZ_CRASH();
+ }
+ ValueOperand ToValue(LInstruction*, size_t) { MOZ_CRASH(); }
+ ValueOperand ToTempValue(LInstruction*, size_t) { MOZ_CRASH(); }
+ void generateInvalidateEpilogue() { MOZ_CRASH(); }
+};
+
+typedef CodeGeneratorWasm32 CodeGeneratorSpecific;
+
+} // namespace js::jit
+
+#endif /* jit_wasm32_CodeGenerator_wasm32_h */
diff --git a/js/src/jit/wasm32/LIR-wasm32.h b/js/src/jit/wasm32/LIR-wasm32.h
new file mode 100644
index 0000000000..8943d89143
--- /dev/null
+++ b/js/src/jit/wasm32/LIR-wasm32.h
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef jit_wasm32_LIR_wasm32_h
+#define jit_wasm32_LIR_wasm32_h
+
+namespace js::jit {
+
+class LUnboxFloatingPoint : public LInstruction {
+ public:
+ LIR_HEADER(UnboxFloatingPoint)
+ static const size_t Input = 0;
+
+ MUnbox* mir() const { MOZ_CRASH(); }
+
+ const LDefinition* output() const { MOZ_CRASH(); }
+ MIRType type() const { MOZ_CRASH(); }
+};
+
+class LTableSwitch : public LInstruction {
+ public:
+ LIR_HEADER(TableSwitch)
+ MTableSwitch* mir() { MOZ_CRASH(); }
+
+ const LAllocation* index() { MOZ_CRASH(); }
+ const LDefinition* tempInt() { MOZ_CRASH(); }
+ const LDefinition* tempPointer() { MOZ_CRASH(); }
+};
+
+class LTableSwitchV : public LInstruction {
+ public:
+ LIR_HEADER(TableSwitchV)
+ MTableSwitch* mir() { MOZ_CRASH(); }
+
+ const LDefinition* tempInt() { MOZ_CRASH(); }
+ const LDefinition* tempFloat() { MOZ_CRASH(); }
+ const LDefinition* tempPointer() { MOZ_CRASH(); }
+
+ static const size_t InputValue = 0;
+};
+
+class LWasmUint32ToFloat32 : public LInstructionHelper<1, 1, 0> {
+ public:
+ explicit LWasmUint32ToFloat32(const LAllocation&)
+ : LInstructionHelper(Opcode::Invalid) {
+ MOZ_CRASH();
+ }
+};
+
+class LUnbox : public LInstructionHelper<1, 2, 0> {
+ public:
+ MUnbox* mir() const { MOZ_CRASH(); }
+ const LAllocation* payload() { MOZ_CRASH(); }
+ const LAllocation* type() { MOZ_CRASH(); }
+ const char* extraName() const { MOZ_CRASH(); }
+};
+class LDivI : public LBinaryMath<1> {
+ public:
+ LDivI(const LAllocation&, const LAllocation&, const LDefinition&)
+ : LBinaryMath(Opcode::Invalid) {
+ MOZ_CRASH();
+ }
+ MDiv* mir() const { MOZ_CRASH(); }
+};
+class LDivPowTwoI : public LInstructionHelper<1, 1, 0> {
+ public:
+ LDivPowTwoI(const LAllocation&, int32_t)
+ : LInstructionHelper(Opcode::Invalid) {
+ MOZ_CRASH();
+ }
+ const LAllocation* numerator() { MOZ_CRASH(); }
+ int32_t shift() { MOZ_CRASH(); }
+ MDiv* mir() const { MOZ_CRASH(); }
+};
+class LModI : public LBinaryMath<1> {
+ public:
+ LModI(const LAllocation&, const LAllocation&, const LDefinition&)
+ : LBinaryMath(Opcode::Invalid) {
+ MOZ_CRASH();
+ }
+
+ const LDefinition* callTemp() { MOZ_CRASH(); }
+ MMod* mir() const { MOZ_CRASH(); }
+};
+class LWasmUint32ToDouble : public LInstructionHelper<1, 1, 0> {
+ public:
+ explicit LWasmUint32ToDouble(const LAllocation&)
+ : LInstructionHelper(Opcode::Invalid) {
+ MOZ_CRASH();
+ }
+};
+class LModPowTwoI : public LInstructionHelper<1, 1, 0> {
+ public:
+ int32_t shift() { MOZ_CRASH(); }
+ LModPowTwoI(const LAllocation& lhs, int32_t shift)
+ : LInstructionHelper(Opcode::Invalid) {
+ MOZ_CRASH();
+ }
+ MMod* mir() const { MOZ_CRASH(); }
+};
+
+class LMulI : public LInstruction {};
+
+} // namespace js::jit
+
+#endif /* jit_wasm32_LIR_wasm32_h */
diff --git a/js/src/jit/wasm32/Lowering-wasm32.h b/js/src/jit/wasm32/Lowering-wasm32.h
new file mode 100644
index 0000000000..3a0aab364a
--- /dev/null
+++ b/js/src/jit/wasm32/Lowering-wasm32.h
@@ -0,0 +1,128 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef jit_wasm32_Lowering_wasm32_h
+#define jit_wasm32_Lowering_wasm32_h
+
+#include "jit/shared/Lowering-shared.h"
+
+namespace js::jit {
+
+class LIRGeneratorWasm32 : public LIRGeneratorShared {
+ protected:
+ LIRGeneratorWasm32(MIRGenerator* gen, MIRGraph& graph, LIRGraph& lirGraph)
+ : LIRGeneratorShared(gen, graph, lirGraph) {
+ MOZ_CRASH();
+ }
+
+ LBoxAllocation useBoxFixed(MDefinition*, Register, Register,
+ bool useAtStart = false) {
+ MOZ_CRASH();
+ }
+
+ LAllocation useByteOpRegister(MDefinition*) { MOZ_CRASH(); }
+ LAllocation useByteOpRegisterAtStart(MDefinition*) { MOZ_CRASH(); }
+ LAllocation useByteOpRegisterOrNonDoubleConstant(MDefinition*) {
+ MOZ_CRASH();
+ }
+ LDefinition tempByteOpRegister() { MOZ_CRASH(); }
+ LDefinition tempToUnbox() { MOZ_CRASH(); }
+ bool needTempForPostBarrier() { MOZ_CRASH(); }
+ void lowerUntypedPhiInput(MPhi*, uint32_t, LBlock*, size_t) { MOZ_CRASH(); }
+ void lowerInt64PhiInput(MPhi*, uint32_t, LBlock*, size_t) { MOZ_CRASH(); }
+ void defineInt64Phi(MPhi*, size_t) { MOZ_CRASH(); }
+ void lowerForShift(LInstructionHelper<1, 2, 0>*, MDefinition*, MDefinition*,
+ MDefinition*) {
+ MOZ_CRASH();
+ }
+ void lowerUrshD(MUrsh*) { MOZ_CRASH(); }
+ void lowerPowOfTwoI(MPow*) { MOZ_CRASH(); }
+ template <typename T>
+ void lowerForALU(T, MDefinition*, MDefinition*, MDefinition* v = nullptr) {
+ MOZ_CRASH();
+ }
+ template <typename T>
+ void lowerForFPU(T, MDefinition*, MDefinition*, MDefinition* v = nullptr) {
+ MOZ_CRASH();
+ }
+ template <typename T>
+ void lowerForALUInt64(T, MDefinition*, MDefinition*,
+ MDefinition* v = nullptr) {
+ MOZ_CRASH();
+ }
+ void lowerForMulInt64(LMulI64*, MMul*, MDefinition*,
+ MDefinition* v = nullptr) {
+ MOZ_CRASH();
+ }
+ template <typename T>
+ void lowerForShiftInt64(T, MDefinition*, MDefinition*,
+ MDefinition* v = nullptr) {
+ MOZ_CRASH();
+ }
+ void lowerForBitAndAndBranch(LBitAndAndBranch*, MInstruction*, MDefinition*,
+ MDefinition*) {
+ MOZ_CRASH();
+ }
+ void lowerForCompareI64AndBranch(MTest*, MCompare*, JSOp, MDefinition*,
+ MDefinition*, MBasicBlock*, MBasicBlock*) {
+ MOZ_CRASH();
+ }
+
+ void lowerConstantDouble(double, MInstruction*) { MOZ_CRASH(); }
+ void lowerConstantFloat32(float, MInstruction*) { MOZ_CRASH(); }
+ void lowerTruncateDToInt32(MTruncateToInt32*) { MOZ_CRASH(); }
+ void lowerTruncateFToInt32(MTruncateToInt32*) { MOZ_CRASH(); }
+ void lowerBuiltinInt64ToFloatingPoint(MBuiltinInt64ToFloatingPoint* ins) {
+ MOZ_CRASH();
+ }
+ void lowerWasmBuiltinTruncateToInt64(MWasmBuiltinTruncateToInt64* ins) {
+ MOZ_CRASH();
+ }
+ void lowerWasmBuiltinTruncateToInt32(MWasmBuiltinTruncateToInt32* ins) {
+ MOZ_CRASH();
+ }
+ void lowerDivI(MDiv*) { MOZ_CRASH(); }
+ void lowerModI(MMod*) { MOZ_CRASH(); }
+ void lowerDivI64(MDiv*) { MOZ_CRASH(); }
+ void lowerWasmBuiltinDivI64(MWasmBuiltinDivI64* div) { MOZ_CRASH(); }
+ void lowerModI64(MMod*) { MOZ_CRASH(); }
+ void lowerWasmBuiltinModI64(MWasmBuiltinModI64* mod) { MOZ_CRASH(); }
+ void lowerNegI(MInstruction*, MDefinition*) { MOZ_CRASH(); }
+ void lowerNegI64(MInstruction*, MDefinition*) { MOZ_CRASH(); }
+ void lowerMulI(MMul*, MDefinition*, MDefinition*) { MOZ_CRASH(); }
+ void lowerUDiv(MDiv*) { MOZ_CRASH(); }
+ void lowerUMod(MMod*) { MOZ_CRASH(); }
+ void lowerWasmSelectI(MWasmSelect* select) { MOZ_CRASH(); }
+ void lowerWasmSelectI64(MWasmSelect* select) { MOZ_CRASH(); }
+ void lowerWasmCompareAndSelect(MWasmSelect* ins, MDefinition* lhs,
+ MDefinition* rhs, MCompare::CompareType compTy,
+ JSOp jsop) {
+ MOZ_CRASH();
+ }
+ bool canSpecializeWasmCompareAndSelect(MCompare::CompareType compTy,
+ MIRType insTy) {
+ MOZ_CRASH();
+ }
+
+ void lowerBigIntLsh(MBigIntLsh*) { MOZ_CRASH(); }
+ void lowerBigIntRsh(MBigIntRsh*) { MOZ_CRASH(); }
+ void lowerBigIntDiv(MBigIntDiv*) { MOZ_CRASH(); }
+ void lowerBigIntMod(MBigIntMod*) { MOZ_CRASH(); }
+
+ void lowerAtomicLoad64(MLoadUnboxedScalar*) { MOZ_CRASH(); }
+ void lowerAtomicStore64(MStoreUnboxedScalar*) { MOZ_CRASH(); }
+
+ LTableSwitch* newLTableSwitch(LAllocation, LDefinition, MTableSwitch*) {
+ MOZ_CRASH();
+ }
+ LTableSwitchV* newLTableSwitchV(MTableSwitch*) { MOZ_CRASH(); }
+};
+
+typedef LIRGeneratorWasm32 LIRGeneratorSpecific;
+
+} // namespace js::jit
+
+#endif /* jit_wasm32_Lowering_wasm32_h */
diff --git a/js/src/jit/wasm32/MacroAssembler-wasm32-inl.h b/js/src/jit/wasm32/MacroAssembler-wasm32-inl.h
new file mode 100644
index 0000000000..eca2a07a65
--- /dev/null
+++ b/js/src/jit/wasm32/MacroAssembler-wasm32-inl.h
@@ -0,0 +1,1176 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef jit_wasm32_MacroAssembler_wasm32_inl_h
+#define jit_wasm32_MacroAssembler_wasm32_inl_h
+
+#include "jit/wasm32/MacroAssembler-wasm32.h"
+
+namespace js::jit {
+
+//{{{ check_macroassembler_style
+
+void MacroAssembler::move64(Imm64 imm, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::move64(Register64 src, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::moveDoubleToGPR64(FloatRegister src, Register64 dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::moveGPR64ToDouble(Register64 src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::move64To32(Register64 src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::move32To64ZeroExtend(Register src, Register64 dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::move8To64SignExtend(Register src, Register64 dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::move16To64SignExtend(Register src, Register64 dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::move32To64SignExtend(Register src, Register64 dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::move32SignExtendToPtr(Register src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::move32ZeroExtendToPtr(Register src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::load32SignExtendToPtr(const Address& src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::notPtr(Register reg) { MOZ_CRASH(); }
+
+void MacroAssembler::andPtr(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::andPtr(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::and64(Imm64 imm, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::or64(Imm64 imm, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::xor64(Imm64 imm, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::orPtr(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::orPtr(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::and64(Register64 src, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::or64(Register64 src, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::xor64(Register64 src, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::xorPtr(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::xorPtr(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::byteSwap64(Register64 reg) { MOZ_CRASH(); }
+
+void MacroAssembler::addPtr(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::addPtr(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::addPtr(ImmWord imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::add64(Register64 src, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::add64(Imm32 imm, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::add64(Imm64 imm, Register64 dest) { MOZ_CRASH(); }
+
+CodeOffset MacroAssembler::sub32FromStackPtrWithPatch(Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::patchSub32FromStackPtr(CodeOffset offset, Imm32 imm) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::subPtr(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::subPtr(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::sub64(Register64 src, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::sub64(Imm64 imm, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::mulPtr(Register rhs, Register srcDest) { MOZ_CRASH(); }
+
+void MacroAssembler::mul64(Imm64 imm, const Register64& dest) { MOZ_CRASH(); }
+
+void MacroAssembler::mul64(const Register64& src, const Register64& dest,
+ const Register temp) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::mulBy3(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::inc64(AbsoluteAddress dest) { MOZ_CRASH(); }
+
+void MacroAssembler::neg64(Register64 reg) { MOZ_CRASH(); }
+
+void MacroAssembler::negPtr(Register reg) { MOZ_CRASH(); }
+
+void MacroAssembler::lshiftPtr(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::rshiftPtr(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::rshiftPtrArithmetic(Imm32 imm, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::lshift64(Imm32 imm, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::rshift64(Imm32 imm, Register64 dest) { MOZ_CRASH(); }
+
+void MacroAssembler::rshift64Arithmetic(Imm32 imm, Register64 dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::lshiftPtr(Register shift, Register srcDest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rshiftPtr(Register shift, Register srcDest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::lshift64(Register shift, Register64 srcDest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rshift64(Register shift, Register64 srcDest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rshift64Arithmetic(Register shift, Register64 srcDest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::clz64(Register64 src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::ctz64(Register64 src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::popcnt64(Register64 src, Register64 dest, Register temp) {
+ MOZ_CRASH();
+}
+
+template <typename T1, typename T2>
+void MacroAssembler::cmpPtrSet(Condition cond, T1 lhs, T2 rhs, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchToComputedAddress(const BaseIndex& address) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::move8SignExtend(Register src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::move16SignExtend(Register src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::loadAbiReturnAddress(Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::not32(Register reg) { MOZ_CRASH(); }
+
+void MacroAssembler::and32(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::and32(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::and32(Imm32 imm, const Address& dest) { MOZ_CRASH(); }
+
+void MacroAssembler::and32(const Address& src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::or32(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::or32(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::or32(Imm32 imm, const Address& dest) { MOZ_CRASH(); }
+
+void MacroAssembler::xor32(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::xor32(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::xor32(Imm32 imm, const Address& dest) { MOZ_CRASH(); }
+
+void MacroAssembler::xor32(const Address& src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::byteSwap16SignExtend(Register reg) { MOZ_CRASH(); }
+
+void MacroAssembler::byteSwap16ZeroExtend(Register reg) { MOZ_CRASH(); }
+
+void MacroAssembler::byteSwap32(Register reg) { MOZ_CRASH(); }
+
+void MacroAssembler::add32(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::add32(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::add32(Imm32 imm, const Address& dest) { MOZ_CRASH(); }
+
+void MacroAssembler::addFloat32(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::addDouble(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::sub32(const Address& src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::sub32(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::sub32(Imm32 imm, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::subFloat32(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::subDouble(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::mul32(Register rhs, Register srcDest) { MOZ_CRASH(); }
+
+void MacroAssembler::mul32(Imm32 imm, Register srcDest) { MOZ_CRASH(); }
+
+void MacroAssembler::mulHighUnsigned32(Imm32 imm, Register src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::mulFloat32(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::mulDouble(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::divFloat32(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::divDouble(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::neg32(Register reg) { MOZ_CRASH(); }
+
+void MacroAssembler::negateFloat(FloatRegister reg) { MOZ_CRASH(); }
+
+void MacroAssembler::negateDouble(FloatRegister reg) { MOZ_CRASH(); }
+
+void MacroAssembler::abs32(Register src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::absFloat32(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::absDouble(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::sqrtDouble(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::lshift32(Imm32 shift, Register srcDest) { MOZ_CRASH(); }
+
+void MacroAssembler::rshift32(Imm32 shift, Register srcDest) { MOZ_CRASH(); }
+
+void MacroAssembler::rshift32Arithmetic(Imm32 shift, Register srcDest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rshift32Arithmetic(Register shift, Register srcDest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::lshift32(Register shift, Register srcDest) { MOZ_CRASH(); }
+
+void MacroAssembler::rshift32(Register shift, Register srcDest) { MOZ_CRASH(); }
+
+void MacroAssembler::memoryBarrier(MemoryBarrierBits barrier) { MOZ_CRASH(); }
+
+void MacroAssembler::clampIntToUint8(Register reg) { MOZ_CRASH(); }
+
+template <class L>
+void MacroAssembler::branchTest32(Condition cond, Register lhs, Register rhs,
+ L label) {
+ MOZ_CRASH();
+}
+
+template <class L>
+void MacroAssembler::branchTest32(Condition cond, Register lhs, Imm32 rhs,
+ L label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTest32(Condition cond, const Address& lhs, Imm32 rhh,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTest32(Condition cond, const AbsoluteAddress& lhs,
+ Imm32 rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+template <class L>
+void MacroAssembler::branchTestPtr(Condition cond, Register lhs, Register rhs,
+ L label) {
+ MOZ_CRASH();
+}
+void MacroAssembler::branchTestPtr(Condition cond, Register lhs, Imm32 rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestPtr(Condition cond, const Address& lhs,
+ Imm32 rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+template <class L>
+void MacroAssembler::branchTest64(Condition cond, Register64 lhs,
+ Register64 rhs, Register temp, L label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestUndefined(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestInt32(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestDouble(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestNumber(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestBoolean(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestString(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestSymbol(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestBigInt(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestNull(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestObject(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestPrimitive(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestMagic(Condition cond, Register tag,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestUndefined(Condition cond, const Address& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestUndefined(Condition cond,
+ const BaseIndex& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestInt32(Condition cond, const Address& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestInt32(Condition cond, const BaseIndex& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestInt32(Condition cond, const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestDouble(Condition cond, const Address& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestDouble(Condition cond, const BaseIndex& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestBoolean(Condition cond, const Address& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestBoolean(Condition cond, const BaseIndex& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestString(Condition cond, const Address& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestString(Condition cond, const BaseIndex& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestSymbol(Condition cond, const Address& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestSymbol(Condition cond, const BaseIndex& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestBigInt(Condition cond, const Address& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestBigInt(Condition cond, const BaseIndex& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestNull(Condition cond, const Address& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestNull(Condition cond, const BaseIndex& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestNull(Condition cond, const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestObject(Condition cond, const Address& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestObject(Condition cond, const BaseIndex& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestObject(Condition cond, const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestGCThing(Condition cond, const Address& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestGCThing(Condition cond, const BaseIndex& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestGCThing(Condition cond,
+ const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestMagic(Condition cond, const Address& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestMagic(Condition cond, const BaseIndex& address,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestMagic(Condition cond, const Address& valaddr,
+ JSWhyMagic why, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestValue(Condition cond, const BaseIndex& lhs,
+ const ValueOperand& rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestDoubleTruthy(bool truthy, FloatRegister reg,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestBooleanTruthy(bool truthy,
+ const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestStringTruthy(bool truthy,
+ const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestBigIntTruthy(bool truthy,
+ const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::fallibleUnboxPtr(const ValueOperand& src, Register dest,
+ JSValueType type, Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::fallibleUnboxPtr(const Address& src, Register dest,
+ JSValueType type, Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::fallibleUnboxPtr(const BaseIndex& src, Register dest,
+ JSValueType type, Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::cmpPtrMovePtr(Condition cond, Register lhs, Register rhs,
+ Register src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::cmpPtrMovePtr(Condition cond, Register lhs,
+ const Address& rhs, Register src,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch32(Condition cond, const BaseIndex& lhs, Imm32 rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch32(Condition cond, const AbsoluteAddress& lhs,
+ Imm32 rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch32(Condition cond, const Address& lhs, Register rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch32(Condition cond, const Address& lhs, Imm32 rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch32(Condition cond, const AbsoluteAddress& lhs,
+ Register rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch8(Condition cond, const Address& lhs, Imm32 rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch8(Condition cond, const BaseIndex& lhs, Register rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch16(Condition cond, const Address& lhs, Imm32 rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+template <class L>
+void MacroAssembler::branch32(Condition cond, Register lhs, Register rhs,
+ L label) {
+ MOZ_CRASH();
+}
+
+template <class L>
+void MacroAssembler::branch32(Condition cond, Register lhs, Imm32 rhs,
+ L label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch32(Condition cond, wasm::SymbolicAddress lhs,
+ Imm32 rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+template <class L>
+void MacroAssembler::branchPtr(Condition cond, Register lhs, Register rhs,
+ L label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, Register lhs, Imm32 rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, Register lhs, ImmPtr rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, Register lhs, ImmGCPtr rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, Register lhs, ImmWord rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+template <class L>
+void MacroAssembler::branchPtr(Condition cond, const Address& lhs, Register rhs,
+ L label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, const Address& lhs, ImmPtr rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, const Address& lhs, ImmGCPtr rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, const Address& lhs, ImmWord rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, const BaseIndex& lhs,
+ ImmWord rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, const BaseIndex& lhs,
+ Register rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, const AbsoluteAddress& lhs,
+ Register rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, const AbsoluteAddress& lhs,
+ ImmWord rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPtr(Condition cond, wasm::SymbolicAddress lhs,
+ Register rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchFloat(DoubleCondition cond, FloatRegister lhs,
+ FloatRegister rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchDouble(DoubleCondition cond, FloatRegister lhs,
+ FloatRegister rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::branchAdd32(Condition cond, T src, Register dest,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::branchSub32(Condition cond, T src, Register dest,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::branchMul32(Condition cond, T src, Register dest,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::branchRshift32(Condition cond, T src, Register dest,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchNeg32(Condition cond, Register reg, Label* label) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::branchAddPtr(Condition cond, T src, Register dest,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::branchSubPtr(Condition cond, T src, Register dest,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchMulPtr(Condition cond, Register src, Register dest,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::decBranchPtr(Condition cond, Register lhs, Imm32 rhs,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::spectreZeroRegister(Condition cond, Register scratch,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::spectreMovePtr(Condition cond, Register src,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::storeUncanonicalizedDouble(FloatRegister src,
+ const Address& dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::storeUncanonicalizedDouble(FloatRegister src,
+ const BaseIndex& dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::storeUncanonicalizedFloat32(FloatRegister src,
+ const Address& dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::storeUncanonicalizedFloat32(FloatRegister src,
+ const BaseIndex& dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::addPtr(Imm32 imm, const Address& dest) { MOZ_CRASH(); }
+
+void MacroAssembler::addPtr(const Address& src, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::subPtr(Register src, const Address& dest) { MOZ_CRASH(); }
+
+void MacroAssembler::subPtr(const Address& addr, Register dest) { MOZ_CRASH(); }
+
+void MacroAssembler::branchTruncateFloat32MaybeModUint32(FloatRegister src,
+ Register dest,
+ Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTruncateDoubleMaybeModUint32(FloatRegister src,
+ Register dest,
+ Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::test32MovePtr(Condition cond, const Address& addr,
+ Imm32 mask, Register src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::cmp32MovePtr(Condition cond, Register lhs, Imm32 rhs,
+ Register src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::test32LoadPtr(Condition cond, const Address& addr,
+ Imm32 mask, const Address& src,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::spectreBoundsCheck32(Register index, Register length,
+ Register maybeScratch,
+ Label* failure) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::spectreBoundsCheck32(Register index, const Address& length,
+ Register maybeScratch,
+ Label* failure) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::spectreBoundsCheckPtr(Register index, Register length,
+ Register maybeScratch,
+ Label* failure) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::spectreBoundsCheckPtr(Register index,
+ const Address& length,
+ Register maybeScratch,
+ Label* failure) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::cmp32LoadPtr(Condition cond, const Address& lhs, Imm32 rhs,
+ const Address& src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTruncateFloat32ToInt32(FloatRegister src,
+ Register dest, Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTruncateDoubleToInt32(FloatRegister src,
+ Register dest, Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::mulDoublePtr(ImmPtr imm, Register temp,
+ FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+template <typename T1, typename T2>
+void MacroAssembler::cmp32Set(Condition cond, T1 lhs, T2 rhs, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::cmp64Set(Condition cond, Address lhs, Imm64 rhs,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestDouble(Condition cond, const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestInt32Truthy(bool truthy,
+ const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestNumber(Condition cond, const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestSymbol(Condition cond, const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestBigInt(Condition cond, const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestBoolean(Condition cond,
+ const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+template <class L>
+void MacroAssembler::branchTestMagic(Condition cond, const ValueOperand& value,
+ L label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestString(Condition cond, const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::cmp32Move32(Condition cond, Register lhs, Register rhs,
+ Register src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::cmp32Move32(Condition cond, Register lhs,
+ const Address& rhs, Register src,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestUndefined(Condition cond,
+ const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchAdd64(Condition cond, Imm64 imm, Register64 dest,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::quotient32(Register rhs, Register srcDest,
+ bool isUnsigned) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::remainder32(Register rhs, Register srcDest,
+ bool isUnsigned) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch64(Condition cond, Register64 lhs, Imm64 val,
+ Label* success, Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch64(Condition cond, Register64 lhs, Register64 rhs,
+ Label* success, Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch64(Condition cond, const Address& lhs, Imm64 val,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch64(Condition cond, const Address& lhs,
+ Register64 rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branch64(Condition cond, const Address& lhs,
+ const Address& rhs, Register scratch,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::minFloat32(FloatRegister other, FloatRegister srcDest,
+ bool handleNaN) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::minDouble(FloatRegister other, FloatRegister srcDest,
+ bool handleNaN) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::maxFloat32(FloatRegister other, FloatRegister srcDest,
+ bool handleNaN) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::maxDouble(FloatRegister other, FloatRegister srcDest,
+ bool handleNaN) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rotateLeft(Imm32 count, Register input, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rotateLeft(Register count, Register input, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rotateLeft64(Imm32 count, Register64 input,
+ Register64 dest, Register temp) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rotateLeft64(Register count, Register64 input,
+ Register64 dest, Register temp) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rotateRight(Imm32 count, Register input, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rotateRight(Register count, Register input,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rotateRight64(Imm32 count, Register64 input,
+ Register64 dest, Register temp) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::rotateRight64(Register count, Register64 input,
+ Register64 dest, Register temp) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::flexibleLshift32(Register shift, Register srcDest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::flexibleRshift32(Register shift, Register srcDest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::flexibleRshift32Arithmetic(Register shift,
+ Register srcDest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs,
+ Register rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::clz32(Register src, Register dest, bool knownNotZero) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::ctz32(Register src, Register dest, bool knownNotZero) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::popcnt32(Register src, Register dest, Register temp) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::moveFloat32ToGPR(FloatRegister src, Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::moveGPRToFloat32(Register src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestPrimitive(Condition cond,
+ const ValueOperand& value,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::sqrtFloat32(FloatRegister src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::cmp16Set(Condition cond, Address lhs, Imm32 rhs,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::cmp8Set(Condition cond, Address lhs, Imm32 rhs,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::testNumberSet(Condition cond, const T& src,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::testBooleanSet(Condition cond, const T& src,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::testStringSet(Condition cond, const T& src,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::testSymbolSet(Condition cond, const T& src,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::testBigIntSet(Condition cond, const T& src,
+ Register dest) {
+ MOZ_CRASH();
+}
+
+template <typename T>
+void MacroAssembler::branchTestGCThingImpl(Condition cond, const T& t,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+//}}} check_macroassembler_style
+
+} // namespace js::jit
+
+#endif /* jit_wasm32_MacroAssembler_wasm32_inl_h */
diff --git a/js/src/jit/wasm32/MacroAssembler-wasm32.cpp b/js/src/jit/wasm32/MacroAssembler-wasm32.cpp
new file mode 100644
index 0000000000..fe82793499
--- /dev/null
+++ b/js/src/jit/wasm32/MacroAssembler-wasm32.cpp
@@ -0,0 +1,502 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "jit/wasm32/MacroAssembler-wasm32.h"
+
+namespace js::jit {
+
+void MacroAssembler::subFromStackPtr(Imm32 imm32) { MOZ_CRASH(); }
+
+//{{{ check_macroassembler_style
+
+void MacroAssembler::PushBoxed(FloatRegister reg) { MOZ_CRASH(); }
+
+void MacroAssembler::branchPtrInNurseryChunk(Condition cond, Register ptr,
+ Register temp, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::pushReturnAddress() { MOZ_CRASH(); }
+
+void MacroAssembler::popReturnAddress() { MOZ_CRASH(); }
+
+CodeOffset MacroAssembler::moveNearAddressWithPatch(Register dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::patchNearAddressMove(CodeLocationLabel loc,
+ CodeLocationLabel target) {
+ MOZ_CRASH();
+}
+
+size_t MacroAssembler::PushRegsInMaskSizeInBytes(LiveRegisterSet set) {
+ MOZ_CRASH();
+ return 0;
+}
+
+void MacroAssembler::PushRegsInMask(LiveRegisterSet set) { MOZ_CRASH(); }
+
+void MacroAssembler::PopRegsInMaskIgnore(LiveRegisterSet set,
+ LiveRegisterSet ignore) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::PopStackPtr() { MOZ_CRASH(); }
+
+void MacroAssembler::flexibleDivMod32(Register rhs, Register srcDest,
+ Register remOutput, bool isUnsigned,
+ const LiveRegisterSet& volatileLiveRegs) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::flexibleRemainder32(
+ Register rhs, Register srcDest, bool isUnsigned,
+ const LiveRegisterSet& volatileLiveRegs) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::storeRegsInMask(LiveRegisterSet set, Address dest,
+ Register scratch) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmBoundsCheck32(Condition cond, Register index,
+ Register boundsCheckLimit, Label* ok) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmBoundsCheck32(Condition cond, Register index,
+ Address boundsCheckLimit, Label* ok) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmBoundsCheck64(Condition cond, Register64 index,
+ Register64 boundsCheckLimit, Label* ok) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmBoundsCheck64(Condition cond, Register64 index,
+ Address boundsCheckLimit, Label* ok) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::oolWasmTruncateCheckF32ToI32(FloatRegister input,
+ Register output,
+ TruncFlags flags,
+ wasm::BytecodeOffset off,
+ Label* rejoin) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmTruncateDoubleToInt64(
+ FloatRegister input, Register64 output, bool isSaturating, Label* oolEntry,
+ Label* oolRejoin, FloatRegister tempDouble) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmTruncateDoubleToUInt64(
+ FloatRegister input, Register64 output, bool isSaturating, Label* oolEntry,
+ Label* oolRejoin, FloatRegister tempDouble) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::oolWasmTruncateCheckF64ToI64(FloatRegister input,
+ Register64 output,
+ TruncFlags flags,
+ wasm::BytecodeOffset off,
+ Label* rejoin) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmTruncateFloat32ToInt64(
+ FloatRegister input, Register64 output, bool isSaturating, Label* oolEntry,
+ Label* oolRejoin, FloatRegister tempDouble) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmTruncateFloat32ToUInt64(
+ FloatRegister input, Register64 output, bool isSaturating, Label* oolEntry,
+ Label* oolRejoin, FloatRegister tempDouble) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::oolWasmTruncateCheckF32ToI64(FloatRegister input,
+ Register64 output,
+ TruncFlags flags,
+ wasm::BytecodeOffset off,
+ Label* rejoin) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::oolWasmTruncateCheckF64ToI32(FloatRegister input,
+ Register output,
+ TruncFlags flags,
+ wasm::BytecodeOffset off,
+ Label* rejoin) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::convertUInt64ToFloat32(Register64 src, FloatRegister dest,
+ Register temp) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::convertInt64ToFloat32(Register64 src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+bool MacroAssembler::convertUInt64ToDoubleNeedsTemp() { MOZ_CRASH(); }
+
+void MacroAssembler::convertUInt64ToDouble(Register64 src, FloatRegister dest,
+ Register temp) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::convertInt64ToDouble(Register64 src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::convertIntPtrToDouble(Register src, FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmAtomicLoad64(const wasm::MemoryAccessDesc& access,
+ const Address& mem, Register64 temp,
+ Register64 output) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmAtomicLoad64(const wasm::MemoryAccessDesc& access,
+ const BaseIndex& mem, Register64 temp,
+ Register64 output) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::patchNopToCall(uint8_t* call, uint8_t* target) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::patchCallToNop(uint8_t* call) { MOZ_CRASH(); }
+
+void MacroAssembler::patchCall(uint32_t callerOffset, uint32_t calleeOffset) {
+ MOZ_CRASH();
+}
+
+CodeOffset MacroAssembler::farJumpWithPatch() {
+ MOZ_CRASH();
+ return CodeOffset(0);
+}
+
+void MacroAssembler::patchFarJump(CodeOffset farJump, uint32_t targetOffset) {
+ MOZ_CRASH();
+}
+
+CodeOffset MacroAssembler::call(Register reg) {
+ MOZ_CRASH();
+ return CodeOffset(0);
+}
+
+CodeOffset MacroAssembler::call(Label* label) {
+ MOZ_CRASH();
+ return CodeOffset(0);
+}
+
+CodeOffset MacroAssembler::call(wasm::SymbolicAddress imm) {
+ MOZ_CRASH();
+ return CodeOffset(0);
+}
+
+CodeOffset MacroAssembler::callWithPatch() {
+ MOZ_CRASH();
+ return CodeOffset(0);
+}
+
+CodeOffset MacroAssembler::nopPatchableToCall() {
+ MOZ_CRASH();
+ return CodeOffset(0);
+}
+
+CodeOffset MacroAssembler::wasmTrapInstruction() {
+ MOZ_CRASH();
+ return CodeOffset(0);
+}
+
+template void MacroAssembler::storeUnboxedValue(const ConstantOrRegister& value,
+ MIRType valueType,
+ const Address& dest);
+
+template void MacroAssembler::storeUnboxedValue(
+ const ConstantOrRegister& value, MIRType valueType,
+ const BaseObjectElementIndex& dest);
+
+template <typename T>
+void MacroAssembler::storeUnboxedValue(const ConstantOrRegister& value,
+ MIRType valueType, const T& dest) {
+ MOZ_CRASH();
+}
+
+uint32_t MacroAssembler::pushFakeReturnAddress(Register scratch) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::Pop(Register reg) { MOZ_CRASH(); }
+
+void MacroAssembler::Pop(FloatRegister t) { MOZ_CRASH(); }
+
+void MacroAssembler::Pop(const ValueOperand& val) { MOZ_CRASH(); }
+
+void MacroAssembler::Push(Register reg) { MOZ_CRASH(); }
+
+void MacroAssembler::Push(const Imm32 imm) { MOZ_CRASH(); }
+
+void MacroAssembler::Push(const ImmWord imm) { MOZ_CRASH(); }
+
+void MacroAssembler::Push(const ImmPtr imm) { MOZ_CRASH(); }
+
+void MacroAssembler::Push(const ImmGCPtr ptr) { MOZ_CRASH(); }
+
+void MacroAssembler::Push(FloatRegister reg) { MOZ_CRASH(); }
+
+void MacroAssembler::wasmTruncateFloat32ToInt32(FloatRegister input,
+ Register output,
+ bool isSaturating,
+ Label* oolEntry) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmTruncateFloat32ToUInt32(FloatRegister input,
+ Register output,
+ bool isSaturating,
+ Label* oolEntry) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmTruncateDoubleToUInt32(FloatRegister input,
+ Register output,
+ bool isSaturating,
+ Label* oolEntry) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmTruncateDoubleToInt32(FloatRegister input,
+ Register output,
+ bool isSaturating,
+ Label* oolEntry) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmAtomicExchange64(const wasm::MemoryAccessDesc& access,
+ const Address& mem, Register64 value,
+ Register64 output) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmAtomicExchange64(const wasm::MemoryAccessDesc& access,
+ const BaseIndex& mem,
+ Register64 value, Register64 output) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::speculationBarrier() { MOZ_CRASH(); }
+
+void MacroAssembler::shiftIndex32AndAdd(Register indexTemp32, int shift,
+ Register pointer) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::setupUnalignedABICall(Register scratch) { MOZ_CRASH(); }
+
+void MacroAssembler::enterFakeExitFrameForWasm(Register cxreg, Register scratch,
+ ExitFrameType type) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::floorFloat32ToInt32(FloatRegister src, Register dest,
+ Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::floorDoubleToInt32(FloatRegister src, Register dest,
+ Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::ceilFloat32ToInt32(FloatRegister src, Register dest,
+ Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::ceilDoubleToInt32(FloatRegister src, Register dest,
+ Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::roundFloat32ToInt32(FloatRegister src, Register dest,
+ FloatRegister temp, Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::roundDoubleToInt32(FloatRegister src, Register dest,
+ FloatRegister temp, Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::truncFloat32ToInt32(FloatRegister src, Register dest,
+ Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::truncDoubleToInt32(FloatRegister src, Register dest,
+ Label* fail) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::nearbyIntDouble(RoundingMode mode, FloatRegister src,
+ FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::nearbyIntFloat32(RoundingMode mode, FloatRegister src,
+ FloatRegister dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::copySignDouble(FloatRegister lhs, FloatRegister rhs,
+ FloatRegister output) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchTestValue(Condition cond, const ValueOperand& lhs,
+ const Value& rhs, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchValueIsNurseryCell(Condition cond,
+ const Address& address,
+ Register temp, Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::branchValueIsNurseryCell(Condition cond,
+ ValueOperand value, Register temp,
+ Label* label) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::callWithABINoProfiler(Register fun, MoveOp::Type result) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::callWithABINoProfiler(const Address& fun,
+ MoveOp::Type result) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::call(const Address& addr) { MOZ_CRASH(); }
+
+void MacroAssembler::call(ImmWord imm) { MOZ_CRASH(); }
+
+void MacroAssembler::call(ImmPtr imm) { MOZ_CRASH(); }
+
+void MacroAssembler::call(JitCode* c) { MOZ_CRASH(); }
+
+void MacroAssembler::callWithABIPost(uint32_t stackAdjust, MoveOp::Type result,
+ bool callFromWasm) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::callWithABIPre(uint32_t* stackAdjust, bool callFromWasm) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::comment(const char* msg) { MOZ_CRASH(); }
+
+void MacroAssembler::flush() { MOZ_CRASH(); }
+
+void MacroAssembler::loadStoreBuffer(Register ptr, Register buffer) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::moveValue(const TypedOrValueRegister& src,
+ const ValueOperand& dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::moveValue(const ValueOperand& src,
+ const ValueOperand& dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::moveValue(const Value& src, const ValueOperand& dest) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmCompareExchange64(const wasm::MemoryAccessDesc& access,
+ const Address& mem,
+ Register64 expected,
+ Register64 replacement,
+ Register64 output) {
+ MOZ_CRASH();
+}
+
+void MacroAssembler::wasmCompareExchange64(const wasm::MemoryAccessDesc& access,
+ const BaseIndex& mem,
+ Register64 expected,
+ Register64 replacement,
+ Register64 output) {
+ MOZ_CRASH();
+}
+
+//}}} check_macroassembler_style
+
+void MacroAssemblerWasm32::executableCopy(void* buffer) { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::jump(Label* label) { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::writeCodePointer(CodeLabel* label) { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::haltingAlign(size_t) { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::nopAlign(size_t) { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::checkStackAlignment() { MOZ_CRASH(); }
+
+uint32_t MacroAssemblerWasm32::currentOffset() {
+ MOZ_CRASH();
+ return 0;
+}
+
+void MacroAssemblerWasm32::nop() { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::breakpoint() { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::abiret() { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::ret() { MOZ_CRASH(); }
+
+CodeOffset MacroAssemblerWasm32::toggledJump(Label*) { MOZ_CRASH(); }
+
+CodeOffset MacroAssemblerWasm32::toggledCall(JitCode*, bool) { MOZ_CRASH(); }
+
+size_t MacroAssemblerWasm32::ToggledCallSize(uint8_t*) { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::finish() { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::pushValue(ValueOperand val) { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::popValue(ValueOperand) { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::tagValue(JSValueType, Register, ValueOperand) {
+ MOZ_CRASH();
+}
+
+void MacroAssemblerWasm32::retn(Imm32 n) { MOZ_CRASH(); }
+
+void MacroAssemblerWasm32::push(Register reg) { MOZ_CRASH(); }
+
+Address MacroAssemblerWasm32::ToType(const Address& address) { MOZ_CRASH(); }
+
+} // namespace js::jit
diff --git a/js/src/jit/wasm32/MacroAssembler-wasm32.h b/js/src/jit/wasm32/MacroAssembler-wasm32.h
new file mode 100644
index 0000000000..e876cfff1e
--- /dev/null
+++ b/js/src/jit/wasm32/MacroAssembler-wasm32.h
@@ -0,0 +1,528 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef jit_wasm32_MacroAssembler_wasm32_h
+#define jit_wasm32_MacroAssembler_wasm32_h
+
+#include "jit/wasm32/Assembler-wasm32.h"
+
+namespace js::jit {
+
+class CompactBufferReader;
+
+class ScratchTagScope {
+ public:
+ ScratchTagScope(MacroAssembler&, const ValueOperand) {}
+ operator Register() { MOZ_CRASH(); }
+ void release() { MOZ_CRASH(); }
+ void reacquire() { MOZ_CRASH(); }
+};
+
+class ScratchTagScopeRelease {
+ public:
+ explicit ScratchTagScopeRelease(ScratchTagScope*) {}
+};
+
+class MacroAssemblerWasm32 : public Assembler {
+ public:
+ size_t size() const { return bytesNeeded(); }
+
+ size_t bytesNeeded() const { MOZ_CRASH(); }
+
+ size_t jumpRelocationTableBytes() const { MOZ_CRASH(); }
+
+ size_t dataRelocationTableBytes() const { MOZ_CRASH(); }
+
+ size_t preBarrierTableBytes() const { MOZ_CRASH(); }
+
+ size_t numCodeLabels() const { MOZ_CRASH(); }
+ CodeLabel codeLabel(size_t) { MOZ_CRASH(); }
+
+ bool reserve(size_t size) { MOZ_CRASH(); }
+ bool appendRawCode(const uint8_t* code, size_t numBytes) { MOZ_CRASH(); }
+ bool swapBuffer(wasm::Bytes& bytes) { MOZ_CRASH(); }
+
+ void assertNoGCThings() const { MOZ_CRASH(); }
+
+ static void TraceJumpRelocations(JSTracer*, JitCode*, CompactBufferReader&) {
+ MOZ_CRASH();
+ }
+ static void TraceDataRelocations(JSTracer*, JitCode*, CompactBufferReader&) {
+ MOZ_CRASH();
+ }
+
+ static bool SupportsFloatingPoint() { return true; }
+ static bool SupportsUnalignedAccesses() { return false; }
+ static bool SupportsFastUnalignedFPAccesses() { return false; }
+
+ void executableCopy(void* buffer);
+
+ void copyJumpRelocationTable(uint8_t*) { MOZ_CRASH(); }
+
+ void copyDataRelocationTable(uint8_t*) { MOZ_CRASH(); }
+
+ void copyPreBarrierTable(uint8_t*) { MOZ_CRASH(); }
+
+ void processCodeLabels(uint8_t*) { MOZ_CRASH(); }
+
+ void flushBuffer() { MOZ_CRASH(); }
+
+ void bind(Label* label) { MOZ_CRASH(); }
+
+ void bind(CodeLabel* label) { MOZ_CRASH(); }
+
+ template <typename T>
+ void j(Condition, T) {
+ MOZ_CRASH();
+ }
+
+ void jump(Label* label);
+
+ void jump(JitCode* code) { MOZ_CRASH(); }
+
+ void jump(Register reg) { MOZ_CRASH(); }
+
+ void jump(const Address& address) { MOZ_CRASH(); }
+
+ void jump(ImmPtr ptr) { MOZ_CRASH(); }
+
+ void jump(TrampolinePtr code) { MOZ_CRASH(); }
+
+ void writeCodePointer(CodeLabel* label);
+
+ void haltingAlign(size_t);
+
+ void nopAlign(size_t);
+ void checkStackAlignment();
+
+ uint32_t currentOffset();
+
+ void nop();
+
+ void breakpoint();
+
+ void abiret();
+ void ret();
+
+ CodeOffset toggledJump(Label*);
+ CodeOffset toggledCall(JitCode*, bool);
+ static size_t ToggledCallSize(uint8_t*);
+
+ void finish();
+
+ template <typename T, typename S>
+ void moveValue(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S, typename U>
+ void moveValue(T, S, U) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void storeValue(const T&, const S&) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S, typename U>
+ void storeValue(T, S, U) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void storePrivateValue(const T&, const S&) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void loadValue(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void loadUnalignedValue(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void pushValue(const T&) {
+ MOZ_CRASH();
+ }
+
+ void pushValue(ValueOperand val);
+
+ template <typename T, typename S>
+ void pushValue(T, S) {
+ MOZ_CRASH();
+ }
+
+ void popValue(ValueOperand);
+ void tagValue(JSValueType, Register, ValueOperand);
+ void retn(Imm32 n);
+
+ template <typename T>
+ void push(const T&) {
+ MOZ_CRASH();
+ }
+
+ void push(Register reg);
+
+ template <typename T>
+ void Push(T) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void pop(T) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ CodeOffset pushWithPatch(T) {
+ MOZ_CRASH();
+ }
+
+ void testNullSet(Condition, ValueOperand, Register) { MOZ_CRASH(); }
+ void testObjectSet(Condition, ValueOperand, Register) { MOZ_CRASH(); }
+ void testUndefinedSet(Condition, ValueOperand, Register) { MOZ_CRASH(); }
+
+ template <typename T, typename S>
+ void cmpPtrSet(Condition, T, S, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void mov(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void movePtr(T, Register) {
+ MOZ_CRASH();
+ }
+
+ void movePtr(Register src, Register dst) { MOZ_CRASH(); }
+
+ template <typename T>
+ void move32(const T&, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void movq(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void moveFloat32(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void moveDouble(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void move64(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ CodeOffset movWithPatch(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void loadPtr(T, Register) {
+ MOZ_CRASH();
+ }
+
+ void loadPtr(const Address& address, Register dest) { MOZ_CRASH(); }
+
+ template <typename T>
+ void load32(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void load32Unaligned(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void loadFloat32(T, FloatRegister) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void loadDouble(T, FloatRegister) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void loadPrivate(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void load8SignExtend(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void load8ZeroExtend(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void load16SignExtend(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void load16UnalignedSignExtend(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void load16ZeroExtend(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void load16UnalignedZeroExtend(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void load64(T, Register64) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void load64Unaligned(T, Register64) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void storePtr(const T&, S) {
+ MOZ_CRASH();
+ }
+
+ void storePtr(Register src, const Address& address) { MOZ_CRASH(); }
+ void storePtr(ImmPtr src, const Address& address) { MOZ_CRASH(); }
+
+ template <typename T, typename S>
+ void store32(T, S) {
+ MOZ_CRASH();
+ }
+
+ void store32(Imm32 src, const Address& address) { MOZ_CRASH(); }
+
+ template <typename T, typename S>
+ void store32Unaligned(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void storeFloat32(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void storeDouble(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void store8(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void store16(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void store16Unaligned(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void store64(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T, typename S>
+ void store64Unaligned(T, S) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void computeEffectiveAddress(T, Register) {
+ MOZ_CRASH();
+ }
+
+ void splitTagForTest(ValueOperand, ScratchTagScope&) { MOZ_CRASH(); }
+
+ void boxDouble(FloatRegister, ValueOperand, FloatRegister) { MOZ_CRASH(); }
+ void boxNonDouble(JSValueType, Register, ValueOperand) { MOZ_CRASH(); }
+
+ template <typename T>
+ void boxDouble(FloatRegister src, const T& dest) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void unboxInt32(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void unboxBoolean(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void unboxString(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void unboxSymbol(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void unboxBigInt(T, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void unboxObject(T, Register) {
+ MOZ_CRASH();
+ }
+
+ void unboxObject(const Address& src, Register dest) {
+ unboxNonDouble(src, dest, JSVAL_TYPE_OBJECT);
+ }
+
+ template <typename T>
+ void unboxDouble(T, FloatRegister) {
+ MOZ_CRASH();
+ }
+
+ void unboxValue(const ValueOperand&, AnyRegister, JSValueType) {
+ MOZ_CRASH();
+ }
+
+ void unboxNonDouble(const ValueOperand&, Register, JSValueType) {
+ MOZ_CRASH();
+ }
+
+ void unboxNonDouble(const Address& address, Register dest, JSValueType type) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void unboxGCThingForGCBarrier(const T&, Register) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void unboxObjectOrNull(const T& src, Register dest) {
+ MOZ_CRASH();
+ }
+
+ void notBoolean(ValueOperand) { MOZ_CRASH(); }
+ [[nodiscard]] Register extractObject(Address, Register) { MOZ_CRASH(); }
+ [[nodiscard]] Register extractObject(ValueOperand, Register) { MOZ_CRASH(); }
+ [[nodiscard]] Register extractSymbol(ValueOperand, Register) { MOZ_CRASH(); }
+ [[nodiscard]] Register extractInt32(ValueOperand, Register) { MOZ_CRASH(); }
+ [[nodiscard]] Register extractBoolean(ValueOperand, Register) { MOZ_CRASH(); }
+
+ template <typename T>
+ [[nodiscard]] Register extractTag(T, Register) {
+ MOZ_CRASH();
+ }
+
+ void convertFloat32ToInt32(FloatRegister, Register, Label*, bool v = true) {
+ MOZ_CRASH();
+ }
+ void convertDoubleToInt32(FloatRegister, Register, Label*, bool v = true) {
+ MOZ_CRASH();
+ }
+ void convertDoubleToPtr(FloatRegister, Register, Label*, bool v = true) {
+ MOZ_CRASH();
+ }
+ void convertBoolToInt32(Register, Register) { MOZ_CRASH(); }
+ void convertDoubleToFloat32(FloatRegister, FloatRegister) { MOZ_CRASH(); }
+ void convertInt32ToFloat32(Register, FloatRegister) { MOZ_CRASH(); }
+
+ template <typename T>
+ void convertInt32ToDouble(T, FloatRegister) {
+ MOZ_CRASH();
+ }
+
+ void convertFloat32ToDouble(FloatRegister, FloatRegister) { MOZ_CRASH(); }
+
+ void boolValueToDouble(ValueOperand, FloatRegister) { MOZ_CRASH(); }
+ void boolValueToFloat32(ValueOperand, FloatRegister) { MOZ_CRASH(); }
+ void int32ValueToDouble(ValueOperand, FloatRegister) { MOZ_CRASH(); }
+ void int32ValueToFloat32(ValueOperand, FloatRegister) { MOZ_CRASH(); }
+
+ void loadConstantDouble(double, FloatRegister) { MOZ_CRASH(); }
+ void loadConstantFloat32(float, FloatRegister) { MOZ_CRASH(); }
+ Condition testInt32Truthy(bool, ValueOperand) { MOZ_CRASH(); }
+ Condition testStringTruthy(bool, ValueOperand) { MOZ_CRASH(); }
+ Condition testBigIntTruthy(bool, ValueOperand) { MOZ_CRASH(); }
+
+ template <typename T>
+ void loadUnboxedValue(T, MIRType, AnyRegister) {
+ MOZ_CRASH();
+ }
+
+ template <typename T>
+ void storeUnboxedPayload(ValueOperand value, T, size_t, JSValueType) {
+ MOZ_CRASH();
+ }
+
+ void convertUInt32ToDouble(Register, FloatRegister) { MOZ_CRASH(); }
+ void convertUInt32ToFloat32(Register, FloatRegister) { MOZ_CRASH(); }
+ void incrementInt32Value(Address) { MOZ_CRASH(); }
+ void ensureDouble(ValueOperand, FloatRegister, Label*) { MOZ_CRASH(); }
+ void handleFailureWithHandlerTail(Label*, Label*) { MOZ_CRASH(); }
+
+ void buildFakeExitFrame(Register, uint32_t*) { MOZ_CRASH(); }
+ bool buildOOLFakeExitFrame(void*) { MOZ_CRASH(); }
+
+ void setPrinter(Sprinter*) { MOZ_CRASH(); }
+ Operand ToPayload(Operand base) { MOZ_CRASH(); }
+ Address ToPayload(const Address& base) const { return base; }
+
+ Register getStackPointer() const { return StackPointer; }
+
+ // Instrumentation for entering and leaving the profiler.
+ void profilerEnterFrame(Register, Register) { MOZ_CRASH(); }
+ void profilerExitFrame() { MOZ_CRASH(); }
+
+#ifdef JS_NUNBOX32
+ Address ToType(const Address& address);
+#endif
+};
+
+typedef MacroAssemblerWasm32 MacroAssemblerSpecific;
+
+static inline bool GetTempRegForIntArg(uint32_t, uint32_t, Register*) {
+ MOZ_CRASH();
+}
+
+} // namespace js::jit
+
+#endif /* jit_wasm32_MacroAssembler_wasm32_h */
diff --git a/js/src/jit/wasm32/MoveEmitter-wasm32.h b/js/src/jit/wasm32/MoveEmitter-wasm32.h
new file mode 100644
index 0000000000..01fc494dfd
--- /dev/null
+++ b/js/src/jit/wasm32/MoveEmitter-wasm32.h
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef jit_wasm32_MoveEmitter_wasm32_h
+#define jit_wasm32_MoveEmitter_wasm32_h
+
+#include "mozilla/Assertions.h"
+
+namespace js::jit {
+
+class MacroAssemblerWasm32;
+class MoveResolver;
+struct Register;
+
+class MoveEmitterWasm32 {
+ public:
+ explicit MoveEmitterWasm32(MacroAssemblerWasm32&) { MOZ_CRASH(); }
+ void emit(const MoveResolver&) { MOZ_CRASH(); }
+ void finish() { MOZ_CRASH(); }
+ void setScratchRegister(Register) { MOZ_CRASH(); }
+};
+
+typedef MoveEmitterWasm32 MoveEmitter;
+
+} // namespace js::jit
+
+#endif /* jit_wasm32_MoveEmitter_wasm32_h */
diff --git a/js/src/jit/wasm32/SharedICHelpers-wasm32-inl.h b/js/src/jit/wasm32/SharedICHelpers-wasm32-inl.h
new file mode 100644
index 0000000000..d4629dc93f
--- /dev/null
+++ b/js/src/jit/wasm32/SharedICHelpers-wasm32-inl.h
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef jit_wasm32_SharedICHelpers_wasm32_inl_h
+#define jit_wasm32_SharedICHelpers_wasm32_inl_h
+
+#include "jit/SharedICHelpers.h"
+
+namespace js::jit {
+
+inline void EmitBaselineTailCallVM(TrampolinePtr, MacroAssembler&, uint32_t) {
+ MOZ_CRASH();
+}
+inline void EmitBaselineCreateStubFrameDescriptor(MacroAssembler&, Register,
+ uint32_t) {
+ MOZ_CRASH();
+}
+inline void EmitBaselineCallVM(TrampolinePtr, MacroAssembler&) { MOZ_CRASH(); }
+
+static const uint32_t STUB_FRAME_SIZE = 0;
+static const uint32_t STUB_FRAME_SAVED_STUB_OFFSET = 0;
+
+inline void EmitBaselineEnterStubFrame(MacroAssembler&, Register) {
+ MOZ_CRASH();
+}
+
+} // namespace js::jit
+
+#endif /* jit_wasm32_SharedICHelpers_wasm32_inl_h */
diff --git a/js/src/jit/wasm32/SharedICHelpers-wasm32.h b/js/src/jit/wasm32/SharedICHelpers-wasm32.h
new file mode 100644
index 0000000000..f45b085838
--- /dev/null
+++ b/js/src/jit/wasm32/SharedICHelpers-wasm32.h
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef jit_wasm32_SharedICHelpers_wasm32_h
+#define jit_wasm32_SharedICHelpers_wasm32_h
+
+namespace js::jit {
+
+static const size_t ICStackValueOffset = 0;
+
+inline void EmitRestoreTailCallReg(MacroAssembler&) { MOZ_CRASH(); }
+inline void EmitRepushTailCallReg(MacroAssembler&) { MOZ_CRASH(); }
+inline void EmitCallIC(MacroAssembler&, CodeOffset*) { MOZ_CRASH(); }
+inline void EmitReturnFromIC(MacroAssembler&) { MOZ_CRASH(); }
+inline void EmitBaselineLeaveStubFrame(MacroAssembler&, bool v = false) {
+ MOZ_CRASH();
+}
+inline void EmitStubGuardFailure(MacroAssembler&) { MOZ_CRASH(); }
+
+template <typename T>
+inline void EmitPreBarrier(MacroAssembler&, T, MIRType) {
+ MOZ_CRASH();
+}
+
+} // namespace js::jit
+
+#endif /* jit_wasm32_SharedICHelpers_wasm32_h */
diff --git a/js/src/jit/wasm32/SharedICRegisters-wasm32.h b/js/src/jit/wasm32/SharedICRegisters-wasm32.h
new file mode 100644
index 0000000000..23e43b2239
--- /dev/null
+++ b/js/src/jit/wasm32/SharedICRegisters-wasm32.h
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef jit_wasm32_SharedICRegisters_wasm32_h
+#define jit_wasm32_SharedICRegisters_wasm32_h
+
+#include "jit/Registers.h"
+#include "jit/RegisterSets.h"
+#include "jit/wasm32/MacroAssembler-wasm32.h"
+
+namespace js::jit {
+
+static constexpr Register BaselineStackReg = StackPointer;
+static constexpr Register BaselineFrameReg = FramePointer;
+
+static constexpr ValueOperand R0 = JSReturnOperand;
+static constexpr ValueOperand R1 = JSReturnOperand;
+static constexpr ValueOperand R2 = JSReturnOperand;
+
+static constexpr Register ICTailCallReg{Registers::invalid_reg};
+static constexpr Register ICStubReg{Registers::invalid_reg};
+
+static constexpr Register ExtractTemp0{Registers::invalid_reg};
+static constexpr Register ExtractTemp1{Registers::invalid_reg};
+
+static constexpr FloatRegister FloatReg0 = {FloatRegisters::invalid_reg};
+static constexpr FloatRegister FloatReg1 = {FloatRegisters::invalid_reg};
+static constexpr FloatRegister FloatReg2 = {FloatRegisters::invalid_reg};
+static constexpr FloatRegister FloatReg3 = {FloatRegisters::invalid_reg};
+
+} // namespace js::jit
+
+#endif /* jit_wasm32_SharedICRegisters_wasm32_h */
diff --git a/js/src/jit/wasm32/Trampoline-wasm32.cpp b/js/src/jit/wasm32/Trampoline-wasm32.cpp
new file mode 100644
index 0000000000..7c4c4db348
--- /dev/null
+++ b/js/src/jit/wasm32/Trampoline-wasm32.cpp
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "jit/Bailouts.h"
+#include "jit/BaselineIC.h"
+#include "jit/JitRuntime.h"
+#include "vm/Realm.h"
+
+using namespace js;
+using namespace js::jit;
+
+void JitRuntime::generateEnterJIT(JSContext*, MacroAssembler&) { MOZ_CRASH(); }
+
+// static
+mozilla::Maybe<::JS::ProfilingFrameIterator::RegisterState>
+JitRuntime::getCppEntryRegisters(JitFrameLayout* frameStackAddress) {
+ return mozilla::Nothing{};
+}
+
+void JitRuntime::generateInvalidator(MacroAssembler&, Label*) { MOZ_CRASH(); }
+
+void JitRuntime::generateArgumentsRectifier(MacroAssembler&,
+ ArgumentsRectifierKind kind) {
+ MOZ_CRASH();
+}
+
+void JitRuntime::generateBailoutHandler(MacroAssembler&, Label*) {
+ MOZ_CRASH();
+}
+
+uint32_t JitRuntime::generatePreBarrier(JSContext*, MacroAssembler&, MIRType) {
+ MOZ_CRASH();
+ return 0;
+}
+
+void JitRuntime::generateBailoutTailStub(MacroAssembler&, Label*) {
+ MOZ_CRASH();
+}
+
+bool JitRuntime::generateVMWrapper(JSContext*, MacroAssembler&,
+ const VMFunctionData&, DynFn, uint32_t*) {
+ MOZ_CRASH();
+}