Building the ICU data file hasn't required yasm since bug 1650299, and
all the compilers we support now have a GAS-like assembler that we use
unconditionally.
Differential Revision: https://phabricator.services.mozilla.com/D105268
Generalize the SIMD wormhole to both x86 and x64, and both baseline
and Ion, so that we can start experimenting with it on a broader
scale.
Change the config so that the feature will ride the trains,
preffed-off by default (the current setting). The pref disappears
from view in late betas, though the feature remains; it can be
requested by another means (later patch) from privileged content only.
Differential Revision: https://phabricator.services.mozilla.com/D101709
Generalize the SIMD wormhole to both x86 and x64, and both baseline
and Ion, so that we can start experimenting with it on a broader
scale.
Change the config so that the feature will ride the trains,
preffed-off bydefault (the current setting).
Differential Revision: https://phabricator.services.mozilla.com/D101709
Generalize the SIMD wormhole to both x86 and x64, and both baseline
and Ion, so that we can start experimenting with it on a broader
scale.
Differential Revision: https://phabricator.services.mozilla.com/D101709
Generalize the SIMD wormhole to both x86 and x64, and both baseline
and Ion, so that we can start experimenting with it on a broader
scale.
Differential Revision: https://phabricator.services.mozilla.com/D101709
Fix the vector min/max reductions to not overwrite the source before writing the
destination, if src == dest.
Fix moz.configure to enable wasm simd by default even if we're running on the
simulator, this was a bug that has prevented us from testing cranelift
(and the simulator, as this bug shows) as well as we should, up until now.
Differential Revision: https://phabricator.services.mozilla.com/D102594
Generalize the SIMD wormhole to both x86 and x64, and both baseline
and Ion, so that we can start experimenting with it on a broader
scale.
Differential Revision: https://phabricator.services.mozilla.com/D101709
Fix the vector min/max reductions to not overwrite the source before writing the
destination, if src == dest.
Fix moz.configure to enable wasm simd by default even if we're running on the
simulator, this was a bug that has prevented us from testing cranelift
(and the simulator, as this bug shows) as well as we should, up until now.
Differential Revision: https://phabricator.services.mozilla.com/D102594
Apple Silicon does not provide any way to figure out the JSCVT flag at runtime.
This patch hard code in the MOZ_AARCH64_JSCVT macro the expected value of the
JSCVT flag expected on Apple Silicon hardware.
Differential Revision: https://phabricator.services.mozilla.com/D101208
Apple Silicon does not provide any way to figure out the JSCVT flag at runtime.
This patch hard code in the MOZ_AARCH64_JSCVT macro the expected value of the
JSCVT flag expected on Apple Silicon hardware.
Differential Revision: https://phabricator.services.mozilla.com/D101208
Introduce a mechanism for experimenting with unary and binary SIMD
instructions (x64 + ion only, nightly only, and behind flags).
Basically this is useful for performance experiments.
A specific pattern of the first 15 bytes of the mask of the shuffle
opcode is recognized as a trigger; the last byte has the opcode 0..31.
For unary operations the two input values should be the same; the lhs
will always be chosen. The pattern is recognized during lowering and
translated to specific machine instructions.
This mechanism is preferable to custom opcodes because it allows
existing tools (emscripten/llvm/binaryen/linkers) to be used without
change.
To trigger this, use --wasm-compiler=ion --wasm-simd-wormhole in the
shell or set javascript.options.wasm_baselinejit=false and
javascript.options.wasm_simd_wormhole=true in about:config.
This patch is mostly infrastructure but also introduces three
experimental opcodes: one to test for the presence and operation of
the wormhole, one to invoke the Intel PMADDUBSW instruction, and one
to invoke the Intel PMADDWD instruction.
Differential Revision: https://phabricator.services.mozilla.com/D94101
Introduce a mechanism for experimenting with unary and binary SIMD
instructions (x64 + ion only, nightly only, and behind flags).
Basically this is useful for performance experiments.
A specific pattern of the first 15 bytes of the mask of the shuffle
opcode is recognized as a trigger; the last byte has the opcode 0..31.
For unary operations the two input values should be the same; the lhs
will always be chosen. The pattern is recognized during lowering and
translated to specific machine instructions.
This mechanism is preferable to custom opcodes because it allows
existing tools (emscripten/llvm/binaryen/linkers) to be used without
change.
To trigger this, use --wasm-compiler=ion --wasm-simd-wormhole in the
shell or set javascript.options.wasm_baselinejit=false and
javascript.options.wasm_simd_wormhole=true in about:config.
This patch is mostly infrastructure but also introduces three
experimental opcodes: one to test for the presence and operation of
the wormhole, one to invoke the Intel PMADDUBSW instruction, and one
to invoke the Intel PMADDWD instruction.
Differential Revision: https://phabricator.services.mozilla.com/D94101
This patch enables Cranelift as a compiler for wasm on AArch64 targets:
* class CraneliftStaticEnvironment: new field `v128_enabled`.
* constructor for CraneliftStaticEnvironment: ridealong fix: initialise
`threads_enabled`. This appears to have been missing.
* `struct BD_ConstantValue` and `global_constantValue`: handle V128-typed
constants.
* js/src/wasm/WasmJS.cpp: changes to gating logic
* js/src/wasm/cranelift/src/bindings/mod.rs: handle V128-typed constants.
* js/src/wasm/cranelift/src/compile.rs: ridealong fix to make debug output
less verbose and easier to navigate
* js/src/wasm/cranelift/src/wasm2clif.rs: Track initial multi-memory changes
on the CL side
Parts of this patch were written by Benjamin Bouvier.
Differential Revision: https://phabricator.services.mozilla.com/D96707
We want to enable cranelift on aarch64 hardware except on Windows (due
to ABI issues) and on x64 with the aarch64 simulator, but not on x64
in general (because it is immature).
Add a test case to ensure that cranelift is not enabled where we do
not expect it to be.
Differential Revision: https://phabricator.services.mozilla.com/D96058
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
This commit merges the TypedObject namespace into the WebAssembly namespace, and
only exposes the TypedObject definitions when the GC feature is enabled.
A future commit will remove the TypedObject definitions from the namespace, but we
still need the infrastructure from this commit for storing the TypedObject definitions
in private slots in the namespace.
Differential Revision: https://phabricator.services.mozilla.com/D92857
This commit merges the TypedObject namespace into the WebAssembly namespace, and
only exposes the TypedObject definitions when the GC feature is enabled.
A future commit will remove the TypedObject definitions from the namespace, but we
still need the infrastructure from this commit for storing the TypedObject definitions
in private slots in the namespace.
Differential Revision: https://phabricator.services.mozilla.com/D92857
Now that we don't recurse into the js python configure, we don't need to
have a special treatment for the options that need to be passed down to
that subconfigure, which is what js_option was for.
Differential Revision: https://phabricator.services.mozilla.com/D92727
It was only meant to be used internally, when the top-level python
configure invoked the js python subconfigure. Now that this doesn't
happen, we can remove the option, and consolidate js_standalone and
building_js, which are now roughly synonyms.
Differential Revision: https://phabricator.services.mozilla.com/D92726
Instead, we now run js/src/old-configure from the top-level configure
after having run old-configure and extracted a few variables to inherit
from it.
Because we're now running from the top-level, $_objdir is always the
top-level objdir, which simplifies some things. The topobjdir in
js/src/config.status, however, needs to stay in js/src because of the
build frontend expecting it there.
When running js/src/old-configure, we used to need some special
treatment for a large number of variables for historic reasons, where
we'd take values from the assigned values before running old-configure
for some, or from AC_SUBSTs after running old-configure.
Now that both old-configure and js/src/old-configure get the same
assignments from old-configure.vars, we don't need anything special for
the former. And only a few remaining variables still need manual work
for the latter.
One notable difference, though, is that the new code doesn't try to
avoid running js subconfigure, which added complexity, and was actually
error-prone.
Differential Revision: https://phabricator.services.mozilla.com/D92725
This gets rid of an ad-hoc boolean constant and introduces a configuration flag
for experimental SIMD instructions. The flag is on by default in Nightly if
SIMD is also enabled; otherwise off. This patch therefore disables support for
experimental SIMD instructions in beta and release, where they have been
available with the other SIMD instructions behind a pref. This seems OK:
code using unstable bits of an in-progress proposal should stick to Nightly.
Differential Revision: https://phabricator.services.mozilla.com/D92554
These two platforms are the only ones where Cranelift has a functioning
backend. It doesn't make sense to include Cranelift in the build
otherwise, and doing so may cause other issues or breakage.
Differential Revision: https://phabricator.services.mozilla.com/D92284
This lays the groundwork for ARM64 simd in the baseline compiler and
runtime. Mostly this is non-dramatic.
The main problem to be solved is SIMD register allocation and
save/restore in the stubs. We can't use the register sets in the
usual way to do this for reasons that are explained at length in
comments in Architecture-arm64.h, WasmStubs.cpp, and
WasmBaselineCompile.cpp, so there are a couple of cheats, that
basically come down to (sometimes contextually) treating doubles as
vectors. By and large this is surprisingly clean.
The patch also splits a huge test file (simd/spec/nan-flavors.js) into
many smaller files so as to avoid OOM conditions when testing on
device with --ion-eager and similar switch settings that cause massive
amounts of jit code to be allocated.
Differential Revision: https://phabricator.services.mozilla.com/D90740
We've decided to mitigate risk somewhat, for now, by enabling
Cranelift/aarch64-based Wasm support only on Nightly builds. This patch
removes Cranelift entirely from the default beta and release build
configurations. We'll plan to revisit this once we have more experience
with Cranelift on Nightly.
Differential Revision: https://phabricator.services.mozilla.com/D91960
This commit adds the boilerplate machinery for the function-references proposal. The
interesting piece is that the GC proposal is moved to require the function-references
proposal to be enabled.
The configuration machinery for features is refactored in this commit to avoid passing
6 different booleans around as parameters to functions.
* A FeatureArgs struct is added with values for all 'feature' configuration options
- A feature is defined as an option that affects validation or semantics
- Essentially everything besides 'debug', 'mode', 'tier'
* All feature configuration responsibility is removed from CompilerEnvironment
* ModuleEnvironment is modified to accept a FeatureArgs in addition to a
CompilerEnvironment
- The CompilerEnvironment field may eventually be removed, as it's not needed
within function validation, and is only used by the compilers later
Differential Revision: https://phabricator.services.mozilla.com/D89857
This adds a 'minimum' argument to the JS-API for the WebAssembly.Memory
and WebAssembly.Table objects. This parameter represents the minimum
size of the object which was specified by the 'initial' parameter. This
supports using either initial or minimum to specify the parameter.
This commit is part of the work to add type reflections to the
WebAssembly JS-API as specified in the js-types proposal.
Differential Revision: https://phabricator.services.mozilla.com/D85887