cranelift: Add basic i128 support in interpreter

This commit is contained in:
Afonso Bordado
2021-07-23 12:15:00 +01:00
committed by Andrew Brown
parent 084383f60a
commit a2fb019ba7
7 changed files with 95 additions and 35 deletions

View File

@@ -56,14 +56,14 @@ where
.params
.iter()
.map(|p| {
let imm64 = match p.value_type {
I8 => self.u.arbitrary::<i8>()? as i64,
I16 => self.u.arbitrary::<i16>()? as i64,
I32 => self.u.arbitrary::<i32>()? as i64,
I64 => self.u.arbitrary::<i64>()?,
let imm = match p.value_type {
I8 => self.u.arbitrary::<i8>()? as i128,
I16 => self.u.arbitrary::<i16>()? as i128,
I32 => self.u.arbitrary::<i32>()? as i128,
I64 => self.u.arbitrary::<i64>()? as i128,
_ => unreachable!(),
};
Ok(DataValue::from_integer(imm64, p.value_type)?)
Ok(DataValue::from_integer(imm, p.value_type)?)
})
.collect::<Result<TestCaseInput>>()?;