diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /js/src/jit/none | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | js/src/jit/none/Architecture-none.h | 171 | ||||
-rw-r--r-- | js/src/jit/none/Assembler-none.h | 211 | ||||
-rw-r--r-- | js/src/jit/none/CodeGenerator-none.h | 78 | ||||
-rw-r--r-- | js/src/jit/none/LIR-none.h | 111 | ||||
-rw-r--r-- | js/src/jit/none/Lowering-none.h | 130 | ||||
-rw-r--r-- | js/src/jit/none/MacroAssembler-none.h | 454 | ||||
-rw-r--r-- | js/src/jit/none/MoveEmitter-none.h | 32 | ||||
-rw-r--r-- | js/src/jit/none/SharedICHelpers-none-inl.h | 31 | ||||
-rw-r--r-- | js/src/jit/none/SharedICHelpers-none.h | 32 | ||||
-rw-r--r-- | js/src/jit/none/SharedICRegisters-none.h | 32 | ||||
-rw-r--r-- | js/src/jit/none/Trampoline-none.cpp | 43 |
11 files changed, 1325 insertions, 0 deletions
diff --git a/js/src/jit/none/Architecture-none.h b/js/src/jit/none/Architecture-none.h new file mode 100644 index 0000000000..2433234fbf --- /dev/null +++ b/js/src/jit/none/Architecture-none.h @@ -0,0 +1,171 @@ +/* -*- 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_none_Architecture_none_h +#define jit_none_Architecture_none_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 { +namespace 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 { + r0 = 0, + 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 = invalid_reg; + static const Encoding Invalid = invalid_reg; + static const uint32_t Total = 1; + 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 jit +} // namespace js + +#endif /* jit_none_Architecture_none_h */ diff --git a/js/src/jit/none/Assembler-none.h b/js/src/jit/none/Assembler-none.h new file mode 100644 index 0000000000..b69fc462e2 --- /dev/null +++ b/js/src/jit/none/Assembler-none.h @@ -0,0 +1,211 @@ +/* -*- 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_none_Assembler_none_h +#define jit_none_Assembler_none_h + +#include "mozilla/Assertions.h" + +#include <stdint.h> + +#include "jit/none/Architecture-none.h" +#include "jit/Registers.h" +#include "jit/RegisterSets.h" +#include "jit/shared/Assembler-shared.h" + +namespace js { +namespace jit { + +class MacroAssembler; + +static constexpr Register StackPointer{Registers::invalid_reg}; +static constexpr Register FramePointer{Registers::invalid_reg}; +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(InvalidReg, InvalidReg); +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; + +class Assembler : public AssemblerShared { + 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() { MOZ_CRASH(); } + ABIArg next(MIRType) { MOZ_CRASH(); } + ABIArg& current() { MOZ_CRASH(); } + uint32_t stackBytesConsumedSoFar() const { MOZ_CRASH(); } + void increaseStackOffset(uint32_t) { MOZ_CRASH(); } +}; + +} // namespace jit +} // namespace js + +#endif /* jit_none_Assembler_none_h */ diff --git a/js/src/jit/none/CodeGenerator-none.h b/js/src/jit/none/CodeGenerator-none.h new file mode 100644 index 0000000000..6efd71555e --- /dev/null +++ b/js/src/jit/none/CodeGenerator-none.h @@ -0,0 +1,78 @@ +/* -*- 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_none_CodeGenerator_none_h +#define jit_none_CodeGenerator_none_h + +#include "jit/shared/CodeGenerator-shared.h" + +namespace js { +namespace jit { + +class CodeGeneratorNone : public CodeGeneratorShared { + protected: + CodeGeneratorNone(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 CodeGeneratorNone CodeGeneratorSpecific; + +} // namespace jit +} // namespace js + +#endif /* jit_none_CodeGenerator_none_h */ diff --git a/js/src/jit/none/LIR-none.h b/js/src/jit/none/LIR-none.h new file mode 100644 index 0000000000..c04578630e --- /dev/null +++ b/js/src/jit/none/LIR-none.h @@ -0,0 +1,111 @@ +/* -*- 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_none_LIR_none_h +#define jit_none_LIR_none_h + +namespace js { +namespace 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 jit +} // namespace js + +#endif /* jit_none_LIR_none_h */ diff --git a/js/src/jit/none/Lowering-none.h b/js/src/jit/none/Lowering-none.h new file mode 100644 index 0000000000..ad804b970b --- /dev/null +++ b/js/src/jit/none/Lowering-none.h @@ -0,0 +1,130 @@ +/* -*- 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_none_Lowering_none_h +#define jit_none_Lowering_none_h + +#include "jit/shared/Lowering-shared.h" + +namespace js { +namespace jit { + +class LIRGeneratorNone : public LIRGeneratorShared { + protected: + LIRGeneratorNone(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 LIRGeneratorNone LIRGeneratorSpecific; + +} // namespace jit +} // namespace js + +#endif /* jit_none_Lowering_none_h */ diff --git a/js/src/jit/none/MacroAssembler-none.h b/js/src/jit/none/MacroAssembler-none.h new file mode 100644 index 0000000000..2a89c8836f --- /dev/null +++ b/js/src/jit/none/MacroAssembler-none.h @@ -0,0 +1,454 @@ +/* -*- 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_none_MacroAssembler_none_h +#define jit_none_MacroAssembler_none_h + +#include <iterator> + +#include "jit/MoveResolver.h" +#include "jit/none/Assembler-none.h" +#include "wasm/WasmTypeDecls.h" + +namespace js { +namespace 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 MacroAssemblerNone : public Assembler { + public: + MacroAssemblerNone() { MOZ_CRASH(); } + + MoveResolver moveResolver_; + + size_t size() const { MOZ_CRASH(); } + 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 false; } + static bool SupportsUnalignedAccesses() { return false; } + static bool SupportsFastUnalignedFPAccesses() { return false; } + + void executableCopy(void*, bool = true) { MOZ_CRASH(); } + 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(); } + + template <typename T> + void bind(T) { + MOZ_CRASH(); + } + template <typename T> + void j(Condition, T) { + MOZ_CRASH(); + } + template <typename T> + void jump(T) { + MOZ_CRASH(); + } + void writeCodePointer(CodeLabel* label) { MOZ_CRASH(); } + void haltingAlign(size_t) { MOZ_CRASH(); } + void nopAlign(size_t) { MOZ_CRASH(); } + void checkStackAlignment() { MOZ_CRASH(); } + uint32_t currentOffset() { MOZ_CRASH(); } + + void nop() { MOZ_CRASH(); } + void breakpoint() { MOZ_CRASH(); } + void abiret() { MOZ_CRASH(); } + void ret() { MOZ_CRASH(); } + + CodeOffset toggledJump(Label*) { MOZ_CRASH(); } + CodeOffset toggledCall(JitCode*, bool) { MOZ_CRASH(); } + static size_t ToggledCallSize(uint8_t*) { MOZ_CRASH(); } + + void finish() { MOZ_CRASH(); } + + 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(); + } + template <typename T, typename S> + void pushValue(T, S) { + MOZ_CRASH(); + } + void popValue(ValueOperand) { MOZ_CRASH(); } + void tagValue(JSValueType, Register, ValueOperand) { MOZ_CRASH(); } + void retn(Imm32 n) { MOZ_CRASH(); } + template <typename T> + void push(const T&) { + MOZ_CRASH(); + } + template <typename T> + void Push(T) { + MOZ_CRASH(); + } + template <typename T> + void pop(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(); + } + void cmp8Set(Condition, Address, Imm32, Register) { MOZ_CRASH(); } + void cmp16Set(Condition, Address, Imm32, Register) { MOZ_CRASH(); } + template <typename T, typename S> + void cmp32Set(Condition, T, S, Register) { + MOZ_CRASH(); + } + void cmp64Set(Condition, Address, Imm64, Register) { MOZ_CRASH(); } + + template <typename T> + void mov(T, Register) { + MOZ_CRASH(); + } + template <typename T> + void movePtr(T, Register) { + 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(); + } + 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(); + } + template <typename T, typename S> + void store32(T, S) { + 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(); + } + 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&, Register, JSValueType) { 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 storeUnboxedValue(const ConstantOrRegister&, MIRType, T) { + 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(Address) { MOZ_CRASH(); } + + Register getStackPointer() const { MOZ_CRASH(); } + + // Instrumentation for entering and leaving the profiler. + void profilerEnterFrame(Register, Register) { MOZ_CRASH(); } + void profilerExitFrame() { MOZ_CRASH(); } + +#ifdef JS_NUNBOX32 + Address ToType(Address) { MOZ_CRASH(); } +#endif +}; + +typedef MacroAssemblerNone MacroAssemblerSpecific; + +static inline bool GetTempRegForIntArg(uint32_t, uint32_t, Register*) { + MOZ_CRASH(); +} + +} // namespace jit +} // namespace js + +#endif /* jit_none_MacroAssembler_none_h */ diff --git a/js/src/jit/none/MoveEmitter-none.h b/js/src/jit/none/MoveEmitter-none.h new file mode 100644 index 0000000000..39e60bfaee --- /dev/null +++ b/js/src/jit/none/MoveEmitter-none.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_none_MoveEmitter_none_h +#define jit_none_MoveEmitter_none_h + +#include "mozilla/Assertions.h" + +namespace js { +namespace jit { + +class MacroAssemblerNone; +class MoveResolver; +struct Register; + +class MoveEmitterNone { + public: + explicit MoveEmitterNone(MacroAssemblerNone&) { MOZ_CRASH(); } + void emit(const MoveResolver&) { MOZ_CRASH(); } + void finish() { MOZ_CRASH(); } + void setScratchRegister(Register) { MOZ_CRASH(); } +}; + +typedef MoveEmitterNone MoveEmitter; + +} // namespace jit +} // namespace js + +#endif /* jit_none_MoveEmitter_none_h */ diff --git a/js/src/jit/none/SharedICHelpers-none-inl.h b/js/src/jit/none/SharedICHelpers-none-inl.h new file mode 100644 index 0000000000..2d63956ba7 --- /dev/null +++ b/js/src/jit/none/SharedICHelpers-none-inl.h @@ -0,0 +1,31 @@ +/* -*- 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_none_SharedICHelpers_none_inl_h +#define jit_none_SharedICHelpers_none_inl_h + +#include "jit/SharedICHelpers.h" + +namespace js { +namespace 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(); } + +inline void EmitBaselineEnterStubFrame(MacroAssembler&, Register) { + MOZ_CRASH(); +} + +} // namespace jit +} // namespace js + +#endif /* jit_none_SharedICHelpers_none_inl_h */ diff --git a/js/src/jit/none/SharedICHelpers-none.h b/js/src/jit/none/SharedICHelpers-none.h new file mode 100644 index 0000000000..8c2b4ee396 --- /dev/null +++ b/js/src/jit/none/SharedICHelpers-none.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_none_SharedICHelpers_none_h +#define jit_none_SharedICHelpers_none_h + +namespace js { +namespace 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 jit +} // namespace js + +#endif /* jit_none_SharedICHelpers_none_h */ diff --git a/js/src/jit/none/SharedICRegisters-none.h b/js/src/jit/none/SharedICRegisters-none.h new file mode 100644 index 0000000000..170e5058a9 --- /dev/null +++ b/js/src/jit/none/SharedICRegisters-none.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_none_SharedICRegisters_none_h +#define jit_none_SharedICRegisters_none_h + +#include "jit/none/MacroAssembler-none.h" +#include "jit/Registers.h" +#include "jit/RegisterSets.h" + +namespace js { +namespace jit { + +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 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 jit +} // namespace js + +#endif /* jit_none_SharedICRegisters_none_h */ diff --git a/js/src/jit/none/Trampoline-none.cpp b/js/src/jit/none/Trampoline-none.cpp new file mode 100644 index 0000000000..d2ee3a9a05 --- /dev/null +++ b/js/src/jit/none/Trampoline-none.cpp @@ -0,0 +1,43 @@ +/* -*- 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; + +// This file includes stubs for generating the JIT trampolines when there is no +// JIT backend, and also includes implementations for assorted random things +// which can't be implemented in headers. + +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(); +} +void JitRuntime::generateBailoutTailStub(MacroAssembler&, Label*) { + MOZ_CRASH(); +} + +bool JitRuntime::generateVMWrapper(JSContext*, MacroAssembler&, + const VMFunctionData&, DynFn, uint32_t*) { + MOZ_CRASH(); +} |