summaryrefslogtreecommitdiffstats
path: root/js/src/jit/none
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit/none')
-rw-r--r--js/src/jit/none/Architecture-none.h157
-rw-r--r--js/src/jit/none/AtomicOperations-none.h134
-rw-r--r--js/src/jit/none/AtomicOperations-ppc.h242
-rw-r--r--js/src/jit/none/AtomicOperations-sparc.h251
-rw-r--r--js/src/jit/none/BaselineCompiler-none.h30
-rw-r--r--js/src/jit/none/CodeGenerator-none.h62
-rw-r--r--js/src/jit/none/LIR-none.h111
-rw-r--r--js/src/jit/none/LOpcodes-none.h14
-rw-r--r--js/src/jit/none/Lowering-none.h118
-rw-r--r--js/src/jit/none/MacroAssembler-none.h464
-rw-r--r--js/src/jit/none/MoveEmitter-none.h30
-rw-r--r--js/src/jit/none/SharedICHelpers-none.h42
-rw-r--r--js/src/jit/none/SharedICRegisters-none.h35
-rw-r--r--js/src/jit/none/Trampoline-none.cpp49
14 files changed, 1739 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 000000000..0fa54793c
--- /dev/null
+++ b/js/src/jit/none/Architecture-none.h
@@ -0,0 +1,157 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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"
+
+namespace js {
+namespace jit {
+
+static const bool SupportsSimd = false;
+static const uint32_t SimdMemoryAlignment = 4; // Make it 4 to avoid a bunch of div-by-zero warnings
+static const uint32_t WasmStackAlignment = 8;
+
+// Does this architecture support SIMD conversions between Uint32x4 and Float32x4?
+static constexpr bool SupportsUint32x4FloatConversions = false;
+
+// Does this architecture support comparisons of unsigned integer vectors?
+static constexpr bool SupportsUint8x16Compares = false;
+static constexpr bool SupportsUint16x8Compares = false;
+static constexpr bool SupportsUint32x4Compares = false;
+
+class Registers
+{
+ public:
+ enum RegisterID {
+ r0 = 0,
+ invalid_reg
+ };
+ 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 TempMask = 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 {
+ 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(); }
+ 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(); }
+ void aliased(uint32_t, FloatRegister*) { MOZ_CRASH(); }
+ bool equiv(FloatRegister) const { MOZ_CRASH(); }
+ uint32_t size() const { MOZ_CRASH(); }
+ uint32_t numAlignedAliased() const { MOZ_CRASH(); }
+ void alignedAliased(uint32_t, FloatRegister*) { MOZ_CRASH(); }
+ SetType alignedOrDominatedAliasedSet() const { MOZ_CRASH(); }
+ 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/AtomicOperations-none.h b/js/src/jit/none/AtomicOperations-none.h
new file mode 100644
index 000000000..f08ccf9e0
--- /dev/null
+++ b/js/src/jit/none/AtomicOperations-none.h
@@ -0,0 +1,134 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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/. */
+
+/* For documentation, see jit/AtomicOperations.h */
+
+#ifndef jit_none_AtomicOperations_none_h
+#define jit_none_AtomicOperations_none_h
+
+#include "mozilla/Assertions.h"
+
+// A "none" build is never run (ref IRC discussion with h4writer) and
+// all functions here can therefore MOZ_CRASH, even if they are
+// referenced from other than jitted code.
+
+inline bool
+js::jit::AtomicOperations::isLockfree8()
+{
+ MOZ_CRASH();
+}
+
+inline void
+js::jit::AtomicOperations::fenceSeqCst()
+{
+ MOZ_CRASH();
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::loadSeqCst(T* addr)
+{
+ MOZ_CRASH();
+}
+
+template<typename T>
+inline void
+js::jit::AtomicOperations::storeSeqCst(T* addr, T val)
+{
+ MOZ_CRASH();
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval)
+{
+ MOZ_CRASH();
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val)
+{
+ MOZ_CRASH();
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val)
+{
+ MOZ_CRASH();
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val)
+{
+ MOZ_CRASH();
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val)
+{
+ MOZ_CRASH();
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val)
+{
+ MOZ_CRASH();
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val)
+{
+ MOZ_CRASH();
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::loadSafeWhenRacy(T* addr)
+{
+ MOZ_CRASH();
+}
+
+template<typename T>
+inline void
+js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val)
+{
+ MOZ_CRASH();
+}
+
+inline void
+js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes)
+{
+ MOZ_CRASH();
+}
+
+inline void
+js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes)
+{
+ MOZ_CRASH();
+}
+
+template<size_t nbytes>
+inline void
+js::jit::RegionLock::acquire(void* addr)
+{
+ (void)spinlock; // Remove a lot of "unused" warnings.
+ MOZ_CRASH();
+}
+
+template<size_t nbytes>
+inline void
+js::jit::RegionLock::release(void* addr)
+{
+ MOZ_CRASH();
+}
+
+#endif // jit_none_AtomicOperations_none_h
diff --git a/js/src/jit/none/AtomicOperations-ppc.h b/js/src/jit/none/AtomicOperations-ppc.h
new file mode 100644
index 000000000..0f688445b
--- /dev/null
+++ b/js/src/jit/none/AtomicOperations-ppc.h
@@ -0,0 +1,242 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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/. */
+
+/* For documentation, see jit/AtomicOperations.h */
+
+#ifndef jit_ppc_AtomicOperations_ppc_h
+#define jit_ppc_AtomicOperations_ppc_h
+
+#include "mozilla/Assertions.h"
+#include "mozilla/Types.h"
+
+#if defined(__clang__) || defined(__GNUC__)
+
+// The default implementation tactic for gcc/clang is to use the newer
+// __atomic intrinsics added for use in C++11 <atomic>. Where that
+// isn't available, we use GCC's older __sync functions instead.
+//
+// ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward
+// compatible option for older compilers: enable this to use GCC's old
+// __sync functions instead of the newer __atomic functions. This
+// will be required for GCC 4.6.x and earlier, and probably for Clang
+// 3.1, should we need to use those versions.
+
+//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+
+inline bool
+js::jit::AtomicOperations::isLockfree8()
+{
+# ifndef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int8_t), 0));
+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int16_t), 0));
+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int32_t), 0));
+# if defined(__ppc64__) || defined (__PPC64__) || \
+ defined(__ppc64le__) || defined (__PPC64LE__)
+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int64_t), 0));
+# endif
+ return true;
+# else
+ return false;
+# endif
+}
+
+inline void
+js::jit::AtomicOperations::fenceSeqCst()
+{
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ __sync_synchronize();
+# else
+ __atomic_thread_fence(__ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::loadSeqCst(T* addr)
+{
+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ __sync_synchronize();
+ T v = *addr;
+ __sync_synchronize();
+# else
+ T v;
+ __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
+# endif
+ return v;
+}
+
+template<typename T>
+inline void
+js::jit::AtomicOperations::storeSeqCst(T* addr, T val)
+{
+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ __sync_synchronize();
+ *addr = val;
+ __sync_synchronize();
+# else
+ __atomic_store(addr, &val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval)
+{
+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_val_compare_and_swap(addr, oldval, newval);
+# else
+ __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
+ return oldval;
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val)
+{
+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_fetch_and_add(addr, val);
+# else
+ return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val)
+{
+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_fetch_and_sub(addr, val);
+# else
+ return __atomic_fetch_sub(addr, val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val)
+{
+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_fetch_and_and(addr, val);
+# else
+ return __atomic_fetch_and(addr, val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val)
+{
+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_fetch_and_or(addr, val);
+# else
+ return __atomic_fetch_or(addr, val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val)
+{
+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_fetch_and_xor(addr, val);
+# else
+ return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::loadSafeWhenRacy(T* addr)
+{
+ return *addr; // FIXME (1208663): not yet safe
+}
+
+template<typename T>
+inline void
+js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val)
+{
+ *addr = val; // FIXME (1208663): not yet safe
+}
+
+inline void
+js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes)
+{
+ ::memcpy(dest, src, nbytes); // FIXME (1208663): not yet safe
+}
+
+inline void
+js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes)
+{
+ ::memmove(dest, src, nbytes); // FIXME (1208663): not yet safe
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val)
+{
+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ T v;
+ __sync_synchronize();
+ do {
+ v = *addr;
+ } while (__sync_val_compare_and_swap(addr, v, val) != v);
+ return v;
+# else
+ T v;
+ __atomic_exchange(addr, &val, &v, __ATOMIC_SEQ_CST);
+ return v;
+# endif
+}
+
+template<size_t nbytes>
+inline void
+js::jit::RegionLock::acquire(void* addr)
+{
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ while (!__sync_bool_compare_and_swap(&spinlock, 0, 1))
+ ;
+# else
+ uint32_t zero = 0;
+ uint32_t one = 1;
+ while (!__atomic_compare_exchange(&spinlock, &zero, &one, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) {
+ zero = 0;
+ continue;
+ }
+# endif
+}
+
+template<size_t nbytes>
+inline void
+js::jit::RegionLock::release(void* addr)
+{
+ MOZ_ASSERT(AtomicOperations::loadSeqCst(&spinlock) == 1, "releasing unlocked region lock");
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ __sync_sub_and_fetch(&spinlock, 1);
+# else
+ uint32_t zero = 0;
+ __atomic_store(&spinlock, &zero, __ATOMIC_SEQ_CST);
+# endif
+}
+
+# undef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+
+#elif defined(ENABLE_SHARED_ARRAY_BUFFER)
+
+# error "Either disable JS shared memory, use GCC or Clang, or add code here"
+
+#endif
+
+#endif // jit_ppc_AtomicOperations_ppc_h
diff --git a/js/src/jit/none/AtomicOperations-sparc.h b/js/src/jit/none/AtomicOperations-sparc.h
new file mode 100644
index 000000000..706ada862
--- /dev/null
+++ b/js/src/jit/none/AtomicOperations-sparc.h
@@ -0,0 +1,251 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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/. */
+
+/* For documentation, see jit/AtomicOperations.h */
+
+#ifndef jit_sparc_AtomicOperations_sparc_h
+#define jit_sparc_AtomicOperations_sparc_h
+
+#include "mozilla/Assertions.h"
+#include "mozilla/Types.h"
+
+#if defined(__clang__) || defined(__GNUC__)
+
+// The default implementation tactic for gcc/clang is to use the newer
+// __atomic intrinsics added for use in C++11 <atomic>. Where that
+// isn't available, we use GCC's older __sync functions instead.
+//
+// ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward
+// compatible option for older compilers: enable this to use GCC's old
+// __sync functions instead of the newer __atomic functions. This
+// will be required for GCC 4.6.x and earlier, and probably for Clang
+// 3.1, should we need to use those versions.
+
+//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+
+inline bool
+js::jit::AtomicOperations::isLockfree8()
+{
+# ifndef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int8_t), 0));
+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int16_t), 0));
+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int32_t), 0));
+# if defined(__LP64__)
+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int64_t), 0));
+# endif
+ return true;
+# else
+ return false;
+# endif
+}
+
+inline void
+js::jit::AtomicOperations::fenceSeqCst()
+{
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ __sync_synchronize();
+# else
+ __atomic_thread_fence(__ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::loadSeqCst(T* addr)
+{
+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ __sync_synchronize();
+ T v = *addr;
+ __sync_synchronize();
+# else
+ T v;
+ __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
+# endif
+ return v;
+}
+
+template<typename T>
+inline void
+js::jit::AtomicOperations::storeSeqCst(T* addr, T val)
+{
+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ __sync_synchronize();
+ *addr = val;
+ __sync_synchronize();
+# else
+ __atomic_store(addr, &val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval)
+{
+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_val_compare_and_swap(addr, oldval, newval);
+# else
+ __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
+ return oldval;
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val)
+{
+#if !defined( __LP64__)
+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
+#endif
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_fetch_and_add(addr, val);
+# else
+ return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val)
+{
+#if !defined( __LP64__)
+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
+#endif
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_fetch_and_sub(addr, val);
+# else
+ return __atomic_fetch_sub(addr, val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val)
+{
+#if !defined( __LP64__)
+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
+#endif
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_fetch_and_and(addr, val);
+# else
+ return __atomic_fetch_and(addr, val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val)
+{
+#if !defined( __LP64__)
+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
+#endif
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_fetch_and_or(addr, val);
+# else
+ return __atomic_fetch_or(addr, val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val)
+{
+#if !defined( __LP64__)
+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
+#endif
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ return __sync_fetch_and_xor(addr, val);
+# else
+ return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST);
+# endif
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::loadSafeWhenRacy(T* addr)
+{
+ return *addr; // FIXME (1208663): not yet safe
+}
+
+template<typename T>
+inline void
+js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val)
+{
+ *addr = val; // FIXME (1208663): not yet safe
+}
+
+inline void
+js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes)
+{
+ ::memcpy(dest, src, nbytes); // FIXME (1208663): not yet safe
+}
+
+inline void
+js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes)
+{
+ ::memmove(dest, src, nbytes); // FIXME (1208663): not yet safe
+}
+
+template<typename T>
+inline T
+js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val)
+{
+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ T v;
+ __sync_synchronize();
+ do {
+ v = *addr;
+ } while (__sync_val_compare_and_swap(addr, v, val) != v);
+ return v;
+# else
+ T v;
+ __atomic_exchange(addr, &val, &v, __ATOMIC_SEQ_CST);
+ return v;
+# endif
+}
+
+template<size_t nbytes>
+inline void
+js::jit::RegionLock::acquire(void* addr)
+{
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ while (!__sync_bool_compare_and_swap(&spinlock, 0, 1))
+ ;
+# else
+ uint32_t zero = 0;
+ uint32_t one = 1;
+ while (!__atomic_compare_exchange(&spinlock, &zero, &one, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) {
+ zero = 0;
+ continue;
+ }
+# endif
+}
+
+template<size_t nbytes>
+inline void
+js::jit::RegionLock::release(void* addr)
+{
+ MOZ_ASSERT(AtomicOperations::loadSeqCst(&spinlock) == 1, "releasing unlocked region lock");
+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+ __sync_sub_and_fetch(&spinlock, 1);
+# else
+ uint32_t zero = 0;
+ __atomic_store(&spinlock, &zero, __ATOMIC_SEQ_CST);
+# endif
+}
+
+# undef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+
+#elif defined(ENABLE_SHARED_ARRAY_BUFFER)
+
+# error "Either disable JS shared memory, use GCC or Clang, or add code here"
+
+#endif
+
+#endif // jit_sparc_AtomicOperations_sparc_h
diff --git a/js/src/jit/none/BaselineCompiler-none.h b/js/src/jit/none/BaselineCompiler-none.h
new file mode 100644
index 000000000..ca0791eb3
--- /dev/null
+++ b/js/src/jit/none/BaselineCompiler-none.h
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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_BaselineCompiler_none_h
+#define jit_none_BaselineCompiler_none_h
+
+#include "jit/shared/BaselineCompiler-shared.h"
+
+namespace js {
+namespace jit {
+
+class BaselineCompilerNone : public BaselineCompilerShared
+{
+ protected:
+ BaselineCompilerNone(JSContext* cx, TempAllocator& alloc, JSScript* script)
+ : BaselineCompilerShared(cx, alloc, script)
+ {
+ MOZ_CRASH();
+ }
+};
+
+typedef BaselineCompilerNone BaselineCompilerSpecific;
+
+} // namespace jit
+} // namespace js
+
+#endif /* jit_none_BaselineCompiler_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 000000000..ad62ea452
--- /dev/null
+++ b/js/src/jit/none/CodeGenerator-none.h
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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
+{
+ public:
+ 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 T>
+ void bailoutTest32(Assembler::Condition, Register, T, 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(); }
+ ValueOperand ToValue(LInstruction*, size_t) { MOZ_CRASH(); }
+ ValueOperand ToOutValue(LInstruction*) { MOZ_CRASH(); }
+ ValueOperand ToTempValue(LInstruction*, size_t) { MOZ_CRASH(); }
+ void generateInvalidateEpilogue() { MOZ_CRASH(); }
+ void setReturnDoubleRegs(LiveRegisterSet* regs) { 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 000000000..44fa9d871
--- /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: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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:
+ 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:
+ MTableSwitch* mir() { MOZ_CRASH(); }
+
+ const LAllocation* index() { MOZ_CRASH(); }
+ const LDefinition* tempInt() { MOZ_CRASH(); }
+ const LDefinition* tempPointer() { MOZ_CRASH(); }
+};
+
+class LTableSwitchV : public LInstruction
+{
+ public:
+ 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 LInstruction
+{
+ public:
+ LWasmUint32ToFloat32(const LAllocation& ) { 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& ) {
+ MOZ_CRASH();
+ }
+ MDiv* mir() const { MOZ_CRASH(); }
+};
+class LDivPowTwoI : public LInstructionHelper<1, 1, 0>
+{
+ public:
+ LDivPowTwoI(const LAllocation& , int32_t ) { 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&)
+ {
+ MOZ_CRASH();
+ }
+
+ const LDefinition* callTemp() { MOZ_CRASH(); }
+ MMod* mir() const { MOZ_CRASH(); }
+};
+class LWasmUint32ToDouble : public LInstructionHelper<1, 1, 0>
+{
+ public:
+ LWasmUint32ToDouble(const LAllocation&) { MOZ_CRASH(); }
+};
+class LModPowTwoI : public LInstructionHelper<1, 1, 0>
+{
+
+ public:
+ int32_t shift() { MOZ_CRASH(); }
+ LModPowTwoI(const LAllocation& lhs, int32_t shift) { MOZ_CRASH(); }
+ MMod* mir() const { MOZ_CRASH(); }
+};
+
+class LGuardShape : public LInstruction {};
+class LGuardObjectGroup : public LInstruction {};
+class LMulI : public LInstruction {};
+
+} // namespace jit
+} // namespace js
+
+#endif /* jit_none_LIR_none_h */
diff --git a/js/src/jit/none/LOpcodes-none.h b/js/src/jit/none/LOpcodes-none.h
new file mode 100644
index 000000000..e897f40b3
--- /dev/null
+++ b/js/src/jit/none/LOpcodes-none.h
@@ -0,0 +1,14 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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_LOpcodes_none_h__
+#define jit_none_LOpcodes_none_h__
+
+#include "jit/shared/LOpcodes-shared.h"
+
+#define LIR_CPU_OPCODE_LIST(_)
+
+#endif // jit_none_LOpcodes_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 000000000..35c1b8231
--- /dev/null
+++ b/js/src/jit/none/Lowering-none.h
@@ -0,0 +1,118 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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
+{
+ public:
+ 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 defineUntypedPhi(MPhi*, 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(); }
+ 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 lowerForCompIx4(LSimdBinaryCompIx4* ins, MSimdBinaryComp* mir,
+ MDefinition* lhs, MDefinition* rhs) {
+ MOZ_CRASH();
+ }
+ void lowerForCompFx4(LSimdBinaryCompFx4* ins, MSimdBinaryComp* mir,
+ MDefinition* lhs, MDefinition* rhs) {
+ MOZ_CRASH();
+ }
+ void lowerForBitAndAndBranch(LBitAndAndBranch*, MInstruction*,
+ MDefinition*, MDefinition*) {
+ 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 lowerDivI(MDiv*) { MOZ_CRASH(); }
+ void lowerModI(MMod*) { MOZ_CRASH(); }
+ void lowerDivI64(MDiv*) { MOZ_CRASH(); }
+ void lowerModI64(MMod*) { MOZ_CRASH(); }
+ void lowerMulI(MMul*, MDefinition*, MDefinition*) { MOZ_CRASH(); }
+ void lowerUDiv(MDiv*) { MOZ_CRASH(); }
+ void lowerUMod(MMod*) { MOZ_CRASH(); }
+ void visitBox(MBox* box) { MOZ_CRASH(); }
+ void visitUnbox(MUnbox* unbox) { MOZ_CRASH(); }
+ void visitReturn(MReturn* ret) { MOZ_CRASH(); }
+ void visitPowHalf(MPowHalf*) { MOZ_CRASH(); }
+ void visitAsmJSNeg(MAsmJSNeg*) { MOZ_CRASH(); }
+ void visitGuardShape(MGuardShape* ins) { MOZ_CRASH(); }
+ void visitGuardObjectGroup(MGuardObjectGroup* ins) { MOZ_CRASH(); }
+ void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins) { MOZ_CRASH(); }
+ void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins) { MOZ_CRASH(); }
+ void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins) { MOZ_CRASH(); }
+ void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins) { MOZ_CRASH(); }
+ void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins) { MOZ_CRASH(); }
+ void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins) { MOZ_CRASH(); }
+ void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins) { MOZ_CRASH(); }
+ void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins) { MOZ_CRASH(); }
+ void visitAsmJSCompareExchangeHeap(MAsmJSCompareExchangeHeap* ins) { MOZ_CRASH(); }
+ void visitAsmJSAtomicExchangeHeap(MAsmJSAtomicExchangeHeap* ins) { MOZ_CRASH(); }
+ void visitAsmJSAtomicBinopHeap(MAsmJSAtomicBinopHeap* ins) { MOZ_CRASH(); }
+ void visitWasmSelect(MWasmSelect*) { MOZ_CRASH(); }
+ void visitWasmBoundsCheck(MWasmBoundsCheck* ins) { MOZ_CRASH(); }
+ void visitWasmLoad(MWasmLoad* ins) { MOZ_CRASH(); }
+ void visitWasmStore(MWasmStore* ins) { MOZ_CRASH(); }
+
+ LTableSwitch* newLTableSwitch(LAllocation, LDefinition, MTableSwitch*) { MOZ_CRASH(); }
+ LTableSwitchV* newLTableSwitchV(MTableSwitch*) { MOZ_CRASH(); }
+ void visitSimdSelect(MSimdSelect* ins) { MOZ_CRASH(); }
+ void visitSimdSplat(MSimdSplat* ins) { MOZ_CRASH(); }
+ void visitSimdSwizzle(MSimdSwizzle* ins) { MOZ_CRASH(); }
+ void visitSimdShuffle(MSimdShuffle* ins) { MOZ_CRASH(); }
+ void visitSimdValueX4(MSimdValueX4* lir) { MOZ_CRASH(); }
+ void visitSubstr(MSubstr*) { MOZ_CRASH(); }
+ void visitSimdBinaryArith(js::jit::MSimdBinaryArith*) { MOZ_CRASH(); }
+ void visitSimdBinarySaturating(MSimdBinarySaturating* ins) { MOZ_CRASH(); }
+ void visitRandom(js::jit::MRandom*) { MOZ_CRASH(); }
+ void visitCopySign(js::jit::MCopySign*) { MOZ_CRASH(); }
+ void visitWasmTruncateToInt64(MWasmTruncateToInt64*) { MOZ_CRASH(); }
+ void visitInt64ToFloatingPoint(MInt64ToFloatingPoint*) { MOZ_CRASH(); }
+ void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins) { 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 000000000..f27de5153
--- /dev/null
+++ b/js/src/jit/none/MacroAssembler-none.h
@@ -0,0 +1,464 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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 "jit/JitCompartment.h"
+#include "jit/MoveResolver.h"
+#include "jit/shared/Assembler-shared.h"
+
+namespace js {
+namespace jit {
+
+static constexpr Register StackPointer = { Registers::invalid_reg };
+static constexpr Register FramePointer = { Registers::invalid_reg };
+static constexpr Register ReturnReg = { Registers::invalid_reg };
+static constexpr FloatRegister ReturnFloat32Reg = { FloatRegisters::invalid_reg };
+static constexpr FloatRegister ReturnDoubleReg = { FloatRegisters::invalid_reg };
+static constexpr FloatRegister ReturnSimd128Reg = { FloatRegisters::invalid_reg };
+static constexpr FloatRegister ScratchFloat32Reg = { FloatRegisters::invalid_reg };
+static constexpr FloatRegister ScratchDoubleReg = { FloatRegisters::invalid_reg };
+static constexpr FloatRegister ScratchSimd128Reg = { FloatRegisters::invalid_reg };
+static constexpr FloatRegister InvalidFloatReg = { FloatRegisters::invalid_reg };
+
+static constexpr Register OsrFrameReg = { Registers::invalid_reg };
+static constexpr Register ArgumentsRectifierReg = { Registers::invalid_reg };
+static constexpr Register PreBarrierReg = { 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 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 GlobalReg = { Registers::invalid_reg };
+static constexpr Register HeapReg = { Registers::invalid_reg };
+
+static constexpr Register WasmIonExitRegCallee = { Registers::invalid_reg };
+static constexpr Register WasmIonExitRegE0 = { Registers::invalid_reg };
+static constexpr Register WasmIonExitRegE1 = { Registers::invalid_reg };
+
+static constexpr Register WasmIonExitRegReturnData = { Registers::invalid_reg };
+static constexpr Register WasmIonExitRegReturnType = { Registers::invalid_reg };
+static constexpr Register WasmIonExitRegD0 = { Registers::invalid_reg };
+static constexpr Register WasmIonExitRegD1 = { Registers::invalid_reg };
+static constexpr Register WasmIonExitRegD2 = { Registers::invalid_reg };
+
+static constexpr Register RegExpTesterRegExpReg = { Registers::invalid_reg };
+static constexpr Register RegExpTesterStringReg = { Registers::invalid_reg };
+static constexpr Register RegExpTesterLastIndexReg = { Registers::invalid_reg };
+static constexpr Register RegExpTesterStickyReg = { 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 RegExpMatcherStickyReg = { Registers::invalid_reg };
+
+static constexpr Register JSReturnReg_Type = { Registers::invalid_reg };
+static constexpr Register JSReturnReg_Data = { Registers::invalid_reg };
+static constexpr Register JSReturnReg = { Registers::invalid_reg };
+
+#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 ABINonArgReturnReg0 = { Registers::invalid_reg };
+static constexpr Register ABINonArgReturnReg1 = { Registers::invalid_reg };
+
+static constexpr Register WasmTableCallScratchReg = { Registers::invalid_reg };
+static constexpr Register WasmTableCallSigReg = { Registers::invalid_reg };
+static constexpr Register WasmTableCallIndexReg = { Registers::invalid_reg };
+static constexpr Register WasmTlsReg = { Registers::invalid_reg };
+
+static constexpr uint32_t ABIStackAlignment = 4;
+static constexpr uint32_t CodeAlignment = 4;
+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(); }
+
+ 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 PatchInstructionImmediate(uint8_t*, PatchedImmPtr) { MOZ_CRASH(); }
+
+ static void ToggleToJmp(CodeLocationLabel) { MOZ_CRASH(); }
+ static void ToggleToCmp(CodeLocationLabel) { MOZ_CRASH(); }
+ static void ToggleCall(CodeLocationLabel, bool) { MOZ_CRASH(); }
+
+ static uintptr_t GetPointer(uint8_t*) { MOZ_CRASH(); }
+
+ void verifyHeapAccessDisassembly(uint32_t begin, uint32_t end,
+ const Disassembler::HeapAccess& heapAccess)
+ {
+ MOZ_CRASH();
+ }
+};
+
+class Operand
+{
+ public:
+ Operand (const Address&) { MOZ_CRASH();}
+ Operand (const Register) { MOZ_CRASH();}
+ Operand (const FloatRegister) { MOZ_CRASH();}
+ Operand (Register, Imm32 ) { MOZ_CRASH(); }
+ Operand (Register, int32_t ) { MOZ_CRASH(); }
+};
+
+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 asmMergeWith(const MacroAssemblerNone&) { MOZ_CRASH(); }
+
+ void trace(JSTracer*) { 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 SupportsSimd() { return false; }
+ static bool SupportsUnalignedAccesses() { return false; }
+
+ void executableCopy(void*) { 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(); }
+ void bindLater(Label*, wasm::TrapDesc) { MOZ_CRASH(); }
+ template <typename T> void j(Condition, T) { MOZ_CRASH(); }
+ template <typename T> void jump(T) { MOZ_CRASH(); }
+ void haltingAlign(size_t) { MOZ_CRASH(); }
+ void nopAlign(size_t) { MOZ_CRASH(); }
+ void checkStackAlignment() { MOZ_CRASH(); }
+ uint32_t currentOffset() { MOZ_CRASH(); }
+ uint32_t labelToPatchOffset(CodeOffset) { MOZ_CRASH(); }
+ CodeOffset labelForPatch() { 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 writePrebarrierOffset(CodeOffset) { 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(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S, typename U> void storeValue(T, S, U) { MOZ_CRASH(); }
+ template <typename T, typename S> void loadValue(T, S) { MOZ_CRASH(); }
+ template <typename T> void pushValue(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(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(); }
+
+ CodeOffsetJump jumpWithPatch(RepatchLabel*, Label* doc = nullptr) { MOZ_CRASH(); }
+ CodeOffsetJump jumpWithPatch(RepatchLabel*, Condition, Label* doc = nullptr) { MOZ_CRASH(); }
+ CodeOffsetJump backedgeJump(RepatchLabel* label, Label* doc = nullptr) { 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, typename S> void cmp32Set(Condition, T, S, Register) { MOZ_CRASH(); }
+
+ template <typename T, typename S> void mov(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void movq(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void movePtr(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void move32(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 loadInt32x1(T, FloatRegister dest) { MOZ_CRASH(); }
+ template <typename T> void loadInt32x2(T, FloatRegister dest) { MOZ_CRASH(); }
+ template <typename T> void loadInt32x3(T, FloatRegister dest) { MOZ_CRASH(); }
+ template <typename T> void loadFloat32x3(T, FloatRegister dest) { MOZ_CRASH(); }
+
+ template <typename T> void loadPtr(T, Register) { MOZ_CRASH(); }
+ template <typename T> void load32(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 loadAlignedSimd128Int(T, FloatRegister) { MOZ_CRASH(); }
+ template <typename T> void loadUnalignedSimd128Int(T, FloatRegister) { MOZ_CRASH(); }
+ template <typename T> void loadAlignedSimd128Float(T, FloatRegister) { MOZ_CRASH(); }
+ template <typename T> void loadUnalignedSimd128Float(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 load16ZeroExtend(T, Register) { MOZ_CRASH(); }
+ template <typename T> void load64(T, Register64 ) { MOZ_CRASH(); }
+
+ template <typename T, typename S> void storePtr(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void store32(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void store32_NoSecondScratch(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 storeAlignedSimd128Int(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void storeUnalignedSimd128Int(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void storeAlignedSimd128Float(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void storeUnalignedSimd128Float(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 storeInt32x1(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void storeInt32x2(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void storeInt32x3(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void storeFloat32x3(T, S) { MOZ_CRASH(); }
+ template <typename T, typename S> void store64(T, S) { MOZ_CRASH(); }
+
+ template <typename T> void computeEffectiveAddress(T, Register) { MOZ_CRASH(); }
+
+ template <typename T> void compareExchange8SignExtend(const T& mem, Register oldval, Register newval, Register output) { MOZ_CRASH(); }
+ template <typename T> void compareExchange8ZeroExtend(const T& mem, Register oldval, Register newval, Register output) { MOZ_CRASH(); }
+ template <typename T> void compareExchange16SignExtend(const T& mem, Register oldval, Register newval, Register output) { MOZ_CRASH(); }
+ template <typename T> void compareExchange16ZeroExtend(const T& mem, Register oldval, Register newval, Register output) { MOZ_CRASH(); }
+ template <typename T> void compareExchange32(const T& mem, Register oldval, Register newval, Register output) { MOZ_CRASH(); }
+ template<typename T> void atomicExchange8SignExtend(const T& mem, Register value, Register output) { MOZ_CRASH(); }
+ template<typename T> void atomicExchange8ZeroExtend(const T& mem, Register value, Register output) { MOZ_CRASH(); }
+ template<typename T> void atomicExchange16SignExtend(const T& mem, Register value, Register output) { MOZ_CRASH(); }
+ template<typename T> void atomicExchange16ZeroExtend(const T& mem, Register value, Register output) { MOZ_CRASH(); }
+ template<typename T> void atomicExchange32(const T& mem, Register value, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchAdd8SignExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchAdd8ZeroExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchAdd16SignExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchAdd16ZeroExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchAdd32(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicAdd8(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicAdd16(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicAdd32(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchSub8SignExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchSub8ZeroExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchSub16SignExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchSub16ZeroExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchSub32(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicSub8(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicSub16(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicSub32(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchAnd8SignExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchAnd8ZeroExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchAnd16SignExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchAnd16ZeroExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchAnd32(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicAnd8(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicAnd16(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicAnd32(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchOr8SignExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchOr8ZeroExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchOr16SignExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchOr16ZeroExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchOr32(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicOr8(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicOr16(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicOr32(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchXor8SignExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchXor8ZeroExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchXor16SignExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchXor16ZeroExtend(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicFetchXor32(const T& value, const S& mem, Register temp, Register output) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicXor8(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicXor16(const T& value, const S& mem) { MOZ_CRASH(); }
+ template <typename T, typename S> void atomicXor32(const T& value, const S& mem) { MOZ_CRASH(); }
+
+ Register splitTagForTest(ValueOperand) { MOZ_CRASH(); }
+
+ void boxDouble(FloatRegister, ValueOperand) { MOZ_CRASH(); }
+ void boxNonDouble(JSValueType, Register, ValueOperand) { 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 unboxObject(T, Register) { MOZ_CRASH(); }
+ template <typename T> void unboxDouble(T, FloatRegister) { MOZ_CRASH(); }
+ void unboxValue(const ValueOperand&, AnyRegister) { MOZ_CRASH(); }
+ void unboxNonDouble(const ValueOperand&, Register ) { MOZ_CRASH();}
+ void notBoolean(ValueOperand) { MOZ_CRASH(); }
+ Register extractObject(Address, Register) { MOZ_CRASH(); }
+ Register extractObject(ValueOperand, Register) { MOZ_CRASH(); }
+ Register extractInt32(ValueOperand, Register) { MOZ_CRASH(); }
+ Register extractBoolean(ValueOperand, Register) { MOZ_CRASH(); }
+ template <typename T> 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 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(); }
+ static bool convertUInt64ToDoubleNeedsTemp() { MOZ_CRASH(); }
+ void convertUInt64ToDouble(Register64, FloatRegister, Register) { 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(); }
+ void loadConstantDouble(wasm::RawF64, FloatRegister) { MOZ_CRASH(); }
+ void loadConstantFloat32(wasm::RawF32, FloatRegister) { MOZ_CRASH(); }
+ Condition testInt32Truthy(bool, ValueOperand) { MOZ_CRASH(); }
+ Condition testStringTruthy(bool, ValueOperand) { MOZ_CRASH(); }
+
+ template <typename T> void loadUnboxedValue(T, MIRType, AnyRegister) { MOZ_CRASH(); }
+ template <typename T> void storeUnboxedValue(const ConstantOrRegister&, MIRType, T, MIRType) { MOZ_CRASH(); }
+ template <typename T> void storeUnboxedPayload(ValueOperand value, T, size_t) { 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(void*) { MOZ_CRASH(); }
+
+ void buildFakeExitFrame(Register, uint32_t*) { MOZ_CRASH(); }
+ bool buildOOLFakeExitFrame(void*) { MOZ_CRASH(); }
+ void loadWasmGlobalPtr(uint32_t, Register) { MOZ_CRASH(); }
+ void loadWasmActivationFromTls(Register) { MOZ_CRASH(); }
+ void loadWasmActivationFromSymbolicAddress(Register) { MOZ_CRASH(); }
+ void loadWasmPinnedRegsFromTls() { MOZ_CRASH(); }
+
+ void setPrinter(Sprinter*) { MOZ_CRASH(); }
+ Operand ToPayload(Operand base) { MOZ_CRASH(); }
+
+ static const Register getStackPointer() { MOZ_CRASH(); }
+
+ // Instrumentation for entering and leaving the profiler.
+ void profilerEnterFrame(Register , Register ) { MOZ_CRASH(); }
+ void profilerExitFrame() { MOZ_CRASH(); }
+
+#ifdef JS_NUNBOX32
+ Address ToPayload(Address) { MOZ_CRASH(); }
+ Address ToType(Address) { MOZ_CRASH(); }
+#endif
+
+ struct AutoPrepareForPatching {
+ explicit AutoPrepareForPatching(MacroAssemblerNone&) {
+ MOZ_CRASH();
+ }
+ };
+};
+
+typedef MacroAssemblerNone MacroAssemblerSpecific;
+
+class ABIArgGenerator
+{
+ public:
+ ABIArgGenerator() { MOZ_CRASH(); }
+ ABIArg next(MIRType) { MOZ_CRASH(); }
+ ABIArg& current() { MOZ_CRASH(); }
+ uint32_t stackBytesConsumedSoFar() const { MOZ_CRASH(); }
+};
+
+static inline void
+PatchJump(CodeLocationJump&, CodeLocationLabel, ReprotectCode reprotect = DontReprotect)
+{
+ MOZ_CRASH();
+}
+
+static inline bool GetTempRegForIntArg(uint32_t, uint32_t, Register*) { MOZ_CRASH(); }
+
+static inline
+void PatchBackedge(CodeLocationJump& jump_, CodeLocationLabel label, JitRuntime::BackedgeTarget target)
+{
+ 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 000000000..dcecb9f39
--- /dev/null
+++ b/js/src/jit/none/MoveEmitter-none.h
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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 "jit/MacroAssembler.h"
+#include "jit/MoveResolver.h"
+
+namespace js {
+namespace jit {
+
+class MoveEmitterNone
+{
+ public:
+ 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.h b/js/src/jit/none/SharedICHelpers-none.h
new file mode 100644
index 000000000..4e6f84b72
--- /dev/null
+++ b/js/src/jit/none/SharedICHelpers-none.h
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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;
+static const uint32_t STUB_FRAME_SIZE = 0;
+static const uint32_t STUB_FRAME_SAVED_STUB_OFFSET = 0;
+
+inline void EmitRestoreTailCallReg(MacroAssembler&) { MOZ_CRASH(); }
+inline void EmitRepushTailCallReg(MacroAssembler&) { MOZ_CRASH(); }
+inline void EmitCallIC(CodeOffset*, MacroAssembler&) { MOZ_CRASH(); }
+inline void EmitEnterTypeMonitorIC(MacroAssembler&, size_t v = 0) { MOZ_CRASH(); }
+inline void EmitReturnFromIC(MacroAssembler&) { MOZ_CRASH(); }
+inline void EmitChangeICReturnAddress(MacroAssembler&, Register) { MOZ_CRASH(); }
+inline void EmitBaselineTailCallVM(JitCode*, MacroAssembler&, uint32_t) { MOZ_CRASH(); }
+inline void EmitIonTailCallVM(JitCode*, MacroAssembler&, uint32_t) { MOZ_CRASH(); }
+inline void EmitBaselineCreateStubFrameDescriptor(MacroAssembler&, Register, uint32_t) { MOZ_CRASH(); }
+inline void EmitBaselineCallVM(JitCode*, MacroAssembler&) { MOZ_CRASH(); }
+inline void EmitIonCallVM(JitCode*, size_t, MacroAssembler&) { MOZ_CRASH(); }
+inline void EmitBaselineEnterStubFrame(MacroAssembler&, Register) { MOZ_CRASH(); }
+inline void EmitIonEnterStubFrame(MacroAssembler&, Register) { MOZ_CRASH(); }
+inline void EmitBaselineLeaveStubFrame(MacroAssembler&, bool v = false) { MOZ_CRASH(); }
+inline void EmitIonLeaveStubFrame(MacroAssembler&) { MOZ_CRASH(); }
+inline void EmitStowICValues(MacroAssembler&, int) { MOZ_CRASH(); }
+inline void EmitUnstowICValues(MacroAssembler&, int, bool v = false) { MOZ_CRASH(); }
+inline void EmitCallTypeUpdateIC(MacroAssembler&, JitCode*, uint32_t) { 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 000000000..81e0fa8a9
--- /dev/null
+++ b/js/src/jit/none/SharedICRegisters-none.h
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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/MacroAssembler.h"
+
+namespace js {
+namespace jit {
+
+static constexpr Register BaselineFrameReg = { Registers::invalid_reg };
+static constexpr Register BaselineStackReg = { Registers::invalid_reg };
+
+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 };
+
+} // 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 000000000..54d818a85
--- /dev/null
+++ b/js/src/jit/none/Trampoline-none.cpp
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * 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 "jscompartment.h"
+
+#include "jit/Bailouts.h"
+#include "jit/BaselineIC.h"
+#include "jit/IonCaches.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.
+
+JitCode* JitRuntime::generateEnterJIT(JSContext*, EnterJitType) { MOZ_CRASH(); }
+JitCode* JitRuntime::generateInvalidator(JSContext*) { MOZ_CRASH(); }
+JitCode* JitRuntime::generateArgumentsRectifier(JSContext*, void**) { MOZ_CRASH(); }
+JitCode* JitRuntime::generateBailoutTable(JSContext*, uint32_t) { MOZ_CRASH(); }
+JitCode* JitRuntime::generateBailoutHandler(JSContext*) { MOZ_CRASH(); }
+JitCode* JitRuntime::generateVMWrapper(JSContext*, const VMFunction&) { MOZ_CRASH(); }
+JitCode* JitRuntime::generatePreBarrier(JSContext*, MIRType) { MOZ_CRASH(); }
+JitCode* JitRuntime::generateDebugTrapHandler(JSContext*) { MOZ_CRASH(); }
+JitCode* JitRuntime::generateExceptionTailStub(JSContext*, void*) { MOZ_CRASH(); }
+JitCode* JitRuntime::generateBailoutTailStub(JSContext*) { MOZ_CRASH(); }
+
+FrameSizeClass FrameSizeClass::FromDepth(uint32_t) { MOZ_CRASH(); }
+FrameSizeClass FrameSizeClass::ClassLimit() { MOZ_CRASH(); }
+uint32_t FrameSizeClass::frameSize() const { MOZ_CRASH(); }
+
+BailoutFrameInfo::BailoutFrameInfo(const JitActivationIterator& iter, BailoutStack* bailout)
+{
+ MOZ_CRASH();
+}
+
+BailoutFrameInfo::BailoutFrameInfo(const JitActivationIterator& iter, InvalidationBailoutStack* bailout)
+{
+ MOZ_CRASH();
+}
+
+bool ICCompare_Int32::Compiler::generateStubCode(MacroAssembler&) { MOZ_CRASH(); }
+bool ICCompare_Double::Compiler::generateStubCode(MacroAssembler&) { MOZ_CRASH(); }
+bool ICBinaryArith_Int32::Compiler::generateStubCode(MacroAssembler&) { MOZ_CRASH(); }
+bool ICUnaryArith_Int32::Compiler::generateStubCode(MacroAssembler&) { MOZ_CRASH(); }
+JitCode* JitRuntime::generateProfilerExitFrameTailStub(JSContext*) { MOZ_CRASH(); }