Skip to content

Commit 55571d1

Browse files
committed
Bug 1944011 - Part 30: Generate boilerplate for LWasmAtomicExchangeI64. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D235803
1 parent 83de155 commit 55571d1

File tree

6 files changed

+45
-114
lines changed

6 files changed

+45
-114
lines changed

js/src/jit/LIROps.yaml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4975,7 +4975,13 @@
49754975
operation: AtomicOp
49764976

49774977
- name: WasmAtomicExchangeI64
4978-
gen_boilerplate: false
4978+
result_type: Int64
4979+
operands:
4980+
memoryBase: WordSized
4981+
ptr: WordSized
4982+
value: Int64
4983+
arguments:
4984+
access: const wasm::MemoryAccessDesc&
49794985
#endif
49804986

49814987
#ifdef JS_CODEGEN_X64
@@ -5074,7 +5080,13 @@
50745080
num_temps64: 1
50755081

50765082
- name: WasmAtomicExchangeI64
5077-
gen_boilerplate: false
5083+
result_type: Int64
5084+
operands:
5085+
ptr: WordSized
5086+
value: Int64
5087+
memoryBase: WordSized
5088+
arguments:
5089+
access: const wasm::MemoryAccessDesc&
50785090
#endif
50795091

50805092
#ifdef JS_CODEGEN_ARM64
@@ -5172,7 +5184,12 @@
51725184
mir_op: WasmAtomicBinopHeap
51735185

51745186
- name: WasmAtomicExchangeI64
5175-
gen_boilerplate: false
5187+
result_type: Int64
5188+
operands:
5189+
ptr: WordSized
5190+
value: Int64
5191+
memoryBase: WordSized
5192+
mir_op: WasmAtomicExchangeHeap
51765193
#endif
51775194

51785195
#ifdef JS_CODEGEN_MIPS64
@@ -5225,7 +5242,12 @@
52255242
mir_op: WasmAtomicBinopHeap
52265243

52275244
- name: WasmAtomicExchangeI64
5228-
gen_boilerplate: false
5245+
result_type: Int64
5246+
operands:
5247+
ptr: WordSized
5248+
value: Int64
5249+
memoryBase: WordSized
5250+
mir_op: WasmAtomicExchangeHeap
52295251
#endif
52305252

52315253
#ifdef JS_CODEGEN_LOONG64
@@ -5266,7 +5288,12 @@
52665288
mir_op: WasmAtomicBinopHeap
52675289

52685290
- name: WasmAtomicExchangeI64
5269-
gen_boilerplate: false
5291+
result_type: Int64
5292+
operands:
5293+
ptr: WordSized
5294+
value: Int64
5295+
memoryBase: WordSized
5296+
mir_op: WasmAtomicExchangeHeap
52705297
#endif
52715298

52725299
#ifdef JS_CODEGEN_RISCV64
@@ -5298,10 +5325,21 @@
52985325
gen_boilerplate: false
52995326

53005327
- name: WasmAtomicBinopI64
5301-
gen_boilerplate: false
5328+
result_type: Int64
5329+
operands:
5330+
ptr: WordSized
5331+
value: Int64
5332+
memoryBase: WordSized
5333+
num_temps64: 1
5334+
mir_op: WasmAtomicBinopHeap
53025335

53035336
- name: WasmAtomicExchangeI64
5304-
gen_boilerplate: false
5337+
result_type: Int64
5338+
operands:
5339+
ptr: WordSized
5340+
value: Int64
5341+
memoryBase: WordSized
5342+
mir_op: WasmAtomicExchangeHeap
53055343
#endif
53065344

53075345
#ifdef FUZZING_JS_FUZZILLI

js/src/jit/arm/LIR-arm.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -331,28 +331,6 @@ class LWasmCompareExchangeI64
331331
const LAllocation* memoryBase() { return getOperand(1 + 2 * INT64_PIECES); }
332332
};
333333

334-
class LWasmAtomicExchangeI64
335-
: public LInstructionHelper<INT64_PIECES, 2 + INT64_PIECES, 0> {
336-
const wasm::MemoryAccessDesc& access_;
337-
338-
public:
339-
LIR_HEADER(WasmAtomicExchangeI64);
340-
341-
LWasmAtomicExchangeI64(const LAllocation& ptr, const LInt64Allocation& value,
342-
const LAllocation& memoryBase,
343-
const wasm::MemoryAccessDesc& access)
344-
: LInstructionHelper(classOpcode), access_(access) {
345-
setOperand(0, ptr);
346-
setInt64Operand(1, value);
347-
setOperand(3, memoryBase);
348-
}
349-
350-
const LAllocation* ptr() { return getOperand(0); }
351-
LInt64Allocation value() { return getInt64Operand(1); }
352-
const LAllocation* memoryBase() { return getOperand(3); }
353-
const wasm::MemoryAccessDesc& access() { return access_; }
354-
};
355-
356334
} // namespace jit
357335
} // namespace js
358336

js/src/jit/loong64/LIR-loong64.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -158,27 +158,6 @@ class LWasmCompareExchangeI64
158158
}
159159
};
160160

