summaryrefslogtreecommitdiffstats
path: root/js/src/jit/wasm32/MacroAssembler-wasm32.cpp
blob: fe82793499b518bfeab7374609313e60a8960eef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 * vim: set ts=8 sts=2 et sw=2 tw=80:
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "jit/wasm32/MacroAssembler-wasm32.h"

namespace js::jit {

void MacroAssembler::subFromStackPtr(Imm32 imm32) { MOZ_CRASH(); }

//{{{ check_macroassembler_style

void MacroAssembler::PushBoxed(FloatRegister reg) { MOZ_CRASH(); }

void MacroAssembler::branchPtrInNurseryChunk(Condition cond, Register ptr,
                                             Register temp, Label* label) {
  MOZ_CRASH();
}

void MacroAssembler::pushReturnAddress() { MOZ_CRASH(); }

void MacroAssembler::popReturnAddress() { MOZ_CRASH(); }

CodeOffset MacroAssembler::moveNearAddressWithPatch(Register dest) {
  MOZ_CRASH();
}

void MacroAssembler::patchNearAddressMove(CodeLocationLabel loc,
                                          CodeLocationLabel target) {
  MOZ_CRASH();
}

size_t MacroAssembler::PushRegsInMaskSizeInBytes(LiveRegisterSet set) {
  MOZ_CRASH();
  return 0;
}

void MacroAssembler::PushRegsInMask(LiveRegisterSet set) { MOZ_CRASH(); }

void MacroAssembler::PopRegsInMaskIgnore(LiveRegisterSet set,
                                         LiveRegisterSet ignore) {
  MOZ_CRASH();
}

void MacroAssembler::PopStackPtr() { MOZ_CRASH(); }

void MacroAssembler::flexibleDivMod32(Register rhs, Register srcDest,
                                      Register remOutput, bool isUnsigned,
                                      const LiveRegisterSet& volatileLiveRegs) {
  MOZ_CRASH();
}

void MacroAssembler::flexibleRemainder32(
    Register rhs, Register srcDest, bool isUnsigned,
    const LiveRegisterSet& volatileLiveRegs) {
  MOZ_CRASH();
}

void MacroAssembler::storeRegsInMask(LiveRegisterSet set, Address dest,
                                     Register scratch) {
  MOZ_CRASH();
}

void MacroAssembler::wasmBoundsCheck32(Condition cond, Register index,
                                       Register boundsCheckLimit, Label* ok) {
  MOZ_CRASH();
}

void MacroAssembler::wasmBoundsCheck32(Condition cond, Register index,
                                       Address boundsCheckLimit, Label* ok) {
  MOZ_CRASH();
}

void MacroAssembler::wasmBoundsCheck64(Condition cond, Register64 index,
                                       Register64 boundsCheckLimit, Label* ok) {
  MOZ_CRASH();
}

void MacroAssembler::wasmBoundsCheck64(Condition cond, Register64 index,
                                       Address boundsCheckLimit, Label* ok) {
  MOZ_CRASH();
}

void MacroAssembler::oolWasmTruncateCheckF32ToI32(FloatRegister input,
                                                  Register output,
                                                  TruncFlags flags,
                                                  wasm::BytecodeOffset off,
                                                  Label* rejoin) {
  MOZ_CRASH();
}

void MacroAssembler::wasmTruncateDoubleToInt64(
    FloatRegister input, Register64 output, bool isSaturating, Label* oolEntry,
    Label* oolRejoin, FloatRegister tempDouble) {
  MOZ_CRASH();
}

void MacroAssembler::wasmTruncateDoubleToUInt64(
    FloatRegister input, Register64 output, bool isSaturating, Label* oolEntry,
    Label* oolRejoin, FloatRegister tempDouble) {
  MOZ_CRASH();
}

void MacroAssembler::oolWasmTruncateCheckF64ToI64(FloatRegister input,
                                                  Register64 output,
                                                  TruncFlags flags,
                                                  wasm::BytecodeOffset off,
                                                  Label* rejoin) {
  MOZ_CRASH();
}

void MacroAssembler::wasmTruncateFloat32ToInt64(
    FloatRegister input, Register64 output, bool isSaturating, Label* oolEntry,
    Label* oolRejoin, FloatRegister tempDouble) {
  MOZ_CRASH();
}

void MacroAssembler::wasmTruncateFloat32ToUInt64(
    FloatRegister input, Register64 output, bool isSaturating, Label* oolEntry,
    Label* oolRejoin, FloatRegister tempDouble) {
  MOZ_CRASH();
}

void MacroAssembler::oolWasmTruncateCheckF32ToI64(FloatRegister input,
                                                  Register64 output,
                                                  TruncFlags flags,
                                                  wasm::BytecodeOffset off,
                                                  Label* rejoin) {
  MOZ_CRASH();
}

void MacroAssembler::oolWasmTruncateCheckF64ToI32(FloatRegister input,
                                                  Register output,
                                                  TruncFlags flags,
                                                  wasm::BytecodeOffset off,
                                                  Label* rejoin) {
  MOZ_CRASH();
}

void MacroAssembler::convertUInt64ToFloat32(Register64 src, FloatRegister dest,
                                            Register temp) {
  MOZ_CRASH();
}

void MacroAssembler::convertInt64ToFloat32(Register64 src, FloatRegister dest) {
  MOZ_CRASH();
}

bool MacroAssembler::convertUInt64ToDoubleNeedsTemp() { MOZ_CRASH(); }

void MacroAssembler::convertUInt64ToDouble(Register64 src, FloatRegister dest,
                                           Register temp) {
  MOZ_CRASH();
}

void MacroAssembler::convertInt64ToDouble(Register64 src, FloatRegister dest) {
  MOZ_CRASH();
}

void MacroAssembler::convertIntPtrToDouble(Register src, FloatRegister dest) {
  MOZ_CRASH();
}

void MacroAssembler::wasmAtomicLoad64(const wasm::MemoryAccessDesc& access,
                                      const Address& mem, Register64 temp,
                                      Register64 output) {
  MOZ_CRASH();
}

void MacroAssembler::wasmAtomicLoad64(const wasm::MemoryAccessDesc& access,
                                      const BaseIndex& mem, Register64 temp,
                                      Register64 output) {
  MOZ_CRASH();
}

void MacroAssembler::patchNopToCall(uint8_t* call, uint8_t* target) {
  MOZ_CRASH();
}

void MacroAssembler::patchCallToNop(uint8_t* call) { MOZ_CRASH(); }

void MacroAssembler::patchCall(uint32_t callerOffset, uint32_t calleeOffset) {
  MOZ_CRASH();
}

CodeOffset MacroAssembler::farJumpWithPatch() {
  MOZ_CRASH();
  return CodeOffset(0);
}

void MacroAssembler::patchFarJump(CodeOffset farJump, uint32_t targetOffset) {
  MOZ_CRASH();
}

CodeOffset MacroAssembler::call(Register reg) {
  MOZ_CRASH();
  return CodeOffset(0);
}

CodeOffset MacroAssembler::call(Label* label) {
  MOZ_CRASH();
  return CodeOffset(0);
}

CodeOffset MacroAssembler::call(wasm::SymbolicAddress imm) {
  MOZ_CRASH();
  return CodeOffset(0);
}

CodeOffset MacroAssembler::callWithPatch() {
  MOZ_CRASH();
  return CodeOffset(0);
}

CodeOffset MacroAssembler::nopPatchableToCall() {
  MOZ_CRASH();
  return CodeOffset(0);
}

CodeOffset MacroAssembler::wasmTrapInstruction() {
  MOZ_CRASH();
  return CodeOffset(0);
}

template void MacroAssembler::storeUnboxedValue(const ConstantOrRegister& value,
                                                MIRType valueType,
                                                const Address& dest);

template void MacroAssembler::storeUnboxedValue(
    const ConstantOrRegister& value, MIRType valueType,
    const BaseObjectElementIndex& dest);

template <typename T>
void MacroAssembler::storeUnboxedValue(const ConstantOrRegister& value,
                                       MIRType valueType, const T& dest) {
  MOZ_CRASH();
}

uint32_t MacroAssembler::pushFakeReturnAddress(Register scratch) {
  MOZ_CRASH();
}

void MacroAssembler::Pop(Register reg) { MOZ_CRASH(); }

void MacroAssembler::Pop(FloatRegister t) { MOZ_CRASH(); }

void MacroAssembler::Pop(const ValueOperand& val) { MOZ_CRASH(); }

void MacroAssembler::Push(Register reg) { MOZ_CRASH(); }

void MacroAssembler::Push(const Imm32 imm) { MOZ_CRASH(); }

void MacroAssembler::Push(const ImmWord imm) { MOZ_CRASH(); }

void MacroAssembler::Push(const ImmPtr imm) { MOZ_CRASH(); }

void MacroAssembler::Push(const ImmGCPtr ptr) { MOZ_CRASH(); }

void MacroAssembler::Push(FloatRegister reg) { MOZ_CRASH(); }

void MacroAssembler::wasmTruncateFloat32ToInt32(FloatRegister input,
                                                Register output,
                                                bool isSaturating,
                                                Label* oolEntry) {
  MOZ_CRASH();
}

void MacroAssembler::wasmTruncateFloat32ToUInt32(FloatRegister input,
                                                 Register output,
                                                 bool isSaturating,
                                                 Label* oolEntry) {
  MOZ_CRASH();
}

void MacroAssembler::wasmTruncateDoubleToUInt32(FloatRegister input,
                                                Register output,
                                                bool isSaturating,
                                                Label* oolEntry) {
  MOZ_CRASH();
}

void MacroAssembler::wasmTruncateDoubleToInt32(FloatRegister input,
                                               Register output,
                                               bool isSaturating,
                                               Label* oolEntry) {
  MOZ_CRASH();
}

void MacroAssembler::wasmAtomicExchange64(const wasm::MemoryAccessDesc& access,
                                          const Address& mem, Register64 value,
                                          Register64 output) {
  MOZ_CRASH();
}

void MacroAssembler::wasmAtomicExchange64(const wasm::MemoryAccessDesc& access,
                                          const BaseIndex& mem,
                                          Register64 value, Register64 output) {
  MOZ_CRASH();
}

void MacroAssembler::speculationBarrier() { MOZ_CRASH(); }

void MacroAssembler::shiftIndex32AndAdd(Register indexTemp32, int shift,
                                        Register pointer) {
  MOZ_CRASH();
}

void MacroAssembler::setupUnalignedABICall(Register scratch) { MOZ_CRASH(); }

void MacroAssembler::enterFakeExitFrameForWasm(Register cxreg, Register scratch,
                                               ExitFrameType type) {
  MOZ_CRASH();
}

void MacroAssembler::floorFloat32ToInt32(FloatRegister src, Register dest,
                                         Label* fail) {
  MOZ_CRASH();
}

void MacroAssembler::floorDoubleToInt32(FloatRegister src, Register dest,
                                        Label* fail) {
  MOZ_CRASH();
}

void MacroAssembler::ceilFloat32ToInt32(FloatRegister src, Register dest,
                                        Label* fail) {
  MOZ_CRASH();
}

void MacroAssembler::ceilDoubleToInt32(FloatRegister src, Register dest,
                                       Label* fail) {
  MOZ_CRASH();
}

void MacroAssembler::roundFloat32ToInt32(FloatRegister src, Register dest,
                                         FloatRegister temp, Label* fail) {
  MOZ_CRASH();
}

void MacroAssembler::roundDoubleToInt32(FloatRegister src, Register dest,
                                        FloatRegister temp, Label* fail) {
  MOZ_CRASH();
}

void MacroAssembler::truncFloat32ToInt32(FloatRegister src, Register dest,
                                         Label* fail) {
  MOZ_CRASH();
}

void MacroAssembler::truncDoubleToInt32(FloatRegister src, Register dest,
                                        Label* fail) {
  MOZ_CRASH();
}

void MacroAssembler::nearbyIntDouble(RoundingMode mode, FloatRegister src,
                                     FloatRegister dest) {
  MOZ_CRASH();
}

void MacroAssembler::nearbyIntFloat32(RoundingMode mode, FloatRegister src,
                                      FloatRegister dest) {
  MOZ_CRASH();
}

void MacroAssembler::copySignDouble(FloatRegister lhs, FloatRegister rhs,
                                    FloatRegister output) {
  MOZ_CRASH();
}

void MacroAssembler::branchTestValue(Condition cond, const ValueOperand& lhs,
                                     const Value& rhs, Label* label) {
  MOZ_CRASH();
}

void MacroAssembler::branchValueIsNurseryCell(Condition cond,
                                              const Address& address,
                                              Register temp, Label* label) {
  MOZ_CRASH();
}

void MacroAssembler::branchValueIsNurseryCell(Condition cond,
                                              ValueOperand value, Register temp,
                                              Label* label) {
  MOZ_CRASH();
}

void MacroAssembler::callWithABINoProfiler(Register fun, MoveOp::Type result) {
  MOZ_CRASH();
}

void MacroAssembler::callWithABINoProfiler(const Address& fun,
                                           MoveOp::Type result) {
  MOZ_CRASH();
}

void MacroAssembler::call(const Address& addr) { MOZ_CRASH(); }

void MacroAssembler::call(ImmWord imm) { MOZ_CRASH(); }

void MacroAssembler::call(ImmPtr imm) { MOZ_CRASH(); }

void MacroAssembler::call(JitCode* c) { MOZ_CRASH(); }

void MacroAssembler::callWithABIPost(uint32_t stackAdjust, MoveOp::Type result,
                                     bool callFromWasm) {
  MOZ_CRASH();
}

void MacroAssembler::callWithABIPre(uint32_t* stackAdjust, bool callFromWasm) {
  MOZ_CRASH();
}

void MacroAssembler::comment(const char* msg) { MOZ_CRASH(); }

void MacroAssembler::flush() { MOZ_CRASH(); }

void MacroAssembler::loadStoreBuffer(Register ptr, Register buffer) {
  MOZ_CRASH();
}

void MacroAssembler::moveValue(const TypedOrValueRegister& src,
                               const ValueOperand& dest) {
  MOZ_CRASH();
}

void MacroAssembler::moveValue(const ValueOperand& src,
                               const ValueOperand& dest) {
  MOZ_CRASH();
}

void MacroAssembler::moveValue(const Value& src, const ValueOperand& dest) {
  MOZ_CRASH();
}

void MacroAssembler::wasmCompareExchange64(const wasm::MemoryAccessDesc& access,
                                           const Address& mem,
                                           Register64 expected,
                                           Register64 replacement,
                                           Register64 output) {
  MOZ_CRASH();
}

void MacroAssembler::wasmCompareExchange64(const wasm::MemoryAccessDesc& access,
                                           const BaseIndex& mem,
                                           Register64 expected,
                                           Register64 replacement,
                                           Register64 output) {
  MOZ_CRASH();
}

//}}} check_macroassembler_style

void MacroAssemblerWasm32::executableCopy(void* buffer) { MOZ_CRASH(); }

void MacroAssemblerWasm32::jump(Label* label) { MOZ_CRASH(); }

void MacroAssemblerWasm32::writeCodePointer(CodeLabel* label) { MOZ_CRASH(); }

void MacroAssemblerWasm32::haltingAlign(size_t) { MOZ_CRASH(); }

void MacroAssemblerWasm32::nopAlign(size_t) { MOZ_CRASH(); }

void MacroAssemblerWasm32::checkStackAlignment() { MOZ_CRASH(); }

uint32_t MacroAssemblerWasm32::currentOffset() {
  MOZ_CRASH();
  return 0;
}

void MacroAssemblerWasm32::nop() { MOZ_CRASH(); }

void MacroAssemblerWasm32::breakpoint() { MOZ_CRASH(); }

void MacroAssemblerWasm32::abiret() { MOZ_CRASH(); }

void MacroAssemblerWasm32::ret() { MOZ_CRASH(); }

CodeOffset MacroAssemblerWasm32::toggledJump(Label*) { MOZ_CRASH(); }

CodeOffset MacroAssemblerWasm32::toggledCall(JitCode*, bool) { MOZ_CRASH(); }

size_t MacroAssemblerWasm32::ToggledCallSize(uint8_t*) { MOZ_CRASH(); }

void MacroAssemblerWasm32::finish() { MOZ_CRASH(); }

void MacroAssemblerWasm32::pushValue(ValueOperand val) { MOZ_CRASH(); }

void MacroAssemblerWasm32::popValue(ValueOperand) { MOZ_CRASH(); }

void MacroAssemblerWasm32::tagValue(JSValueType, Register, ValueOperand) {
  MOZ_CRASH();
}

void MacroAssemblerWasm32::retn(Imm32 n) { MOZ_CRASH(); }

void MacroAssemblerWasm32::push(Register reg) { MOZ_CRASH(); }

Address MacroAssemblerWasm32::ToType(const Address& address) { MOZ_CRASH(); }

}  // namespace js::jit