Ethereum  PoC-8
The C++ Implementation of Ethereum
Instruction.cpp
Go to the documentation of this file.
1 /*
2  This file is part of cpp-ethereum.
3 
4  cpp-ethereum is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  cpp-ethereum is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #include "Instruction.h"
19 #include <map>
20 
21 namespace dev
22 {
23 namespace eth
24 {
25 
26 static const std::map<Instruction, InstructionInfo> c_instructionInfo =
27 { // Args, Ret, GasPriceTier
28  { Instruction::STOP, { "STOP", 0, 0, Tier::Zero } },
29  { Instruction::ADD, { "ADD", 2, 1, Tier::VeryLow } },
30  { Instruction::SUB, { "SUB", 2, 1, Tier::VeryLow } },
31  { Instruction::MUL, { "MUL", 2, 1, Tier::Low } },
32  { Instruction::DIV, { "DIV", 2, 1, Tier::Low } },
33  { Instruction::SDIV, { "SDIV", 2, 1, Tier::Low } },
34  { Instruction::MOD, { "MOD", 2, 1, Tier::Low } },
35  { Instruction::SMOD, { "SMOD", 2, 1, Tier::Low } },
36  { Instruction::EXP, { "EXP", 2, 1, Tier::Special } },
37  { Instruction::NOT, { "NOT", 1, 1, Tier::VeryLow } },
38  { Instruction::LT, { "LT", 2, 1, Tier::VeryLow } },
39  { Instruction::GT, { "GT", 2, 1, Tier::VeryLow } },
40  { Instruction::SLT, { "SLT", 2, 1, Tier::VeryLow } },
41  { Instruction::SGT, { "SGT", 2, 1, Tier::VeryLow } },
42  { Instruction::EQ, { "EQ", 2, 1, Tier::VeryLow } },
43  { Instruction::ISZERO, { "ISZERO", 1, 1, Tier::VeryLow } },
44  { Instruction::AND, { "AND", 2, 1, Tier::VeryLow } },
45  { Instruction::OR, { "OR", 2, 1, Tier::VeryLow } },
46  { Instruction::XOR, { "XOR", 2, 1, Tier::VeryLow } },
47  { Instruction::BYTE, { "BYTE", 2, 1, Tier::VeryLow } },
48  { Instruction::SHL, { "SHL", 2, 1, Tier::VeryLow } },
49  { Instruction::SHR, { "SHR", 2, 1, Tier::VeryLow } },
50  { Instruction::SAR, { "SAR", 2, 1, Tier::VeryLow } },
51  { Instruction::ADDMOD, { "ADDMOD", 3, 1, Tier::Mid } },
52  { Instruction::MULMOD, { "MULMOD", 3, 1, Tier::Mid } },
53  { Instruction::SIGNEXTEND, { "SIGNEXTEND", 2, 1, Tier::Low } },
54  { Instruction::SHA3, { "SHA3", 2, 1, Tier::Special } },
55  { Instruction::ADDRESS, { "ADDRESS", 0, 1, Tier::Base } },
56  { Instruction::BALANCE, { "BALANCE", 1, 1, Tier::Special } },
57  { Instruction::ORIGIN, { "ORIGIN", 0, 1, Tier::Base } },
58  { Instruction::CALLER, { "CALLER", 0, 1, Tier::Base } },
59  { Instruction::CALLVALUE, { "CALLVALUE", 0, 1, Tier::Base } },
60  { Instruction::CALLDATALOAD, { "CALLDATALOAD", 1, 1, Tier::VeryLow } },
61  { Instruction::CALLDATASIZE, { "CALLDATASIZE", 0, 1, Tier::Base } },
62  { Instruction::CALLDATACOPY, { "CALLDATACOPY", 3, 0, Tier::VeryLow } },
63  { Instruction::CODESIZE, { "CODESIZE", 0, 1, Tier::Base } },
64  { Instruction::CODECOPY, { "CODECOPY", 3, 0, Tier::VeryLow } },
65  { Instruction::GASPRICE, { "GASPRICE", 0, 1, Tier::Base } },
66  { Instruction::EXTCODESIZE, { "EXTCODESIZE", 1, 1, Tier::Special } },
67  { Instruction::EXTCODECOPY, { "EXTCODECOPY", 4, 0, Tier::Special } },
68  { Instruction::RETURNDATASIZE,{"RETURNDATASIZE", 0, 1, Tier::Base } },
69  { Instruction::RETURNDATACOPY,{"RETURNDATACOPY", 3, 0, Tier::VeryLow } },
70  { Instruction::EXTCODEHASH, { "EXTCODEHASH", 1, 1, Tier::Special }},
71  { Instruction::BLOCKHASH, { "BLOCKHASH", 1, 1, Tier::Special } },
72  { Instruction::COINBASE, { "COINBASE", 0, 1, Tier::Base } },
73  { Instruction::TIMESTAMP, { "TIMESTAMP", 0, 1, Tier::Base } },
74  { Instruction::NUMBER, { "NUMBER", 0, 1, Tier::Base } },
75  { Instruction::DIFFICULTY, { "DIFFICULTY", 0, 1, Tier::Base } },
76  { Instruction::GASLIMIT, { "GASLIMIT", 0, 1, Tier::Base } },
77  { Instruction::POP, { "POP", 1, 0, Tier::Base } },
78  { Instruction::MLOAD, { "MLOAD", 1, 1, Tier::VeryLow } },
79  { Instruction::MSTORE, { "MSTORE", 2, 0, Tier::VeryLow } },
80  { Instruction::MSTORE8, { "MSTORE8", 2, 0, Tier::VeryLow } },
81  { Instruction::SLOAD, { "SLOAD", 1, 1, Tier::Special } },
82  { Instruction::SSTORE, { "SSTORE", 2, 0, Tier::Special } },
83  { Instruction::JUMP, { "JUMP", 1, 0, Tier::Mid } },
84  { Instruction::JUMPI, { "JUMPI", 2, 0, Tier::High } },
85  { Instruction::PC, { "PC", 0, 1, Tier::Base } },
86  { Instruction::MSIZE, { "MSIZE", 0, 1, Tier::Base } },
87  { Instruction::GAS, { "GAS", 0, 1, Tier::Base } },
88  { Instruction::JUMPDEST, { "JUMPDEST", 0, 0, Tier::Special } },
89  { Instruction::PUSH1, { "PUSH1", 0, 1, Tier::VeryLow } },
90  { Instruction::PUSH2, { "PUSH2", 0, 1, Tier::VeryLow } },
91  { Instruction::PUSH3, { "PUSH3", 0, 1, Tier::VeryLow } },
92  { Instruction::PUSH4, { "PUSH4", 0, 1, Tier::VeryLow } },
93  { Instruction::PUSH5, { "PUSH5", 0, 1, Tier::VeryLow } },
94  { Instruction::PUSH6, { "PUSH6", 0, 1, Tier::VeryLow } },
95  { Instruction::PUSH7, { "PUSH7", 0, 1, Tier::VeryLow } },
96  { Instruction::PUSH8, { "PUSH8", 0, 1, Tier::VeryLow } },
97  { Instruction::PUSH9, { "PUSH9", 0, 1, Tier::VeryLow } },
98  { Instruction::PUSH10, { "PUSH10", 0, 1, Tier::VeryLow } },
99  { Instruction::PUSH11, { "PUSH11", 0, 1, Tier::VeryLow } },
100  { Instruction::PUSH12, { "PUSH12", 0, 1, Tier::VeryLow } },
101  { Instruction::PUSH13, { "PUSH13", 0, 1, Tier::VeryLow } },
102  { Instruction::PUSH14, { "PUSH14", 0, 1, Tier::VeryLow } },
103  { Instruction::PUSH15, { "PUSH15", 0, 1, Tier::VeryLow } },
104  { Instruction::PUSH16, { "PUSH16", 0, 1, Tier::VeryLow } },
105  { Instruction::PUSH17, { "PUSH17", 0, 1, Tier::VeryLow } },
106  { Instruction::PUSH18, { "PUSH18", 0, 1, Tier::VeryLow } },
107  { Instruction::PUSH19, { "PUSH19", 0, 1, Tier::VeryLow } },
108  { Instruction::PUSH20, { "PUSH20", 0, 1, Tier::VeryLow } },
109  { Instruction::PUSH21, { "PUSH21", 0, 1, Tier::VeryLow } },
110  { Instruction::PUSH22, { "PUSH22", 0, 1, Tier::VeryLow } },
111  { Instruction::PUSH23, { "PUSH23", 0, 1, Tier::VeryLow } },
112  { Instruction::PUSH24, { "PUSH24", 0, 1, Tier::VeryLow } },
113  { Instruction::PUSH25, { "PUSH25", 0, 1, Tier::VeryLow } },
114  { Instruction::PUSH26, { "PUSH26", 0, 1, Tier::VeryLow } },
115  { Instruction::PUSH27, { "PUSH27", 0, 1, Tier::VeryLow } },
116  { Instruction::PUSH28, { "PUSH28", 0, 1, Tier::VeryLow } },
117  { Instruction::PUSH29, { "PUSH29", 0, 1, Tier::VeryLow } },
118  { Instruction::PUSH30, { "PUSH30", 0, 1, Tier::VeryLow } },
119  { Instruction::PUSH31, { "PUSH31", 0, 1, Tier::VeryLow } },
120  { Instruction::PUSH32, { "PUSH32", 0, 1, Tier::VeryLow } },
121  { Instruction::DUP1, { "DUP1", 1, 2, Tier::VeryLow } },
122  { Instruction::DUP2, { "DUP2", 2, 3, Tier::VeryLow } },
123  { Instruction::DUP3, { "DUP3", 3, 4, Tier::VeryLow } },
124  { Instruction::DUP4, { "DUP4", 4, 5, Tier::VeryLow } },
125  { Instruction::DUP5, { "DUP5", 5, 6, Tier::VeryLow } },
126  { Instruction::DUP6, { "DUP6", 6, 7, Tier::VeryLow } },
127  { Instruction::DUP7, { "DUP7", 7, 8, Tier::VeryLow } },
128  { Instruction::DUP8, { "DUP8", 8, 9, Tier::VeryLow } },
129  { Instruction::DUP9, { "DUP9", 9, 10, Tier::VeryLow } },
130  { Instruction::DUP10, { "DUP10", 10, 11, Tier::VeryLow } },
131  { Instruction::DUP11, { "DUP11", 11, 12, Tier::VeryLow } },
132  { Instruction::DUP12, { "DUP12", 12, 13, Tier::VeryLow } },
133  { Instruction::DUP13, { "DUP13", 13, 14, Tier::VeryLow } },
134  { Instruction::DUP14, { "DUP14", 14, 15, Tier::VeryLow } },
135  { Instruction::DUP15, { "DUP15", 15, 16, Tier::VeryLow } },
136  { Instruction::DUP16, { "DUP16", 16, 17, Tier::VeryLow } },
137  { Instruction::SWAP1, { "SWAP1", 2, 2, Tier::VeryLow } },
138  { Instruction::SWAP2, { "SWAP2", 3, 3, Tier::VeryLow } },
139  { Instruction::SWAP3, { "SWAP3", 4, 4, Tier::VeryLow } },
140  { Instruction::SWAP4, { "SWAP4", 5, 5, Tier::VeryLow } },
141  { Instruction::SWAP5, { "SWAP5", 6, 6, Tier::VeryLow } },
142  { Instruction::SWAP6, { "SWAP6", 7, 7, Tier::VeryLow } },
143  { Instruction::SWAP7, { "SWAP7", 8, 8, Tier::VeryLow } },
144  { Instruction::SWAP8, { "SWAP8", 9, 9, Tier::VeryLow } },
145  { Instruction::SWAP9, { "SWAP9", 10, 10, Tier::VeryLow } },
146  { Instruction::SWAP10, { "SWAP10", 11, 11, Tier::VeryLow } },
147  { Instruction::SWAP11, { "SWAP11", 12, 12, Tier::VeryLow } },
148  { Instruction::SWAP12, { "SWAP12", 13, 13, Tier::VeryLow } },
149  { Instruction::SWAP13, { "SWAP13", 14, 14, Tier::VeryLow } },
150  { Instruction::SWAP14, { "SWAP14", 15, 15, Tier::VeryLow } },
151  { Instruction::SWAP15, { "SWAP15", 16, 16, Tier::VeryLow } },
152  { Instruction::SWAP16, { "SWAP16", 17, 17, Tier::VeryLow } },
153  { Instruction::LOG0, { "LOG0", 2, 0, Tier::Special } },
154  { Instruction::LOG1, { "LOG1", 3, 0, Tier::Special } },
155  { Instruction::LOG2, { "LOG2", 4, 0, Tier::Special } },
156  { Instruction::LOG3, { "LOG3", 5, 0, Tier::Special } },
157  { Instruction::LOG4, { "LOG4", 6, 0, Tier::Special } },
158 
159  { Instruction::JUMPTO, { "JUMPTO", 1, 0, Tier::VeryLow } },
160  { Instruction::JUMPIF, { "JUMPIF", 2, 0, Tier::Low } },
161  { Instruction::JUMPV, { "JUMPV", 1, 0, Tier::Mid } },
162  { Instruction::JUMPSUB, { "JUMPSUB", 1, 0, Tier::Low } },
163  { Instruction::JUMPSUBV, { "JUMPSUBV", 1, 0, Tier::Mid } },
164  { Instruction::BEGINSUB, { "BEGINSUB", 0, 0, Tier::Special } },
165  { Instruction::BEGINDATA, { "BEGINDATA", 0, 0, Tier::Special } },
166  { Instruction::RETURNSUB, { "RETURNSUB", 1, 0, Tier::Mid } },
167  { Instruction::PUTLOCAL, { "PUTLOCAL", 1, 0, Tier::VeryLow } },
168  { Instruction::GETLOCAL, { "GETLOCAL", 0, 1, Tier::VeryLow } },
169 
170  { Instruction::XADD, { "XADD", 0, 0, Tier::Special } },
171  { Instruction::XMUL, { "XMUL", 2, 1, Tier::Special } },
172  { Instruction::XSUB, { "XSUB", 2, 1, Tier::Special } },
173  { Instruction::XDIV, { "XDIV", 2, 1, Tier::Special } },
174  { Instruction::XSDIV, { "XSDIV", 2, 1, Tier::Special } },
175  { Instruction::XMOD, { "XMOD", 2, 1, Tier::Special } },
176  { Instruction::XSMOD, { "XSMOD", 2, 1, Tier::Special } },
177  { Instruction::XLT, { "XLT", 2, 1, Tier::Special } },
178  { Instruction::XGT, { "XGT", 2, 1, Tier::Special } },
179  { Instruction::XSLT, { "XSLT", 2, 1, Tier::Special } },
180  { Instruction::XSGT, { "XSGT", 2, 1, Tier::Special } },
181  { Instruction::XEQ, { "XEQ", 2, 1, Tier::Special } },
182  { Instruction::XISZERO, { "XISZERO", 2, 1, Tier::Special } },
183  { Instruction::XAND, { "XAND", 1, 1, Tier::Special } },
184  { Instruction::XOOR, { "XOOR", 2, 1, Tier::Special } },
185  { Instruction::XXOR, { "XXOR", 2, 1, Tier::Special } },
186  { Instruction::XNOT, { "XNOT", 2, 1, Tier::Special } },
187  { Instruction::XSHL, { "XSHL", 2, 1, Tier::Special } },
188  { Instruction::XSHR, { "XSHR", 2, 1, Tier::Special } },
189  { Instruction::XSAR, { "XSAR", 2, 1, Tier::Special } },
190  { Instruction::XROL, { "XROL", 2, 1, Tier::Special } },
191  { Instruction::XROR, { "XROR", 2, 1, Tier::Special } },
192  { Instruction::XPUSH, { "XPUSH", 1, 1, Tier::VeryLow } },
193  { Instruction::XMLOAD, { "XMLOAD", 1, 1, Tier::VeryLow } },
194  { Instruction::XMSTORE, { "XMSTORE", 2, 0, Tier::VeryLow } },
195  { Instruction::XSLOAD, { "XSLOAD", 1, 1, Tier::Special } },
196  { Instruction::XSSTORE, { "XSSTORE", 2, 0, Tier::Special } },
197  { Instruction::XVTOWIDE, { "XVTOWIDE", 1, 1, Tier::VeryLow } },
198  { Instruction::XWIDETOV, { "XWIDETOV", 1, 1, Tier::VeryLow } },
199  { Instruction::XPUT, { "XPUT", 3, 1, Tier::Special } },
200  { Instruction::XGET, { "XGET", 2, 1, Tier::Special } },
201  { Instruction::XSWIZZLE, { "XSWIZZLE", 2, 1, Tier::Special } },
202  { Instruction::XSHUFFLE, { "XSHUFFLE", 3, 1, Tier::Special } },
203  { Instruction::CREATE, { "CREATE", 3, 1, Tier::Special } },
204  { Instruction::CREATE2, { "CREATE2", 4, 1, Tier::Special } },
205  { Instruction::CALL, { "CALL", 7, 1, Tier::Special } },
206  { Instruction::CALLCODE, { "CALLCODE", 7, 1, Tier::Special } },
207  { Instruction::RETURN, { "RETURN", 2, 0, Tier::Zero } },
208  { Instruction::STATICCALL, { "STATICCALL", 6, 1, Tier::Special } },
209  { Instruction::DELEGATECALL, { "DELEGATECALL", 6, 1, Tier::Special } },
210  { Instruction::REVERT, { "REVERT", 2, 0, Tier::Special } },
211  { Instruction::INVALID, { "INVALID", 0, 0, Tier::Zero } },
212  { Instruction::SUICIDE, { "SUICIDE", 1, 0, Tier::Special } },
213 
214  // these are generated by the interpreter - should never be in user code
215  { Instruction::PUSHC, { "PUSHC", 0, 1, Tier::VeryLow } },
216  { Instruction::JUMPC, { "JUMPC", 1, 0, Tier::Mid } },
217  { Instruction::JUMPCI, { "JUMPCI", 2, 0, Tier::High } },
218 };
219 
221 {
222  auto it = c_instructionInfo.find(_inst);
223  if (it != c_instructionInfo.end())
224  return it->second;
225  return InstructionInfo{{}, 0, 0, Tier::Invalid};
226 }
227 
228 
229 }
230 }
dev::eth::Instruction::PUSH9
@ PUSH9
place 9 byte item on stack
dev::eth::Instruction::XSHR
@ XSHR
shift right opertation
dev::eth::Instruction::JUMPCI
@ JUMPCI
conditionally alter the program counter - pre-verified
dev::eth::Instruction::XSHL
@ XSHL
shift left opertation
dev::eth::Instruction::LOG0
@ LOG0
Makes a log entry; no topics.
dev::eth::Instruction::LOG3
@ LOG3
Makes a log entry; 3 topics.
dev::eth::Instruction::LOG4
@ LOG4
Makes a log entry; 4 topics.
dev::eth::Tier::Low
@ Low
dev::eth::Instruction::ADDRESS
@ ADDRESS
get address of currently executing account
dev::eth::Instruction::DIFFICULTY
@ DIFFICULTY
get the block's difficulty
dev::eth::Instruction::PUSH3
@ PUSH3
place 3 byte item on stack
dev::eth::Instruction::DUP16
@ DUP16
copies the 16th highest item in the stack to the top of the stack
dev::eth::Instruction::SLOAD
@ SLOAD
load word from storage
dev::eth::Instruction::XSHUFFLE
@ XSHUFFLE
permute data in two vectors
dev::eth::Instruction::PUSH8
@ PUSH8
place 8 byte item on stack
dev::eth::Instruction::XMLOAD
@ XMLOAD
load vector from memory
dev::eth::Instruction::PUSH29
@ PUSH29
place 29 byte item on stack
dev::eth::Instruction::DUP10
@ DUP10
copies the 10th highest item in the stack to the top of the stack
dev::eth::Instruction::SWAP7
@ SWAP7
swaps the highest and 8th highest value on the stack
dev::eth::Instruction::SIGNEXTEND
@ SIGNEXTEND
extend length of signed integer
dev::eth::Instruction::CREATE
@ CREATE
create a new account with associated code
dev::eth::Instruction::POP
@ POP
remove item from stack
dev::eth::Instruction::CALLER
@ CALLER
get caller address
dev::eth::Instruction::XOR
@ XOR
bitwise XOR operation
dev::eth::Instruction::PUSH15
@ PUSH15
place 15 byte item on stack
dev::eth::Instruction::RETURNDATACOPY
@ RETURNDATACOPY
copy data returned from previous call to memory
dev::eth::Instruction::JUMPV
@ JUMPV
alter the program counter to a jumpdest
dev::eth::Instruction::DELEGATECALL
@ DELEGATECALL
like CALLCODE but keeps caller's value and sender
dev::eth::Instruction::SSTORE
@ SSTORE
save word to storage
dev::eth::Instruction::SWAP15
@ SWAP15
swaps the highest and 16th highest value on the stack
dev::eth::Instruction::LT
@ LT
less-than comparision
dev::eth::Instruction::PUSH18
@ PUSH18
place 18 byte item on stack
dev::eth::Instruction::DUP11
@ DUP11
copies the 11th highest item in the stack to the top of the stack
dev::eth::Instruction::XROR
@ XROR
rotate right opertation
dev::eth::Instruction::RETURN
@ RETURN
halt execution returning output data
dev::eth::Instruction::XLT
@ XLT
less-than comparision
dev::eth::Instruction::XXOR
@ XXOR
bitwise XOR operation
dev::eth::Instruction::PUSH11
@ PUSH11
place 11 byte item on stack
dev::eth::Instruction::AND
@ AND
bitwise AND operation
dev::eth::Instruction::OR
@ OR
bitwise OR operation
dev::eth::Instruction::LOG1
@ LOG1
Makes a log entry; 1 topic.
dev::eth::Instruction::SWAP13
@ SWAP13
swaps the highest and 14th highest value on the stack
dev::eth::Instruction::SAR
@ SAR
arithmetic shift right operation
dev::eth::Instruction::PUSH10
@ PUSH10
place 10 byte item on stack
dev::eth::Tier::Mid
@ Mid
dev::eth::Instruction::PUSHC
@ PUSHC
push value from constant pool
dev::eth::Instruction::PUSH21
@ PUSH21
place 21 byte item on stack
dev::eth::Instruction::XMOD
@ XMOD
modulo remainder operation
dev::eth::Instruction::STATICCALL
@ STATICCALL
dev::eth::Instruction::XSMOD
@ XSMOD
signed modulo remainder operation
dev::eth::Instruction::XSGT
@ XSGT
signed greater-than comparision
dev::eth::Instruction::BALANCE
@ BALANCE
get balance of the given account
dev::eth::Instruction::PUSH32
@ PUSH32
place 32 byte item on stack
dev::eth::Instruction::DUP1
@ DUP1
copies the highest item in the stack to the top of the stack
dev::eth::Instruction::CALLCODE
@ CALLCODE
message-call with another account's code only
dev::eth::Instruction::PUSH22
@ PUSH22
place 22 byte item on stack
dev::eth::Instruction::SWAP9
@ SWAP9
swaps the highest and 10th highest value on the stack
dev::eth::Instruction::SUB
@ SUB
subtraction operation
dev::eth::Instruction::DUP8
@ DUP8
copies the 8th highest item in the stack to the top of the stack
dev::eth::Instruction::MLOAD
@ MLOAD
load word from memory
dev::eth::Instruction::SHR
@ SHR
logical shift right operation
dev::eth::Instruction::XAND
@ XAND
bitwise AND operation
dev::eth::Instruction::CALLDATACOPY
@ CALLDATACOPY
copy input data in current environment to memory
dev::eth::Instruction::PUSH28
@ PUSH28
place 28 byte item on stack
dev::eth::Instruction::XPUT
@ XPUT
put data in vector
dev::eth::Instruction::RETURNSUB
@ RETURNSUB
return to subroutine jumped from
dev::eth::Tier::High
@ High
dev::eth::Instruction::SWAP11
@ SWAP11
swaps the highest and 12th highest value on the stack
dev::eth::Tier::Base
@ Base
dev::eth::Instruction::MOD
@ MOD
modulo remainder operation
dev::eth::Instruction::JUMP
@ JUMP
alter the program counter to a jumpdest
dev::eth::Instruction::PUSH24
@ PUSH24
place 24 byte item on stack
dev::eth::Instruction::XSSTORE
@ XSSTORE
save vector to storage
dev::eth::Instruction::STOP
@ STOP
halts execution
dev::eth::Instruction::SWAP1
@ SWAP1
swaps the highest and second highest value on the stack
dev::eth::Instruction::SWAP4
@ SWAP4
swaps the highest and 5th highest value on the stack
dev::eth::Instruction::SMOD
@ SMOD
signed modulo remainder operation
dev::eth::Instruction::MUL
@ MUL
mulitplication operation
dev::eth::Instruction::DUP12
@ DUP12
copies the 12th highest item in the stack to the top of the stack
dev::eth::Instruction::DUP7
@ DUP7
copies the 7th highest item in the stack to the top of the stack
dev::eth::Instruction::XGT
@ XGT
greater-than comparision
dev::eth::Instruction::DUP5
@ DUP5
copies the 5th highest item in the stack to the top of the stack
dev::eth::Instruction::SUICIDE
@ SUICIDE
halt execution and register account for later deletion
dev::eth::Instruction::XWIDETOV
@ XWIDETOV
convert wide integer to vector
dev::eth::Instruction::GAS
@ GAS
get the amount of available gas
dev::eth::Instruction::PUSH19
@ PUSH19
place 19 byte item on stack
dev::eth::Instruction::SWAP14
@ SWAP14
swaps the highest and 15th highest value on the stack
dev::eth::Instruction::XPUSH
@ XPUSH
push vector to stack
dev::eth::Instruction::XGET
@ XGET
get data from vector
dev::eth::Instruction::PUSH27
@ PUSH27
place 27 byte item on stack
dev::eth::Instruction::JUMPI
@ JUMPI
conditionally alter the program counter
dev::eth::Instruction::SWAP8
@ SWAP8
swaps the highest and 9th highest value on the stack
dev::eth::Instruction::XMSTORE
@ XMSTORE
save vector to memory
dev::eth::Instruction::PUSH4
@ PUSH4
place 4 byte item on stack
dev::eth::Instruction::SWAP6
@ SWAP6
swaps the highest and 7th highest value on the stack
dev::eth::InstructionInfo
Information structure for a particular instruction.
Definition: Instruction.h:249
dev::eth::Instruction::SWAP5
@ SWAP5
swaps the highest and 6th highest value on the stack
dev::eth::Instruction::INVALID
@ INVALID
dedicated invalid instruction
dev::eth::Instruction::XMUL
@ XMUL
mulitplication operation
dev::eth::Instruction::JUMPC
@ JUMPC
alter the program counter - pre-verified
dev::eth::Instruction::MSTORE
@ MSTORE
save word to memory
dev::eth::Instruction::XROL
@ XROL
rotate left opertation
dev::eth::Instruction::DUP6
@ DUP6
copies the 6th highest item in the stack to the top of the stack
dev::eth::Instruction::JUMPTO
@ JUMPTO
alter the program counter to a jumpdest
dev::eth::Instruction::PUSH25
@ PUSH25
place 25 byte item on stack
dev::eth::Instruction::LOG2
@ LOG2
Makes a log entry; 2 topics.
dev::eth::Instruction::SDIV
@ SDIV
signed integer division operation
dev::eth::Instruction::PUSH7
@ PUSH7
place 7 byte item on stack
dev::eth::Instruction::COINBASE
@ COINBASE
get the block's coinbase address
dev::eth::Instruction::BEGINSUB
@ BEGINSUB
set a potential jumpsub destination
dev::eth::Instruction::XSLT
@ XSLT
signed less-than comparision
dev::eth::Instruction::DIV
@ DIV
integer division operation
dev::eth::Instruction::SWAP3
@ SWAP3
swaps the highest and 4th highest value on the stack
dev::eth::Instruction::GT
@ GT
greater-than comparision
dev::eth::Instruction::ISZERO
@ ISZERO
simple not operator
dev::eth::Instruction::NOT
@ NOT
bitwise NOT operation
dev::eth::Instruction::PUSH14
@ PUSH14
place 14 byte item on stack
dev::eth::Instruction::PUSH30
@ PUSH30
place 30 byte item on stack
dev::eth::Instruction::PUSH12
@ PUSH12
place 12 byte item on stack
dev::eth::Instruction::CALL
@ CALL
message-call into an account
dev::eth::Instruction::XADD
@ XADD
addition operation
dev::eth::Tier::Zero
@ Zero
dev::eth::Instruction::XSDIV
@ XSDIV
signed integer division operation
dev::eth::Instruction::EQ
@ EQ
equality comparision
dev::eth::Instruction::BEGINDATA
@ BEGINDATA
begine the data section
dev::eth::Instruction::XEQ
@ XEQ
equality comparision
dev::eth::Instruction::BLOCKHASH
@ BLOCKHASH
get hash of most recent complete block
dev::eth::Instruction
Instruction
Virtual machine bytecode instruction.
Definition: Instruction.h:29
dev::eth::Instruction::EXTCODESIZE
@ EXTCODESIZE
get external code size (from another contract)
dev::eth::Instruction::XSWIZZLE
@ XSWIZZLE
permute data in vector
dev::eth::Tier::VeryLow
@ VeryLow
dev::eth::Instruction::DUP9
@ DUP9
copies the 9th highest item in the stack to the top of the stack
dev::eth::Instruction::ADDMOD
@ ADDMOD
unsigned modular addition
dev::eth::Instruction::REVERT
@ REVERT
stop execution and revert state changes, without consuming all provided gas
dev::eth::Instruction::ADD
@ ADD
addition operation
dev::eth::Instruction::XSAR
@ XSAR
shift arithmetic right opertation
dev::eth::Instruction::CALLDATALOAD
@ CALLDATALOAD
get input data of current environment
dev::eth::Instruction::PUSH20
@ PUSH20
place 20 byte item on stack
dev::eth::Instruction::XNOT
@ XNOT
bitwise NOT opertation
dev::eth::Instruction::PUSH26
@ PUSH26
place 26 byte item on stack
dev::eth::Instruction::SHL
@ SHL
logical shift left operation
dev::eth::Instruction::EXP
@ EXP
exponential operation
dev::eth::Instruction::PUSH5
@ PUSH5
place 5 byte item on stack
dev::eth::Instruction::SGT
@ SGT
signed greater-than comparision
dev::eth::Instruction::DUP14
@ DUP14
copies the 14th highest item in the stack to the top of the stack
dev::eth::Instruction::PUSH2
@ PUSH2
place 2 byte item on stack
dev::eth::Instruction::SWAP10
@ SWAP10
swaps the highest and 11th highest value on the stack
dev::eth::Instruction::SWAP12
@ SWAP12
swaps the highest and 13th highest value on the stack
dev::eth::Instruction::SWAP2
@ SWAP2
swaps the highest and third highest value on the stack
dev::eth::Instruction::PUSH13
@ PUSH13
place 13 byte item on stack
Instruction.h
dev::eth::Instruction::NUMBER
@ NUMBER
get the block's number
dev::eth::Instruction::XSUB
@ XSUB
subtraction operation
dev::eth::Instruction::CALLDATASIZE
@ CALLDATASIZE
get size of input data in current environment
dev::eth::Instruction::PUSH1
@ PUSH1
place 1 byte item on stack
dev::eth::Instruction::CODESIZE
@ CODESIZE
get size of code running in current environment
dev::eth::Instruction::XISZERO
@ XISZERO
simple not operator
dev::eth::Instruction::MULMOD
@ MULMOD
unsigned modular multiplication
dev
Definition: Address.cpp:21
dev::eth::Instruction::XSLOAD
@ XSLOAD
load vector from storage
dev::eth::Instruction::BYTE
@ BYTE
retrieve single byte from word
dev::eth::Instruction::DUP13
@ DUP13
copies the 13th highest item in the stack to the top of the stack
dev::eth::Instruction::PUSH31
@ PUSH31
place 31 byte item on stack
dev::eth::Instruction::GASPRICE
@ GASPRICE
get price of gas in current environment
dev::eth::Instruction::DUP2
@ DUP2
copies the second highest item in the stack to the top of the stack
dev::eth::Instruction::TIMESTAMP
@ TIMESTAMP
get the block's timestamp
dev::eth::Instruction::ORIGIN
@ ORIGIN
get execution origination address
dev::eth::Instruction::CODECOPY
@ CODECOPY
copy code running in current environment to memory
dev::eth::Instruction::PUSH17
@ PUSH17
place 17 byte item on stack
dev::eth::Tier::Invalid
@ Invalid
dev::eth::Instruction::SHA3
@ SHA3
compute SHA3-256 hash
dev::eth::Instruction::DUP3
@ DUP3
copies the third highest item in the stack to the top of the stack
dev::eth::instructionInfo
InstructionInfo instructionInfo(Instruction _inst)
Information on all the instructions.
Definition: Instruction.cpp:220
dev::eth::Instruction::XVTOWIDE
@ XVTOWIDE
convert vector to wide integer
dev::eth::Instruction::JUMPSUBV
@ JUMPSUBV
alter the program counter to a beginsub
dev::eth::Instruction::MSTORE8
@ MSTORE8
save byte to memory
dev::eth::Instruction::RETURNDATASIZE
@ RETURNDATASIZE
size of data returned from previous call
dev::eth::Instruction::PUSH23
@ PUSH23
place 23 byte item on stack
dev::eth::Instruction::EXTCODEHASH
@ EXTCODEHASH
get external code hash
dev::eth::Instruction::PUSH16
@ PUSH16
place 16 byte item on stack
dev::eth::Instruction::JUMPIF
@ JUMPIF
conditionally alter the program counter
dev::eth::Instruction::PUSH6
@ PUSH6
place 6 byte item on stack
dev::eth::Instruction::MSIZE
@ MSIZE
get the size of active memory
dev::eth::Instruction::XDIV
@ XDIV
integer division operation
dev::eth::Instruction::JUMPDEST
@ JUMPDEST
set a potential jump destination
dev::eth::Instruction::GASLIMIT
@ GASLIMIT
get the block's gas limit
dev::eth::Instruction::SWAP16
@ SWAP16
swaps the highest and 17th highest value on the stack
dev::eth::Instruction::PUTLOCAL
@ PUTLOCAL
pop top of stack to local variable
dev::eth::Instruction::DUP4
@ DUP4
copies the 4th highest item in the stack to the top of the stack
dev::eth::Tier::Special
@ Special
dev::eth::Instruction::XOOR
@ XOOR
bitwise OR operation
dev::eth::Instruction::EXTCODECOPY
@ EXTCODECOPY
copy external code (from another contract)
dev::eth::Instruction::JUMPSUB
@ JUMPSUB
alter the program counter to a beginsub
dev::eth::Instruction::GETLOCAL
@ GETLOCAL
push local variable to top of stack
dev::eth::Instruction::SLT
@ SLT
signed less-than comparision
dev::eth::Instruction::CREATE2
@ CREATE2
create a new account with associated code. sha3((sender + salt + code)
dev::eth::Instruction::PC
@ PC
get the program counter
dev::eth::Instruction::DUP15
@ DUP15
copies the 15th highest item in the stack to the top of the stack
dev::eth::Instruction::CALLVALUE
@ CALLVALUE