diff options
author | Ben Smith <binjimin@gmail.com> | 2017-03-24 14:44:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-24 14:44:37 -0700 |
commit | aad6e98314bc4225dca7e12aa9795cb0ad87f21e (patch) | |
tree | f1b7ad8914a19a169e9e256f0a1dd211616df3c8 /src/resolve-names.cc | |
parent | 41d597d678b6443d9e8a692316271ceafd8bcc2d (diff) | |
download | wabt-aad6e98314bc4225dca7e12aa9795cb0ad87f21e.tar.gz wabt-aad6e98314bc4225dca7e12aa9795cb0ad87f21e.tar.bz2 wabt-aad6e98314bc4225dca7e12aa9795cb0ad87f21e.zip |
Support arithmetic/canonical NaN; update testsuite (#368)
Positive NaN (+nan) is defined as being a NaN value where the sign bit
is clear, the exponent is all ones, and the tag has only the "quiet" bit
set. The quiet bit is the most-significant bit of the tag. For example,
for a 32-bit float, +nan is 0x7cf00000.
"Canonical NaN" is either +nan or -nan, where -nan is +nan with the sign
bit set.
"Arithmetic NaN" is defined as any other quiet NaN (i.e. the quiet bit
must be set, but any other bit can be either 0 or 1.)
This change doesn't update the interpreter because it is only a
loosening of the previous NaN behavior.
Diffstat (limited to 'src/resolve-names.cc')
-rw-r--r-- | src/resolve-names.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve-names.cc b/src/resolve-names.cc index 045505eb..b20d1d78 100644 --- a/src/resolve-names.cc +++ b/src/resolve-names.cc @@ -355,7 +355,8 @@ static void visit_command(Context* ctx, Command* command) { case CommandType::Action: case CommandType::AssertReturn: - case CommandType::AssertReturnNan: + case CommandType::AssertReturnCanonicalNan: + case CommandType::AssertReturnArithmeticNan: case CommandType::AssertTrap: case CommandType::AssertExhaustion: case CommandType::Register: |