aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-11-09 10:22:54 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-11-30 19:16:43 +0800
commitb8bba6622013a6c0969392a4096a3a7384b8cf62 (patch)
treeec6a385e75de8f701af6ed5b2b68bc038a11a06c /libevmasm
parent25160bfc26cd5ae4b5104625caba41c1533614ba (diff)
downloaddexon-solidity-b8bba6622013a6c0969392a4096a3a7384b8cf62.tar.gz
dexon-solidity-b8bba6622013a6c0969392a4096a3a7384b8cf62.tar.zst
dexon-solidity-b8bba6622013a6c0969392a4096a3a7384b8cf62.zip
Replace XOR/ISZERO with EQ
Diffstat (limited to 'libevmasm')
-rw-r--r--libevmasm/ExpressionClasses.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libevmasm/ExpressionClasses.cpp b/libevmasm/ExpressionClasses.cpp
index cb327252..29fb6dbc 100644
--- a/libevmasm/ExpressionClasses.cpp
+++ b/libevmasm/ExpressionClasses.cpp
@@ -288,6 +288,10 @@ Rules::Rules()
{Instruction::ISZERO, {{Instruction::ISZERO, {{Instruction::ISZERO, {X}}}}}},
[=]() -> Pattern { return {Instruction::ISZERO, {X}}; }
});
+ m_rules.push_back({
+ {Instruction::ISZERO, {{Instruction::XOR, {X, Y}}}},
+ [=]() -> Pattern { return { Instruction::EQ, {X, Y} }; }
+ });
// Associative operations
for (auto const& opFun: vector<pair<Instruction,function<u256(u256 const&,u256 const&)>>>{
{Instruction::ADD, plus<u256>()},