Граф коммитов

228 Коммитов

Автор SHA1 Сообщение Дата
Yury Delendik 2f5f62242f Bug 1693912 - Renumber SIMD instructions based on final spec. r=rhunt
Renumbers instructions based on final SIMD spec.

Removes I16x8AnyTrue / I32x4AnyTrue

Differential Revision: https://phabricator.services.mozilla.com/D105840
2021-03-12 17:23:54 +00:00
Narcis Beleuzu 486bdf354b Bug 1692939 - Fix SM bustage. r=glandium CLOSED TREE 2021-02-19 01:25:47 +02:00
Mike Hommey fa35a4b8c7 Bug 1692939 - Turn namespace() into a builtin in python configure. r=firefox-build-system-reviewers,mhentges
This removes the need for some --help dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D105263
2021-02-18 22:44:40 +00:00
Mike Hommey f7d3ec1dfb Bug 1692945 - Remove check for yasm/gas in js. r=firefox-build-system-reviewers,andi,dmajor
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
2021-02-16 21:17:05 +00:00
Lars T Hansen 5da0ebf447 Bug 1692420 - Remove ENABLE_WASM_SIMD_EXPERIMENTAL. r=yury
Obsolete config; there are no more experimental SIMD instructions
coming, let's clean this up.

Differential Revision: https://phabricator.services.mozilla.com/D104988
2021-02-15 14:58:30 +00:00
Lars T Hansen cda3e5d212 Bug 1686652 - Generalize the SIMD wormhole. r=yury
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
2021-02-12 08:44:08 +00:00
Bogdan Tara d2a9feb234 Backed out changeset 58936f707b78 (bug 1686652) for wormhole related failures CLOSED TREE 2021-01-29 16:20:16 +02:00
Lars T Hansen 71d7e9fb76 Bug 1686652 - Generalize the SIMD wormhole. r=yury
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
2021-01-29 13:28:09 +00:00
Narcis Beleuzu 116cda7de7 Backed out changeset a3a8f2b9d254 (bug 1686652) for Linting failure on moz.configure . CLOSED TREE 2021-01-27 16:49:11 +02:00
Lars T Hansen 60345fdc88 Bug 1686652 - Generalize the SIMD wormhole. r=yury
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
2021-01-27 14:16:02 +00:00
Dorel Luca 780321d9aa Backed out changeset d0bbe10f929f (bug 1686652) for Spidermonkey failure in js/src/jit-test/tests/wasm/simd/wormhole-gating.js. CLOSED TREE 2021-01-27 14:48:03 +02:00
Lars T Hansen c99fa9969d Bug 1686652 - Generalize the SIMD wormhole. r=yury
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
2021-01-27 11:48:18 +00:00
Lars T Hansen 9da69d2038 Bug 1687936 - Fix uminv/umaxv/sminv/smaxv; fix config. r=nbp
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
2021-01-27 11:35:40 +00:00
Noemi Erli 90adf6419e Backed out changeset c11d0b4deea8 (bug 1686652) for causing failures in wormhole-x64-ion-codegen.js CLOSED TREE 2021-01-26 00:48:15 +02:00
Lars T Hansen e465923845 Bug 1686652 - Generalize the SIMD wormhole. r=yury
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
2021-01-25 19:17:46 +00:00
Csoregi Natalia 47431345ab Backed out 2 changesets (bug 1687936, bug 1687949) for spidermonkey bustage. CLOSED TREE
Backed out changeset becb6a284f38 (bug 1687949)
Backed out changeset e4fe21125777 (bug 1687936)
2021-01-25 22:59:04 +02:00
Lars T Hansen 0a98cdcce6 Bug 1687936 - Fix uminv/umaxv/sminv/smaxv; fix config. r=nbp
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
2021-01-25 17:55:52 +00:00
Nicolas B. Pierron b39cce4fb7 Bug 1679922 - Change wording of --enable-arm64-fjcvtzs to include Enable|Disable. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D102630
2021-01-21 19:00:50 +00:00
Nicolas B. Pierron 704ee8449e Bug 1679922 - Apple Aarch64: Hard code JSCVT feature flag. r=lth
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
2021-01-21 12:06:33 +00:00
Butkovits Atila 5da94b141e Backed out changeset 6ca79677c286 (bug 1679922) for bustages on Spidermonkey. CLOSED TREE 2021-01-20 16:16:33 +02:00
Nicolas B. Pierron e9da6df3eb Bug 1679922 - Apple Aarch64: Hard code JSCVT feature flag. r=lth
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
2021-01-20 13:31:45 +00:00
Lars T Hansen 810305d3e2 Bug 1672160 - SIMD wormhole. r=rhunt
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
2020-12-15 09:49:35 +00:00
Butkovits Atila 5f456b2985 Backed out changeset ab835b3d50f9 (bug 1672160) for causing bustage on codegen-x64-test.js. CLOSED TREE 2020-12-15 10:43:44 +02:00
Lars T Hansen e67a161e57 Bug 1672160 - SIMD wormhole. r=rhunt
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
2020-12-15 07:39:15 +00:00
Ioanna Dimitriou 0a751a2ff2 Bug 1335652 - wasm exceptions part 1: configuration & flags r=rhunt
Adds compile-time and run-time flags for wasm exception handling.

