cranelift: Implement sqrt in interpreter (#4362)

This ignores SIMD for now.
This commit is contained in:
Afonso Bordado
2022-07-01 17:39:11 +01:00
committed by GitHub
parent 38ecd3744f
commit f2e6ff5e70
4 changed files with 115 additions and 1 deletions

View File

@@ -678,7 +678,7 @@ where
Opcode::Fsub => binary(Value::sub, arg(0)?, arg(1)?)?,
Opcode::Fmul => binary(Value::mul, arg(0)?, arg(1)?)?,
Opcode::Fdiv => binary(Value::div, arg(0)?, arg(1)?)?,
Opcode::Sqrt => unimplemented!("Sqrt"),
Opcode::Sqrt => assign(Value::sqrt(arg(0)?)?),
Opcode::Fma => unimplemented!("Fma"),
Opcode::Fneg => binary(Value::sub, Value::float(0, ctrl_ty)?, arg(0)?)?,
Opcode::Fabs => unimplemented!("Fabs"),