This repository was archived by the owner on Dec 22, 2021. It is now read-only.
Implement JS output for SIMD#331
Merged
ngzhian merged 3 commits intoWebAssembly:masterfrom Aug 28, 2020
Merged
Conversation
V128 is not exposed to JS at all, so transform all functions with V128 in the signatures into consts, compare with the expected value, and reduce it to a int32. An assertion against a SimdResult needs to be converted into a plain Const containing a v128. This conversion is tricky since SimdResult can contain both LitPat and NanPat. NaNs need special treatment to mask and compare to a canonical value. For simplicity, we build a mask for all the patterns in a SimdResult (even for literals, which will have a mask with all bits set). That way the test is consistent: - v128.const(mask) - v128.and - v128.const(expected) - i8x16.eq - i8x16.all_true - br_if 0 to unreachable
rossberg
approved these changes
Aug 28, 2020
Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
V128 is not exposed to JS at all, so transform all functions with V128
in the signatures into consts, compare with the expected value, and
reduce it to a int32. (This is similar to how things are done for i64.)
An assertion against a SimdResult needs to be converted into a plain
Const containing a v128. This conversion is tricky since SimdResult can
contain both LitPat and NanPat. NaNs need special treatment to mask and
compare to a canonical value. For simplicity, we build a mask for all
the patterns in a SimdResult (even for literals, which will have a mask
with all bits set). That way the test is consistent: