diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-01-29 15:09:08 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-01-29 15:09:08 -0800 |
commit | 2ecdaa083088588e39705bdbe5d78338283fa9e8 (patch) | |
tree | 71410de43965f25e334f79773c0c9f8b82e9358b | |
parent | 6537e5205b9d2e319dc0d7642aebba2cd32a2790 (diff) | |
download | binaryen-2ecdaa083088588e39705bdbe5d78338283fa9e8.tar.gz binaryen-2ecdaa083088588e39705bdbe5d78338283fa9e8.tar.bz2 binaryen-2ecdaa083088588e39705bdbe5d78338283fa9e8.zip |
fix ConvertSInt64 in binary format
-rw-r--r-- | src/wasm-binary.h | 2 | ||||
-rw-r--r-- | test/kitchen_sink.wast.fromBinary | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index ccd6d9276..192a8cdd7 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -814,7 +814,7 @@ public: case ConvertUInt32: o << int8_t(curr->type == f32 ? BinaryConsts::I32UConvertF32 : BinaryConsts::I32UConvertF64); break; case ConvertSInt32: o << int8_t(curr->type == f32 ? BinaryConsts::I32SConvertF32 : BinaryConsts::I32SConvertF64); break; case ConvertUInt64: o << int8_t(curr->type == f32 ? BinaryConsts::I64UConvertF32 : BinaryConsts::I64UConvertF64); break; - case ConvertSInt64: o << int8_t(curr->type == f32 ? BinaryConsts::I64UConvertF32 : BinaryConsts::I64UConvertF64); break; + case ConvertSInt64: o << int8_t(curr->type == f32 ? BinaryConsts::I64SConvertF32 : BinaryConsts::I64SConvertF64); break; case DemoteFloat64: o << int8_t(BinaryConsts::F32ConvertF64); break; case PromoteFloat32: o << int8_t(BinaryConsts::F64ConvertF32); break; case ReinterpretFloat: o << int8_t(curr->type == f32 ? BinaryConsts::F32ReinterpretI32 : BinaryConsts::F64ReinterpretI64); break; diff --git a/test/kitchen_sink.wast.fromBinary b/test/kitchen_sink.wast.fromBinary index 9bdde920f..a4a28fcef 100644 --- a/test/kitchen_sink.wast.fromBinary +++ b/test/kitchen_sink.wast.fromBinary @@ -392,7 +392,7 @@ (f32.convert_u/i32 (i32.const 10) ) - (f32.convert_u/i64 + (f32.convert_s/i64 (i64.const 100) ) (f32.convert_u/i64 @@ -410,7 +410,7 @@ (f64.convert_u/i32 (i32.const 10) ) - (f64.convert_u/i64 + (f64.convert_s/i64 (i64.const 100) ) (f64.convert_u/i64 |