Handle use of SIMD vector globals and locals

This commit is contained in:
Andrew Brown
2019-09-06 11:43:11 -07:00
parent 7e6913e362
commit 6cbc6e8bfb
3 changed files with 10 additions and 1 deletions

View File

@@ -179,6 +179,10 @@ fn declare_locals<FE: FuncEnvironment + ?Sized>(
I64 => builder.ins().iconst(ir::types::I64, 0),
F32 => builder.ins().f32const(ir::immediates::Ieee32::with_bits(0)),
F64 => builder.ins().f64const(ir::immediates::Ieee64::with_bits(0)),
V128 => {
let constant_handle = builder.func.dfg.constants.insert([0; 16].to_vec());
builder.ins().vconst(ir::types::I8X16, constant_handle)
}
AnyRef => builder.ins().null(environ.reference_type()),
ty => wasm_unsupported!("unsupported local type {:?}", ty),
};