gecko-dev/js
Julian Seward b71f48bafa Bug 1716580 - ARM64+x64: Generate good code for i64 compare-and-select. r=lth.
For all targets, we generate good code for i32 compare followed by i32 select,
provided the compare result is only used once.  "Good" in the sense that the
comparison result is not materialised into a register, but is instead
transmitted to the select instruction as a condition code.

On various targets float64 and float32 arguments are variously accepted as the
comparison and/or selection types.  However, on no targets are 64-bit integers
accepted as either type.

This patch extends the machinery to create good code for the cases
compare-i32-select-i64, compare-i64-select-i32 and compare-i64-select-i64, on
x64 and arm64.  All other targets are unaffected.  The patch uses the existing
`LWasmCompareAndSelect` LIR node since that already has meaning "single
register compare, single register select", and we are not introducing any
double-register working here.

The methods `LIRGenerator*::canSpecializeWasmCompareAndSelect`,
`LIRGenerator*::lowerWasmCompareAndSelect` and
`CodeGenerator*::visitWasmCompareAndSelect` have been completely un-shared
(they were previously partly shared) and specialised to their specific
architectures.  With the addition of the {i32,i64} x {i32,i64} cases the
remaining sharing is minimal and makes the code harder to follow.

The rest of the changes are straightforward.

tests/wasm/binop-arm64-ion-codegen.js
tests/wasm/binop-x64-ion-codegen.js
* new tests

jit/shared/Lowering-shared.cpp
* remove generic {canSpecialize,lower}WasmCompareAndSelect

jit/CodeGenerator.cpp:
* remove generic emitWasmCompareAndSelect

jit/arm64/Lowering-arm64.cpp
* extend existing {canSpecialize,lower}WasmCompareAndSelect

jit/arm64/CodeGenerator-arm64.cpp
* extend existing visitWasmCompareAndSelect

jit/x64/Lowering-x64.cpp
* private versions of {canSpecialize,lower}WasmCompareAndSelect

jit/x64/CodeGenerator-x64.cpp
* new method visitWasmCompareAndSelect (heavily modified generic)

jit/arm/Lowering-arm.cpp
* private versions of {canSpecialize,lower}WasmCompareAndSelect

jit/arm/CodeGenerator-arm.cpp
* private version of emitWasmCompareAndSelect (specialisation of generic)

jit/x86/Lowering-x86.cpp
* private versions of {canSpecialize,lower}WasmCompareAndSelect

jit/x86/CodeGenerator-x86.cpp
* private version of emitWasmCompareAndSelect (copy of generic)

jit/arm64/MacroAssembler-arm64.h
* new insn support for arm64

jit/x64/MacroAssembler-x64.h
jit/x64/MacroAssembler-x64.cpp
* new insn support for x64

Differential Revision: https://phabricator.services.mozilla.com/D133738
2021-12-17 14:18:42 +00:00
..
ductwork/debugger
examples Bug 1582895 - Minor irrelevant jorendb tweaks r=jonco 2021-10-18 20:34:38 +00:00
public Bug 1724123 - Part 43: Detect async generator in invalid state due to debugger interaction and throw error. r=mgaudet 2021-12-14 07:09:14 +00:00
src Bug 1716580 - ARM64+x64: Generate good code for i64 compare-and-select. r=lth. 2021-12-17 14:18:42 +00:00
xpconnect Bug 1721217 - Part 5: Change the error code when we cancel loads due to another one starting, r=nika 2021-12-16 22:27:17 +00:00
app.mozbuild
ffi.configure Bug 1694884 - Fail configure when using --*-system-* options with a bootstrapped sysroot. r=firefox-build-system-reviewers,mhentges 2021-07-16 20:51:27 +00:00
moz.build Bug 1708739 - Move WeakMap APIs to new public header r=yulia 2021-05-01 12:10:14 +00:00
moz.configure Bug 1745838 - Move MOZJS_*_VERSION and MOZJS_ALPHA to python configure. r=firefox-build-system-reviewers,andi 2021-12-16 07:37:34 +00:00
sub.configure