aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-07-09 15:42:54 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-02-27 20:42:41 +0800
commitafa4a48e3770630a744ef98ccd518601e1f35c86 (patch)
treefdcf6a0b114a6630f8527992a1ff07ab85e593ed
parent468d0f6199e71f0c7f4b8bd667c8f31feba41a9d (diff)
downloaddexon-solidity-afa4a48e3770630a744ef98ccd518601e1f35c86.tar.gz
dexon-solidity-afa4a48e3770630a744ef98ccd518601e1f35c86.tar.zst
dexon-solidity-afa4a48e3770630a744ef98ccd518601e1f35c86.zip
Remove ROL/ROR as they are not part of EIP145 anymore
-rw-r--r--docs/assembly.rst4
-rw-r--r--libevmasm/Instruction.cpp4
-rw-r--r--libevmasm/Instruction.h2
-rw-r--r--libsolidity/inlineasm/AsmAnalysis.cpp4
4 files changed, 1 insertions, 13 deletions
diff --git a/docs/assembly.rst b/docs/assembly.rst
index 245b5383..9eabc99e 100644
--- a/docs/assembly.rst
+++ b/docs/assembly.rst
@@ -212,10 +212,6 @@ In the grammar, opcodes are represented as pre-defined identifiers.
+-------------------------+-----+---+-----------------------------------------------------------------+
| sar(x, y) | | C | arithmetic shift right x by y bits |
+-------------------------+-----+---+-----------------------------------------------------------------+
-| ror(x, y) | | C | rotate right x by y bits |
-+-------------------------+-----+---+-----------------------------------------------------------------+
-| rol(x, y) | | C | rotate left x by y bits |
-+-------------------------+-----+---+-----------------------------------------------------------------+
| addmod(x, y, m) | | F | (x + y) % m with arbitrary precision arithmetics |
+-------------------------+-----+---+-----------------------------------------------------------------+
| mulmod(x, y, m) | | F | (x * y) % m with arbitrary precision arithmetics |
diff --git a/libevmasm/Instruction.cpp b/libevmasm/Instruction.cpp
index c25c9653..a677a631 100644
--- a/libevmasm/Instruction.cpp
+++ b/libevmasm/Instruction.cpp
@@ -53,8 +53,6 @@ const std::map<std::string, Instruction> dev::solidity::c_instructions =
{ "SHL", Instruction::SHL },
{ "SHR", Instruction::SHR },
{ "SAR", Instruction::SAR },
- { "ROL", Instruction::ROL },
- { "ROR", Instruction::ROR },
{ "ADDMOD", Instruction::ADDMOD },
{ "MULMOD", Instruction::MULMOD },
{ "SIGNEXTEND", Instruction::SIGNEXTEND },
@@ -198,8 +196,6 @@ static const std::map<Instruction, InstructionInfo> c_instructionInfo =
{ 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 } },
diff --git a/libevmasm/Instruction.h b/libevmasm/Instruction.h
index e56d4c9a..be788ddb 100644
--- a/libevmasm/Instruction.h
+++ b/libevmasm/Instruction.h
@@ -64,8 +64,6 @@ enum class Instruction: uint8_t
SHL, ///< bitwise SHL operation
SHR, ///< bitwise SHR operation
SAR, ///< bitwise SAR operation
- ROL, ///< bitwise ROL operation
- ROR, ///< bitwise ROR operation
KECCAK256 = 0x20, ///< compute KECCAK-256 hash
diff --git a/libsolidity/inlineasm/AsmAnalysis.cpp b/libsolidity/inlineasm/AsmAnalysis.cpp
index 7653ee51..1030523a 100644
--- a/libsolidity/inlineasm/AsmAnalysis.cpp
+++ b/libsolidity/inlineasm/AsmAnalysis.cpp
@@ -551,9 +551,7 @@ void AsmAnalyzer::warnOnInstructions(solidity::Instruction _instr, SourceLocatio
static set<solidity::Instruction> experimentalInstructions{
solidity::Instruction::SHL,
solidity::Instruction::SHR,
- solidity::Instruction::SAR,
- solidity::Instruction::ROL,
- solidity::Instruction::ROR
+ solidity::Instruction::SAR
};
if (experimentalInstructions.count(_instr))
m_errorReporter.warning(