[Sol - Yul] Implement checked multiplication.

This commit is contained in:
Daniel Kirchner
2019-05-20 17:36:53 +02:00
parent e08f521b7e
commit b6f4d4e9bc
4 changed files with 69 additions and 0 deletions
@@ -304,6 +304,8 @@ bool IRGeneratorForStatements::visit(BinaryOperation const& _binOp)
fun = m_utils.overflowCheckedUIntAddFunction(type->numBits());
else if (_binOp.getOperator() == Token::Sub)
fun = m_utils.overflowCheckedUIntSubFunction();
else if (_binOp.getOperator() == Token::Mul)
fun = m_utils.overflowCheckedUIntMulFunction(type->numBits());
else
solUnimplementedAssert(false, "");
defineExpression(_binOp) << fun << "(" << left << ", " << right << ")\n";