Switch DataValue to use Ieee32/Ieee64
As discussed in #2251, in order to be very confident that NaN signaling bits are correctly handled by the compiler, this switches `DataValue` to use Cranelift's `Ieee32` and `Ieee64` structures. This makes it a bit more inconvenient to interpreter Cranelift FP operations but this should change to something like `rustc_apfloat` in the future.
This commit is contained in:
@@ -2700,8 +2700,8 @@ impl<'a> Parser<'a> {
|
||||
I16 => DataValue::from(self.match_imm16("expected an i16")?),
|
||||
I32 => DataValue::from(self.match_imm32("expected an i32")?),
|
||||
I64 => DataValue::from(Into::<i64>::into(self.match_imm64("expected an i64")?)),
|
||||
F32 => DataValue::from(f32::from_bits(self.match_ieee32("expected an f32")?.bits())),
|
||||
F64 => DataValue::from(f64::from_bits(self.match_ieee64("expected an f64")?.bits())),
|
||||
F32 => DataValue::from(self.match_ieee32("expected an f32")?),
|
||||
F64 => DataValue::from(self.match_ieee64("expected an f64")?),
|
||||
_ if ty.is_vector() => {
|
||||
let as_vec = self.match_uimm128(ty)?.into_vec();
|
||||
if as_vec.len() == 16 {
|
||||
|
||||
Reference in New Issue
Block a user