cranelift: Add SIMD icmp comparisons to interpreter
This commit is contained in:
@@ -252,6 +252,16 @@ impl Value for DataValue {
|
||||
(DataValue::I64(n), types::I64) => DataValue::I64(n),
|
||||
(DataValue::I64(n), types::I128) => DataValue::I128(n as i128),
|
||||
(DataValue::B(b), t) if t.is_bool() => DataValue::B(b),
|
||||
(DataValue::B(b), t) if t.is_int() => {
|
||||
let val = if b {
|
||||
// Bools are represented in memory as all 1's
|
||||
(1i128 << t.bits()) - 1
|
||||
} else {
|
||||
0
|
||||
};
|
||||
DataValue::int(val, t)?
|
||||
}
|
||||
(dv, t) if t.is_int() && dv.ty() == t => dv,
|
||||
(dv, _) => unimplemented!("conversion: {} -> {:?}", dv.ty(), kind),
|
||||
},
|
||||
ValueConversionKind::Truncate(ty) => {
|
||||
|
||||
Reference in New Issue
Block a user