Differential Revision: https://phabricator.services.mozilla.com/D96680
2020-12-04 22:47:29 +00:00
Christian Holler d491828238 Bug 1677045 - Replace JS_MORE_DETERMINISTIC with a runtime flag. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D96973
2020-12-03 08:23:07 +00:00
smolnar 47dc815c12 Backed out changeset 750b066e600e (bug 1677045) for causing SM bustage in Iteration.cpp CLOSED TREE 2020-12-02 14:58:53 +02:00
Christian Holler 612654dd75 Bug 1677045 - Replace JS_MORE_DETERMINISTIC with a runtime flag. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D96973
2020-12-02 11:39:33 +00:00
Julian Seward d58d4577bc Bug 1676624 - Enable Cranelift as a compiler for wasm on AArch64 targets. r=lth.
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
2020-11-20 13:55:00 +00:00
Mihai Alexandru Michis 2122917797 Bug 1674722 - Fix lint failure in js/moz.configure a=lint-fix
CLOSED TREE
DONTBUILD
2020-11-06 09:59:55 +02:00
Lars T Hansen b50158f16e Bug 1674722 - Fix moz.configure setup for cranelift. r=rhunt
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
2020-11-06 07:11:48 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
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
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
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
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
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
2020-10-21 21:27:27 +00:00
Ryan Hunt 67e0a28855 Bug 1669784 - Merge TypedObject namespace into WebAssembly namespace, gated on GC feature. r=lth
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
2020-10-12 21:01:39 +00:00
Razvan Maries afbeaa9f10 Backed out 11 changesets (bug 1669784) for mochitests perma failures. CLOSED TREE
Backed out changeset 59d7cd2a604c (bug 1669784)
Backed out changeset 01f901ce054b (bug 1669784)
Backed out changeset 481b2e98e24b (bug 1669784)
Backed out changeset aa2da8a6cc39 (bug 1669784)
Backed out changeset 506ef415351b (bug 1669784)
Backed out changeset 331a512fee82 (bug 1669784)
Backed out changeset 248d39d51318 (bug 1669784)
Backed out changeset 18cdaa6614cf (bug 1669784)
Backed out changeset 62ad099fe894 (bug 1669784)
Backed out changeset 792089710c63 (bug 1669784)
Backed out changeset 89e5f4b08331 (bug 1669784)
2020-10-09 20:10:43 +03:00
Ryan Hunt 72e3b9e029 Bug 1669784 - Merge TypedObject namespace into WebAssembly namespace, gated on GC feature. r=lth
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
2020-10-09 15:45:29 +00:00
Mike Hommey d3519998ac Bug 1520395 - Remove the python configure distinction between option and js_option. r=firefox-build-system-reviewers,andi,rstewart
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
2020-10-08 04:07:46 +00:00
Mike Hommey a12805866c Bug 1669633 - Remove the JS_STANDALONE option. r=firefox-build-system-reviewers,rstewart
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
2020-10-07 17:48:06 +00:00
Mike Hommey 9ebbe2c5bc Bug 1669633 - Don't recurse into js/src for the python-part of configure. r=firefox-build-system-reviewers,rstewart
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
2020-10-07 21:13:19 +00:00
Lars T Hansen 907323e1fd Bug 1669428 - Properly control experimental SIMD instructions. r=jseward
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
2020-10-06 12:10:56 +00:00
Chris Fallin 2ff06be9eb Bug 1668910: don't enable Cranelift by default unless target is ARM64 or x86-64. r=lth
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
2020-10-02 19:20:12 +00:00
Lars T Hansen 76380e533c Bug 1609381 - arm64 baseline simd, part 1: config, register sets, stubs. r=jseward
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
2020-10-02 13:12:42 +00:00
Chris Fallin d6d51d360a Bug 1668321: Enable Cranelift/aarch64 Wasm only on Nightly builds. r=lth
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
2020-09-30 18:47:29 +00:00
Ryan Hunt 33b1e95109 Bug 1664361 - wasm: Add function-references configuration option and runtime flag. r=lth
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
2020-09-28 19:18:48 +00:00
Benjamin Bouvier 04cb8ae82c Bug 1665028: Tweak the cranelift_default check for arm32 simulator; r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D90827
2020-09-23 21:21:54 +00:00
Jessica Tallon 1ab5dc76df Bug 1651725 - Add 'minimum' argument to WASM's Memory & Table r=lth
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
2020-09-21 11:01:19 +00:00
Csoregi Natalia 67eb265e55 Backed out changeset db6f7a903c64 (bug 1651725) for spidermonkey bustage on /basic.js. CLOSED TREE 2020-09-10 19:43:00 +03:00