diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 16:50:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-07 16:50:03 -0700 |
commit | 87f65f1623983bfc516ff4b222a3bb2537971837 (patch) | |
tree | e0f64742eac547534e4e9b82f12a7c02202fb3ea /src/wasm-binary.h | |
parent | 135a20cd110d356d5d098a08a7b447205adaed7a (diff) | |
parent | c24b9f9f6af61abd9ef124837bee41cbba35a8f2 (diff) | |
download | binaryen-87f65f1623983bfc516ff4b222a3bb2537971837.tar.gz binaryen-87f65f1623983bfc516ff4b222a3bb2537971837.tar.bz2 binaryen-87f65f1623983bfc516ff4b222a3bb2537971837.zip |
Merge pull request #694 from WebAssembly/binary-order-fix
Ordering bug fixes for windows
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 40671b082..561a310b0 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1328,19 +1328,22 @@ public: } uint16_t getInt16() { if (debug) std::cerr << "<==" << std::endl; - auto ret = uint16_t(getInt8()) | (uint16_t(getInt8()) << 8); + auto ret = uint16_t(getInt8()); + ret |= uint16_t(getInt8()) << 8; if (debug) std::cerr << "getInt16: " << ret << " ==>" << std::endl; return ret; } uint32_t getInt32() { if (debug) std::cerr << "<==" << std::endl; - auto ret = uint32_t(getInt16()) | (uint32_t(getInt16()) << 16); + auto ret = uint32_t(getInt16()); + ret |= uint32_t(getInt16()) << 16; if (debug) std::cerr << "getInt32: " << ret << " ==>" << std::endl; return ret; } uint64_t getInt64() { if (debug) std::cerr << "<==" << std::endl; - auto ret = uint64_t(getInt32()) | (uint64_t(getInt32()) << 32); + auto ret = uint64_t(getInt32()); + ret |= uint64_t(getInt32()) << 32; if (debug) std::cerr << "getInt64: " << ret << " ==>" << std::endl; return ret; } |