From 1b5bd6e3e6102aa96cc4e1047d0684c726881705 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 28 Apr 2016 18:03:30 -0700 Subject: fix size detection on reinterpret operations in binary format --- src/wasm-binary.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wasm-binary.h') diff --git a/src/wasm-binary.h b/src/wasm-binary.h index e9845a1fb..978c3da6d 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1018,8 +1018,8 @@ public: case ConvertSInt64: o << int8_t(curr->type == f32 ? BinaryConsts::F32SConvertI64 : BinaryConsts::F64SConvertI64); 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; - case ReinterpretInt: o << int8_t(curr->type == i32 ? BinaryConsts::I32ReinterpretF32 : BinaryConsts::I64ReinterpretF64); break; + case ReinterpretFloat: o << int8_t(curr->type == i32 ? BinaryConsts::F32ReinterpretI32 : BinaryConsts::F64ReinterpretI64); break; + case ReinterpretInt: o << int8_t(curr->type == f32 ? BinaryConsts::I32ReinterpretF32 : BinaryConsts::I64ReinterpretF64); break; default: abort(); } } -- cgit v1.2.3