cranelift: Implement float rounding operations (#4397)
Implements the following operations on the interpreter: * `ceil` * `floor` * `nearest` * `trunc`
This commit is contained in:
@@ -728,10 +728,10 @@ where
|
||||
(a, b) if a.is_zero()? && b.is_zero()? => a,
|
||||
(a, b) => a.max(b)?,
|
||||
}),
|
||||
Opcode::Ceil => unimplemented!("Ceil"),
|
||||
Opcode::Floor => unimplemented!("Floor"),
|
||||
Opcode::Trunc => unimplemented!("Trunc"),
|
||||
Opcode::Nearest => unimplemented!("Nearest"),
|
||||
Opcode::Ceil => assign(Value::ceil(arg(0)?)?),
|
||||
Opcode::Floor => assign(Value::floor(arg(0)?)?),
|
||||
Opcode::Trunc => assign(Value::trunc(arg(0)?)?),
|
||||
Opcode::Nearest => assign(Value::nearest(arg(0)?)?),
|
||||
Opcode::IsNull => unimplemented!("IsNull"),
|
||||
Opcode::IsInvalid => unimplemented!("IsInvalid"),
|
||||
Opcode::Trueif => choose(
|
||||
|
||||
Reference in New Issue
Block a user