diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-03-20 20:28:05 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-03-20 20:28:05 -0700 |
commit | b3f029d8b3be1cfc74a035a6549f4ab2e62e9931 (patch) | |
tree | 0d919138efd26b77c37cc21727c9ae9d68cffeee /src/wasm-interpreter.h | |
parent | d802638ea36ce950f260c42e8bc8e2195c625efa (diff) | |
parent | c67c3b8d9b5d09b1f04a602c6248be50ef51569f (diff) | |
download | binaryen-b3f029d8b3be1cfc74a035a6549f4ab2e62e9931.tar.gz binaryen-b3f029d8b3be1cfc74a035a6549f4ab2e62e9931.tar.bz2 binaryen-b3f029d8b3be1cfc74a035a6549f4ab2e62e9931.zip |
Merge pull request #265 from WebAssembly/asm2wasm-opts
asm2wasm opts
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r-- | src/wasm-interpreter.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index eca91fc82..e9ced6b6f 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -631,7 +631,7 @@ private: return Literal(int32_t(val)); } else { int64_t converted = val; - if ((val >= 1 && converted <= 0) || val < (double)LLONG_MIN) trap("i32.truncSFloat overflow"); + if ((val >= 1 && converted <= 0) || val < (double)LLONG_MIN) trap("i64.truncSFloat overflow"); return Literal(converted); } } @@ -640,7 +640,7 @@ private: double val = value.getFloat(); if (isnan(val)) trap("truncUFloat of nan"); if (curr->type == i32) { - if (val > (double)std::numeric_limits<uint32_t>::max() || val <= (double)-1) trap("i64.truncUFloat overflow"); + if (val > (double)std::numeric_limits<uint32_t>::max() || val <= (double)-1) trap("i32.truncUFloat overflow"); return Literal(uint32_t(val)); } else { uint64_t converted = val; |