Add V128 type

This commit is contained in:
Andrew Brown
2019-08-14 10:12:38 -07:00
committed by Dan Gohman
parent 290b51a5f6
commit 5bd422b429
5 changed files with 31 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ fn into_valtype(ty: &wasmparser::Type) -> ValType {
I64 => ValType::I64,
F32 => ValType::F32,
F64 => ValType::F64,
V128 => ValType::V128,
AnyFunc => ValType::FuncRef,
AnyRef => ValType::AnyRef,
_ => unimplemented!("types in into_valtype"),

View File

@@ -45,6 +45,7 @@ pub enum ValType {
I64,
F32,
F64,
V128,
AnyRef, /* = 128 */
FuncRef,
}
@@ -70,6 +71,7 @@ impl ValType {
ValType::I64 => ir::types::I64,
ValType::F32 => ir::types::F32,
ValType::F64 => ir::types::F64,
ValType::V128 => ir::types::I8X16,
_ => unimplemented!("get_cranelift_type other"),
}
}
@@ -80,6 +82,7 @@ impl ValType {
ir::types::I64 => ValType::I64,
ir::types::F32 => ValType::F32,
ir::types::F64 => ValType::F64,
ir::types::I8X16 => ValType::V128,
_ => unimplemented!("from_cranelift_type other"),
}
}