1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: set ts=8 sts=2 et sw=2 tw=80:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef jit_none_Architecture_none_h
8 #define jit_none_Architecture_none_h
10 // JitSpewer.h is included through MacroAssembler implementations for other
11 // platforms, so include it here to avoid inadvertent build bustage.
12 #include "jit/JitSpewer.h"
14 #include "jit/shared/Architecture-shared.h"
19 static const uint32_t SimdMemoryAlignment
=
20 4; // Make it 4 to avoid a bunch of div-by-zero warnings
21 static const uint32_t WasmStackAlignment
= 8;
22 static const uint32_t WasmTrapInstructionLength
= 0;
24 // See comments in wasm::GenerateFunctionPrologue.
25 static constexpr uint32_t WasmCheckedCallEntryOffset
= 0u;
32 invalid_reg2
, // To avoid silly static_assert failures.
35 typedef RegisterID Encoding
;
36 union RegisterContent
{
40 typedef uint8_t SetType
;
42 static uint32_t SetSize(SetType
) { MOZ_CRASH(); }
43 static uint32_t FirstBit(SetType
) { MOZ_CRASH(); }
44 static uint32_t LastBit(SetType
) { MOZ_CRASH(); }
45 static const char* GetName(Code
) { MOZ_CRASH(); }
46 static Code
FromName(const char*) { MOZ_CRASH(); }
48 static const Encoding StackPointer
= invalid_reg
;
49 static const Encoding Invalid
= invalid_reg
;
50 static const uint32_t Total
= 1;
51 static const uint32_t TotalPhys
= 0;
52 static const uint32_t Allocatable
= 0;
53 static const SetType AllMask
= 0;
54 static const SetType ArgRegMask
= 0;
55 static const SetType VolatileMask
= 0;
56 static const SetType NonVolatileMask
= 0;
57 static const SetType NonAllocatableMask
= 0;
58 static const SetType AllocatableMask
= 0;
59 static const SetType JSCallMask
= 0;
60 static const SetType CallMask
= 0;
63 typedef uint8_t PackedRegisterMask
;
65 class FloatRegisters
{
67 enum FPRegisterID
{ f0
= 0, invalid_reg
};
68 typedef FPRegisterID Code
;
69 typedef FPRegisterID Encoding
;
70 union RegisterContent
{
75 typedef uint32_t SetType
;
77 static const char* GetName(Code
) { MOZ_CRASH(); }
78 static Code
FromName(const char*) { MOZ_CRASH(); }
80 static const Code Invalid
= invalid_reg
;
81 static const uint32_t Total
= 0;
82 static const uint32_t TotalPhys
= 0;
83 static const uint32_t Allocatable
= 0;
84 static const SetType AllMask
= 0;
85 static const SetType AllDoubleMask
= 0;
86 static const SetType AllSingleMask
= 0;
87 static const SetType VolatileMask
= 0;
88 static const SetType NonVolatileMask
= 0;
89 static const SetType NonAllocatableMask
= 0;
90 static const SetType AllocatableMask
= 0;
94 class TypedRegisterSet
;
96 struct FloatRegister
{
97 typedef FloatRegisters Codes
;
98 typedef Codes::Code Code
;
99 typedef Codes::Encoding Encoding
;
100 typedef Codes::SetType SetType
;
104 static uint32_t FirstBit(SetType
) { MOZ_CRASH(); }
105 static uint32_t LastBit(SetType
) { MOZ_CRASH(); }
106 static FloatRegister
FromCode(uint32_t) { MOZ_CRASH(); }
107 bool isSingle() const { MOZ_CRASH(); }
108 bool isDouble() const { MOZ_CRASH(); }
109 bool isSimd128() const { MOZ_CRASH(); }
110 bool isInvalid() const { MOZ_CRASH(); }
111 FloatRegister
asSingle() const { MOZ_CRASH(); }
112 FloatRegister
asDouble() const { MOZ_CRASH(); }
113 FloatRegister
asSimd128() const { MOZ_CRASH(); }
114 Code
code() const { MOZ_CRASH(); }
115 Encoding
encoding() const { MOZ_CRASH(); }
116 const char* name() const { MOZ_CRASH(); }
117 bool volatile_() const { MOZ_CRASH(); }
118 bool operator!=(FloatRegister
) const { MOZ_CRASH(); }
119 bool operator==(FloatRegister
) const { MOZ_CRASH(); }
120 bool aliases(FloatRegister
) const { MOZ_CRASH(); }
121 uint32_t numAliased() const { MOZ_CRASH(); }
122 FloatRegister
aliased(uint32_t) { MOZ_CRASH(); }
123 bool equiv(FloatRegister
) const { MOZ_CRASH(); }
124 uint32_t size() const { MOZ_CRASH(); }
125 uint32_t numAlignedAliased() const { MOZ_CRASH(); }
126 FloatRegister
alignedAliased(uint32_t) { MOZ_CRASH(); }
127 SetType
alignedOrDominatedAliasedSet() const { MOZ_CRASH(); }
129 static constexpr RegTypeName DefaultType
= RegTypeName::Float64
;
131 template <RegTypeName
= DefaultType
>
132 static SetType
LiveAsIndexableSet(SetType s
) {
136 template <RegTypeName Name
= DefaultType
>
137 static SetType
AllocatableAsIndexableSet(SetType s
) {
138 static_assert(Name
!= RegTypeName::Any
, "Allocatable set are not iterable");
142 template <typename T
>
143 static T
ReduceSetForPush(T
) {
146 uint32_t getRegisterDumpOffsetInBytes() { MOZ_CRASH(); }
147 static uint32_t SetSize(SetType x
) { MOZ_CRASH(); }
148 static Code
FromName(const char* name
) { MOZ_CRASH(); }
150 // This is used in static initializers, so produce a bogus value instead of
152 static uint32_t GetPushSizeInBytes(const TypedRegisterSet
<FloatRegister
>&) {
157 inline bool hasUnaliasedDouble() { MOZ_CRASH(); }
158 inline bool hasMultiAlias() { MOZ_CRASH(); }
160 static const uint32_t ShadowStackSpace
= 0;
161 static const uint32_t JumpImmediateRange
= INT32_MAX
;
164 static const int32_t NUNBOX32_TYPE_OFFSET
= 4;
165 static const int32_t NUNBOX32_PAYLOAD_OFFSET
= 0;
171 #endif /* jit_none_Architecture_none_h */