Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWasm: Check for correct NaN bit patterns in tests #591

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

dzfrias
Copy link
Contributor

@dzfrias dzfrias commented Jul 12, 2024

nan:arithmetic and nan:canonical are indeterminate in the sense that the allowed bit patterns represent a set of NaNs. We now properly check these bit patterns in the tests, both scalar floats and vectors containing floats.

Some spec-tests check the bit pattern of a returned `NaN` (i.e.
`nan:canonical`, `nan:arithmetic`, or something like `nan:0x200000`).
Previously, we just accepted any `NaN`.
Because `nan:arithmetic` and `nan:canonical` aren't bound to a single
bit pattern, we cannot check against a float-containing SIMD vector
against a single value in the tests. Now, we represent `v128`s as
`TypedArray`s in `testjs` (as opposed to using `BigInt`s), allowing us
to properly check `NaN` bit patterns.
@alimpfard alimpfard merged commit 906fa04 into LadybirdBrowser:master Jul 12, 2024
6 checks passed
@dzfrias dzfrias deleted the wasm-simd-float-tests branch July 12, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants