diff options
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index de4747d84..440689ea0 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -851,7 +851,7 @@ assert(0); void visitBinary(Binary *curr) { if (debug) std::cerr << "zz node: Binary" << std::endl; #define TYPED_CODE(code) { \ - switch (curr->left->type) { \ + switch (getReachableWasmType(curr->left->type, curr->right->type)) { \ case i32: o << int8_t(BinaryConsts::I32##code); break; \ case i64: o << int8_t(BinaryConsts::I64##code); break; \ case f32: o << int8_t(BinaryConsts::F32##code); break; \ @@ -861,7 +861,7 @@ assert(0); break; \ } #define INT_TYPED_CODE(code) { \ - switch (curr->left->type) { \ + switch (getReachableWasmType(curr->left->type, curr->right->type)) { \ case i32: o << int8_t(BinaryConsts::I32##code); break; \ case i64: o << int8_t(BinaryConsts::I64##code); break; \ default: abort(); \ @@ -869,7 +869,7 @@ assert(0); break; \ } #define FLOAT_TYPED_CODE(code) { \ - switch (curr->left->type) { \ + switch (getReachableWasmType(curr->left->type, curr->right->type)) { \ case f32: o << int8_t(BinaryConsts::F32##code); break; \ case f64: o << int8_t(BinaryConsts::F64##code); break; \ default: abort(); \ |