From c2b3d8bcd28a3047a832cf813df14a97a5b01daa Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 26 Jan 2017 15:57:49 +0100 Subject: [PATCH] Change code for INVALID opcode to 0xfe. --- libevmasm/Instruction.cpp | 4 ++-- libevmasm/Instruction.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libevmasm/Instruction.cpp b/libevmasm/Instruction.cpp index ea5b5a108..b0f063dae 100644 --- a/libevmasm/Instruction.cpp +++ b/libevmasm/Instruction.cpp @@ -154,12 +154,12 @@ const std::map dev::solidity::c_instructions = { "LOG2", Instruction::LOG2 }, { "LOG3", Instruction::LOG3 }, { "LOG4", Instruction::LOG4 }, - { "INVALID", Instruction::INVALID }, { "CREATE", Instruction::CREATE }, { "CALL", Instruction::CALL }, { "CALLCODE", Instruction::CALLCODE }, { "RETURN", Instruction::RETURN }, { "DELEGATECALL", Instruction::DELEGATECALL }, + { "INVALID", Instruction::INVALID }, { "SUICIDE", Instruction::SUICIDE } }; @@ -289,12 +289,12 @@ static const std::map c_instructionInfo = { Instruction::LOG2, { "LOG2", 0, 4, 0, true, Tier::Special } }, { Instruction::LOG3, { "LOG3", 0, 5, 0, true, Tier::Special } }, { Instruction::LOG4, { "LOG4", 0, 6, 0, true, Tier::Special } }, - { Instruction::INVALID, { "INVALID", 0, 0, 0, true, Tier::Zero } }, { Instruction::CREATE, { "CREATE", 0, 3, 1, true, Tier::Special } }, { Instruction::CALL, { "CALL", 0, 7, 1, true, Tier::Special } }, { Instruction::CALLCODE, { "CALLCODE", 0, 7, 1, true, Tier::Special } }, { Instruction::RETURN, { "RETURN", 0, 2, 0, true, Tier::Zero } }, { Instruction::DELEGATECALL,{ "DELEGATECALL", 0, 6, 1, true, Tier::Special } }, + { Instruction::INVALID, { "INVALID", 0, 0, 0, true, Tier::Zero } }, { Instruction::SUICIDE, { "SUICIDE", 0, 1, 0, true, Tier::Zero } } }; diff --git a/libevmasm/Instruction.h b/libevmasm/Instruction.h index 7432f04d9..a8a72234d 100644 --- a/libevmasm/Instruction.h +++ b/libevmasm/Instruction.h @@ -171,13 +171,13 @@ enum class Instruction: uint8_t LOG3, ///< Makes a log entry; 3 topics. LOG4, ///< Makes a log entry; 4 topics. - INVALID = 0xef, ///< invalid instruction for expressing runtime errors (e.g., division-by-zero) - CREATE = 0xf0, ///< create a new account with associated code CALL, ///< message-call into an account CALLCODE, ///< message-call with another account's code only RETURN, ///< halt execution returning output data DELEGATECALL, ///< like CALLCODE but keeps caller's value and sender + + INVALID = 0xfe, ///< invalid instruction for expressing runtime errors (e.g., division-by-zero) SUICIDE = 0xff ///< halt execution and register account for later deletion };