diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-11-07 16:47:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-07 16:47:47 -0800 |
commit | 3dac399ba503e05ee014e96a7ce9c82f29f6981c (patch) | |
tree | b00c60f1ca8019da8283c4f38660dd4d46d82d87 /src | |
parent | 89d393ed02f6b15a3a8dc60b489f969184070625 (diff) | |
download | binaryen-3dac399ba503e05ee014e96a7ce9c82f29f6981c.tar.gz binaryen-3dac399ba503e05ee014e96a7ce9c82f29f6981c.tar.bz2 binaryen-3dac399ba503e05ee014e96a7ce9c82f29f6981c.zip |
support assigns of f32 to HEAP64 in asm2wasm (#830)
Diffstat (limited to 'src')
-rw-r--r-- | src/asm2wasm.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 8c8e5855a..6455fbf08 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -1228,8 +1228,14 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { conv->value = ret->value; conv->type = WasmType::f32; ret->value = conv; + } else if (ret->valueType == f64 && ret->value->type == f32) { + auto conv = allocator.alloc<Unary>(); + conv->op = PromoteFloat32; + conv->value = ret->value; + conv->type = WasmType::f64; + ret->value = conv; } else { - abort_on("bad subtract types", ast); + abort_on("bad sub[] types", ast); } } return ret; |