aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/Instruction.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-07 06:14:17 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-02-27 19:03:18 +0800
commit59e6ea601b90577e39fe22a4c504f09e862dc40e (patch)
tree2635157b8eb07e02c768b9c113cff6e9d8badbc7 /libevmasm/Instruction.cpp
parent9c31a0d8f584f245ce368dc57ee760fe752f3ca6 (diff)
downloaddexon-solidity-59e6ea601b90577e39fe22a4c504f09e862dc40e.tar.gz
dexon-solidity-59e6ea601b90577e39fe22a4c504f09e862dc40e.tar.zst
dexon-solidity-59e6ea601b90577e39fe22a4c504f09e862dc40e.zip
Add bitwise shift operators to libevmasm (EIP145)
Diffstat (limited to 'libevmasm/Instruction.cpp')
-rw-r--r--libevmasm/Instruction.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libevmasm/Instruction.cpp b/libevmasm/Instruction.cpp
index b38981d2..c25c9653 100644
--- a/libevmasm/Instruction.cpp
+++ b/libevmasm/Instruction.cpp
@@ -50,6 +50,11 @@ const std::map<std::string, Instruction> dev::solidity::c_instructions =
{ "OR", Instruction::OR },
{ "XOR", Instruction::XOR },
{ "BYTE", Instruction::BYTE },
+ { "SHL", Instruction::SHL },
+ { "SHR", Instruction::SHR },
+ { "SAR", Instruction::SAR },
+ { "ROL", Instruction::ROL },
+ { "ROR", Instruction::ROR },
{ "ADDMOD", Instruction::ADDMOD },
{ "MULMOD", Instruction::MULMOD },
{ "SIGNEXTEND", Instruction::SIGNEXTEND },
@@ -190,6 +195,11 @@ static const std::map<Instruction, InstructionInfo> c_instructionInfo =
{ Instruction::OR, { "OR", 0, 2, 1, false, Tier::VeryLow } },
{ Instruction::XOR, { "XOR", 0, 2, 1, false, Tier::VeryLow } },
{ Instruction::BYTE, { "BYTE", 0, 2, 1, false, Tier::VeryLow } },
+ { Instruction::SHL, { "SHL", 0, 2, 1, false, Tier::VeryLow } },
+ { Instruction::SHR, { "SHR", 0, 2, 1, false, Tier::VeryLow } },
+ { Instruction::SAR, { "SAR", 0, 2, 1, false, Tier::VeryLow } },
+ { Instruction::ROL, { "ROL", 0, 2, 1, false, Tier::VeryLow } },
+ { Instruction::ROR, { "ROR", 0, 2, 1, false, Tier::VeryLow } },
{ Instruction::ADDMOD, { "ADDMOD", 0, 3, 1, false, Tier::Mid } },
{ Instruction::MULMOD, { "MULMOD", 0, 3, 1, false, Tier::Mid } },
{ Instruction::SIGNEXTEND, { "SIGNEXTEND", 0, 2, 1, false, Tier::Low } },