From 7bb0dd56a67feb66b92d33e1d5aba956c60a2f08 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Sun, 9 Jul 2017 08:42:54 +0100 Subject: [PATCH] Remove ROL/ROR as they are not part of EIP145 anymore --- docs/assembly.rst | 4 ---- libevmasm/Instruction.cpp | 4 ---- libevmasm/Instruction.h | 2 -- libsolidity/inlineasm/AsmAnalysis.cpp | 4 +--- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/docs/assembly.rst b/docs/assembly.rst index 81c0f72864c8..3ed4a1df22f4 100644 --- a/docs/assembly.rst +++ b/docs/assembly.rst @@ -181,10 +181,6 @@ In the grammar, opcodes are represented as pre-defined identifiers. +-------------------------+------+-----------------------------------------------------------------+ | sar(x, y) | | arithmetic shift right x by y | +-------------------------+------+-----------------------------------------------------------------+ -| ror(x, y) | | rotate right x by y | -+-------------------------+------+-----------------------------------------------------------------+ -| rol(x, y) | | rotate left x by y | -+-------------------------+------+-----------------------------------------------------------------+ | addmod(x, y, m) | | (x + y) % m with arbitrary precision arithmetics | +-------------------------+------+-----------------------------------------------------------------+ | mulmod(x, y, m) | | (x * y) % m with arbitrary precision arithmetics | diff --git a/libevmasm/Instruction.cpp b/libevmasm/Instruction.cpp index c25c9653591c..a677a631cf61 100644 --- a/libevmasm/Instruction.cpp +++ b/libevmasm/Instruction.cpp @@ -53,8 +53,6 @@ const std::map 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 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 ca224d1dcc33..7025cd814ece 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 e6dfcfe3c3e7..de489fea3bab 100644 --- a/libsolidity/inlineasm/AsmAnalysis.cpp +++ b/libsolidity/inlineasm/AsmAnalysis.cpp @@ -489,9 +489,7 @@ void AsmAnalyzer::warnOnInstructions(solidity::Instruction _instr, SourceLocatio static set 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(