mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Addmod and mulmod.
This commit is contained in:
@@ -637,6 +637,20 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
|
||||
m_context << eth::Instruction::BLOCKHASH;
|
||||
break;
|
||||
}
|
||||
case Location::AddMod:
|
||||
case Location::MulMod:
|
||||
{
|
||||
for (unsigned i = 0; i < 3; i ++)
|
||||
{
|
||||
arguments[2 - i]->accept(*this);
|
||||
utils().convertType(*arguments[2 - i]->annotation().type, IntegerType(256));
|
||||
}
|
||||
if (function.location() == Location::AddMod)
|
||||
m_context << eth::Instruction::ADDMOD;
|
||||
else
|
||||
m_context << eth::Instruction::MULMOD;
|
||||
break;
|
||||
}
|
||||
case Location::ECRecover:
|
||||
case Location::SHA256:
|
||||
case Location::RIPEMD160:
|
||||
|
||||
Reference in New Issue
Block a user