-
Notifications
You must be signed in to change notification settings - Fork 284
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
Wasmi returns unexpected NaN bit pattern #569
Comments
|
Thank you for your reply. The output is NaN is as expeced. However, according to the specification https://webassembly.github.io/spec/core/exec/numerics.html#floating-point-operations, in this example, for the value on the stack, the most significant bit of payload is supposed to be 1. It means the highest 13 bits are 0111 1111 1111 1 or 1111 1111 1111 1 . In this example. The highest 13 bit of the value on the stack is 1111 1111 1111 1. Thank you! |
With respect to Wasm spec testsuite compliance for NaN values in In contrast, |
@erxiaozhou I just re-ran the above test with Wasmi v0.38.0 and got the following result: Original output of old Wasmi version from bug report: % wasmi_cli 04-original.wasm
nan:0x7FF8000000000039 I guess the bits have to be swapped: Wasmtime funnily just returns a % wasmtime 04-original.wasm
NaN |
Description
Current State
0x0 0x0 0x0 0x2f 0x0 0x0 0xf0 0xff
Expected
........ 0xf8 0xff (The most significant bit of payload is 1)
Environment
Steps to Reproduce
wasmi.zip
wasmi <test_case_name> to_test
The text was updated successfully, but these errors were encountered: