Implement signed multiplication for sol->yul code generation.

This commit is contained in:
Daniel Kirchner
2019-06-20 12:30:30 +02:00
committed by chriseth
parent e4c884ae13
commit a5b9f634ef
5 changed files with 84 additions and 23 deletions
@@ -1136,8 +1136,7 @@ string IRGeneratorForStatements::binaryOperation(
fun = m_utils.overflowCheckedIntSubFunction(*type);
break;
case Token::Mul:
if (!type->isSigned())
fun = m_utils.overflowCheckedUIntMulFunction(type->numBits());
fun = m_utils.overflowCheckedIntMulFunction(*type);
break;
case Token::Div:
fun = m_utils.overflowCheckedIntDivFunction(*type);