According to wasm's spec, nearest must do the following, for NaN inputs: - when the input is a canonical NaN, return a canonical NaN; - when the input is a non-canonical NaN, return an arithmetic NaN. This patch adds checks when the exponent is all ones if the input was a NaN, and will set the significand's most significant bit in that case. It works both for canonical inputs (which already had the bit set) and makes other NaN inputs canonical.
This is the wasmtime-runtime crate, which contains wasm runtime library
support, supporting the wasm ABI used by wasmtime-environ,
wasmtime-jit, and wasmtime-obj.
This crate does not make a host vs. target distinction; it is meant to be compiled for the target.
Most users will want to use the main wasmtime crate instead of using this
crate directly.