diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-28 18:29:57 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-28 18:29:57 -0700 |
commit | a04e5b17fb97fe67747fcc070b06d872a5904c9b (patch) | |
tree | 5be614ef1868e9285c06ff529b69397a69e52960 /src/wasm-binary.h | |
parent | 1b5bd6e3e6102aa96cc4e1047d0684c726881705 (diff) | |
download | binaryen-a04e5b17fb97fe67747fcc070b06d872a5904c9b.tar.gz binaryen-a04e5b17fb97fe67747fcc070b06d872a5904c9b.tar.bz2 binaryen-a04e5b17fb97fe67747fcc070b06d872a5904c9b.zip |
get the reinterpret opcodes right on float/int
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 978c3da6d..0bd86ffb6 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 == i32 ? BinaryConsts::F32ReinterpretI32 : BinaryConsts::F64ReinterpretI64); break; - case ReinterpretInt: o << int8_t(curr->type == f32 ? BinaryConsts::I32ReinterpretF32 : BinaryConsts::I64ReinterpretF64); break; + case ReinterpretFloat: o << int8_t(curr->type == i32 ? BinaryConsts::I32ReinterpretF32 : BinaryConsts::I64ReinterpretF64); break; + case ReinterpretInt: o << int8_t(curr->type == f32 ? BinaryConsts::F32ReinterpretI32 : BinaryConsts::F64ReinterpretI64); break; default: abort(); } } @@ -1911,10 +1911,10 @@ public: case BinaryConsts::F32ConvertF64: curr = allocator.alloc<Unary>(); curr->op = DemoteFloat64; curr->type = f32; break; case BinaryConsts::F64ConvertF32: curr = allocator.alloc<Unary>(); curr->op = PromoteFloat32; curr->type = f64; break; - case BinaryConsts::F32ReinterpretI32: curr = allocator.alloc<Unary>(); curr->op = ReinterpretFloat; curr->type = i32; break; - case BinaryConsts::F64ReinterpretI64: curr = allocator.alloc<Unary>(); curr->op = ReinterpretFloat; curr->type = i64; break; - case BinaryConsts::I64ReinterpretF64: curr = allocator.alloc<Unary>(); curr->op = ReinterpretInt; curr->type = f64; break; - case BinaryConsts::I32ReinterpretF32: curr = allocator.alloc<Unary>(); curr->op = ReinterpretInt; curr->type = f32; break; + case BinaryConsts::I32ReinterpretF32: curr = allocator.alloc<Unary>(); curr->op = ReinterpretFloat; curr->type = i32; break; + case BinaryConsts::I64ReinterpretF64: curr = allocator.alloc<Unary>(); curr->op = ReinterpretFloat; curr->type = i64; break; + case BinaryConsts::F64ReinterpretI64: curr = allocator.alloc<Unary>(); curr->op = ReinterpretInt; curr->type = f64; break; + case BinaryConsts::F32ReinterpretI32: curr = allocator.alloc<Unary>(); curr->op = ReinterpretInt; curr->type = f32; break; default: return false; } |