support SIMD fuzzing in reference interpreter (#3980)
* support SIMD fuzzing in reference interpreter * formatting
This commit is contained in:
@@ -59,6 +59,7 @@ mod ocaml_bindings {
|
||||
Value::I64(i: OCamlInt64),
|
||||
Value::F32(i: OCamlInt32),
|
||||
Value::F64(i: OCamlInt64),
|
||||
Value::V128(i: OCamlBytes),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,4 +104,21 @@ mod tests {
|
||||
Err("Error(_, \"(Isabelle) trap: load\")".to_string())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn simd_not() {
|
||||
let module = wat::parse_file("tests/simd_not.wat").unwrap();
|
||||
|
||||
let parameters = Some(vec![Value::V128(vec![
|
||||
0, 255, 0, 0, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0,
|
||||
])]);
|
||||
let results = interpret(&module, parameters.clone()).unwrap();
|
||||
|
||||
assert_eq!(
|
||||
results,
|
||||
vec![Value::V128(vec![
|
||||
255, 0, 255, 255, 0, 255, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255
|
||||
])]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user