mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-28 16:11:32 +00:00
Canonicalize NANs produced by f.trunc and f.nearby.
This commit is contained in:
@ -3701,7 +3701,7 @@ impl<'ctx> FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator<'ct
|
||||
.try_as_basic_value()
|
||||
.left()
|
||||
.unwrap();
|
||||
state.push1_extra(res, i);
|
||||
state.push1_extra(res, i | ExtraInfo::pending_f32_nan());
|
||||
}
|
||||
Operator::F64Trunc => {
|
||||
let (v, i) = state.pop1_extra()?;
|
||||
@ -3714,7 +3714,7 @@ impl<'ctx> FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator<'ct
|
||||
.try_as_basic_value()
|
||||
.left()
|
||||
.unwrap();
|
||||
state.push1_extra(res, i);
|
||||
state.push1_extra(res, i | ExtraInfo::pending_f64_nan());
|
||||
}
|
||||
Operator::F32Nearest => {
|
||||
let (v, i) = state.pop1_extra()?;
|
||||
@ -3727,7 +3727,7 @@ impl<'ctx> FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator<'ct
|
||||
.try_as_basic_value()
|
||||
.left()
|
||||
.unwrap();
|
||||
state.push1_extra(res, i);
|
||||
state.push1_extra(res, i | ExtraInfo::pending_f32_nan());
|
||||
}
|
||||
Operator::F64Nearest => {
|
||||
let (v, i) = state.pop1_extra()?;
|
||||
@ -3740,7 +3740,7 @@ impl<'ctx> FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator<'ct
|
||||
.try_as_basic_value()
|
||||
.left()
|
||||
.unwrap();
|
||||
state.push1_extra(res, i);
|
||||
state.push1_extra(res, i | ExtraInfo::pending_f64_nan());
|
||||
}
|
||||
Operator::F32Abs => {
|
||||
let (v, i) = state.pop1_extra()?;
|
||||
|
Reference in New Issue
Block a user