161-
class LWasmAtomicExchangeI64
162-
: public LInstructionHelper<INT64_PIECES, 2 + INT64_PIECES, 0> {
163-
public:
164-
LIR_HEADER(WasmAtomicExchangeI64);
165-
166-
LWasmAtomicExchangeI64(const LAllocation& ptr, const LInt64Allocation& value,
167-
const LAllocation& memoryBase)
168-
: LInstructionHelper(classOpcode) {
169-
setOperand(0, ptr);
170-
setInt64Operand(1, value);
171-
setOperand(1 + INT64_PIECES, memoryBase);
172-
}
173-
174-
const LAllocation* ptr() { return getOperand(0); }
175-
LInt64Allocation value() { return getInt64Operand(1); }
176-
const LAllocation* memoryBase() { return getOperand(1 + INT64_PIECES); }
177-
const MWasmAtomicExchangeHeap* mir() const {
178-
return mir_->toWasmAtomicExchangeHeap();
179-
}
180-
};
181-
182161
class LDivOrModI64 : public LBinaryMath<1> {
183162
public:
184163
LIR_HEADER(DivOrModI64)

js/src/jit/mips-shared/LIR-mips-shared.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -233,27 +233,6 @@ class LWasmCompareExchangeI64
233233
}
234234
};
235235

236-
class LWasmAtomicExchangeI64
237-
: public LInstructionHelper<INT64_PIECES, 2 + INT64_PIECES, 0> {
238-
public:
239-
LIR_HEADER(WasmAtomicExchangeI64);
240-
241-
LWasmAtomicExchangeI64(const LAllocation& ptr, const LInt64Allocation& value,
242-
const LAllocation& memoryBase)
243-
: LInstructionHelper(classOpcode) {
244-
setOperand(0, ptr);
245-
setInt64Operand(1, value);
246-
setOperand(1 + INT64_PIECES, memoryBase);
247-
}
248-
249-
const LAllocation* ptr() { return getOperand(0); }
250-
LInt64Allocation value() { return getInt64Operand(1); }
251-
const LAllocation* memoryBase() { return getOperand(1 + INT64_PIECES); }
252-
const MWasmAtomicExchangeHeap* mir() const {
253-
return mir_->toWasmAtomicExchangeHeap();
254-
}
255-
};
256-
257236
} // namespace jit
258237
} // namespace js
259238

js/src/jit/riscv64/LIR-riscv64.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -158,27 +158,6 @@ class LWasmCompareExchangeI64
158158
}
159159
};
160160

161-
class LWasmAtomicExchangeI64
162-
: public LInstructionHelper<INT64_PIECES, 2 + INT64_PIECES, 0> {
163-
public:
164-
LIR_HEADER(WasmAtomicExchangeI64);
165-
166-
LWasmAtomicExchangeI64(const LAllocation& ptr, const LInt64Allocation& value,
167-
const LAllocation& memoryBase)
168-
: LInstructionHelper(classOpcode) {
169-
setOperand(0, ptr);
170-
setInt64Operand(1, value);
171-
setOperand(1 + INT64_PIECES, memoryBase);
172-
}
173-
174-
const LAllocation* ptr() { return getOperand(0); }
175-
LInt64Allocation value() { return getInt64Operand(1); }
176-
const LAllocation* memoryBase() { return getOperand(1 + INT64_PIECES); }
177-
const MWasmAtomicExchangeHeap* mir() const {
178-
return mir_->toWasmAtomicExchangeHeap();
179-
}
180-
};
181-
182161
class LDivOrModI64 : public LBinaryMath<1> {
183162
public:
184163
LIR_HEADER(DivOrModI64)

js/src/jit/x86/LIR-x86.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -216,28 +216,6 @@ class LWasmCompareExchangeI64
216216
LInt64Allocation replacement() { return getInt64Operand(2 + INT64_PIECES); }
217217
};
218218

219-
class LWasmAtomicExchangeI64
220-
: public LInstructionHelper<INT64_PIECES, 2 + INT64_PIECES, 0> {
221-
const wasm::MemoryAccessDesc& access_;
222-
223-
public:
224-
LIR_HEADER(WasmAtomicExchangeI64);
225-
226-
LWasmAtomicExchangeI64(const LAllocation& memoryBase, const LAllocation& ptr,
227-
const LInt64Allocation& value,
228-
const wasm::MemoryAccessDesc& access)
229-
: LInstructionHelper(classOpcode), access_(access) {
230-
setOperand(0, memoryBase);
231-
setOperand(1, ptr);
232-
setInt64Operand(2, value);
233-
}
234-
235-
const LAllocation* memoryBase() { return getOperand(0); }
236-
const LAllocation* ptr() { return getOperand(1); }
237-
LInt64Allocation value() { return getInt64Operand(2); }
238-
const wasm::MemoryAccessDesc& access() { return access_; }
239-
};
240-
241219
} // namespace jit
242220
} // namespace js
243221

0 commit comments

Comments
 (0)