summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wasm-binary.h4
-rw-r--r--test/kitchen_sink.wast.fromBinary4
2 files changed, 4 insertions, 4 deletions
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();
}
}
diff --git a/test/kitchen_sink.wast.fromBinary b/test/kitchen_sink.wast.fromBinary
index 473161af7..cd58fdf65 100644
--- a/test/kitchen_sink.wast.fromBinary
+++ b/test/kitchen_sink.wast.fromBinary
@@ -401,7 +401,7 @@
(f32.demote/f64
(f64.const 10)
)
- (f64.reinterpret/i64
+ (f32.reinterpret/i32
(i32.const 10)
)
(f64.convert_s/i32
@@ -422,7 +422,7 @@
(f64.reinterpret/i64
(i64.const 100)
)
- (i64.reinterpret/f64
+ (i32.reinterpret/f32
(f32.const 10)
)
(i64.reinterpret/f64