Fix support for floating point numbers

This commit is contained in:
Lachlan Sneff
2019-01-09 20:32:02 -05:00
parent e72aeddc60
commit 985e2b2f42
37 changed files with 19670 additions and 19755 deletions

View File

@ -142,8 +142,8 @@ pub mod converter {
let init = match global.initializer {
I32Const(val) => Const(val.into()),
I64Const(val) => Const(val.into()),
F32Const(val) => Const((val as f32).into()),
F64Const(val) => Const((val as f64).into()),
F32Const(val) => Const(f32::from_bits(val).into()),
F64Const(val) => Const(f64::from_bits(val).into()),
GlobalInit::GetGlobal(index) => {
WasmerInitializer::GetGlobal(WasmerGlobalIndex::new(index.index()))
}
@ -612,7 +612,6 @@ impl<'environment> FuncEnvironmentTrait for FuncEnvironment<'environment> {
.ins()
.call_indirect(sig_ref, imported_func_addr, &args[..]))
} else {
println!("translate_call: {:?}", callee_index);
// this is an internal function
let vmctx = pos
.func