Skip to content

Commit 0bbf66b

Browse files
committed
further improvements
1 parent 55db501 commit 0bbf66b

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

learn_evm/evm_opcodes.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
3939
| [`0x1b`](#shl) | SHL | Shift Left | [EIP145](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-145.md) | 3 |
4040
| [`0x1c`](#shr) | SHR | Logical Shift Right | [EIP145](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-145.md) | 3 |
4141
| [`0x1d`](#sar) | SAR | Arithmetic Shift Right | [EIP145](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-145.md) | 3 |
42-
| [`0x20`](#sha3) | KECCAK256 | Compute Keccak-256 hash | - | 30* |
42+
| [`0x20`](#keccak256) | KECCAK256 | Compute Keccak-256 hash | - | 30* |
4343
| `0x21` - `0x2f`| Unused | Unused |
4444
| [`0x30`](#address) | ADDRESS | Get address of currently executing account | - | 2 |
4545
| [`0x31`](#balance) | BALANCE | Get balance of the given account | - | 700 |
@@ -74,7 +74,7 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
7474
| [`0x55`](#sstore) | SSTORE | Save word to storage | - | 20000** |
7575
| [`0x56`](#jump) | JUMP | Alter the program counter | - | 8 |
7676
| [`0x57`](#jumpi) | JUMPI | Conditionally alter the program counter | - | 10 |
77-
| [`0x58`](#getpc) | GETPC | Get the value of the program counter prior to the increment | - | 2 |
77+
| [`0x58`](#pc) | PC | Get the value of the program counter prior to the increment | - | 2 |
7878
| [`0x59`](#msize) | MSIZE | Get the size of active memory in bytes | - | 2 |
7979
| [`0x5a`](#gas) | GAS | Get the amount of available gas, including the corresponding reduction for the cost of this instruction | - | 2 |
8080
| [`0x5b`](#jumpdest) | JUMPDEST | Mark a valid destination for jumps | - | 1 |
@@ -149,19 +149,19 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
149149
| [`0xa3`](#log3) | LOG3 | Append log record with three topics | - | 1500 |
150150
| [`0xa4`](#log4) | LOG4 | Append log record with four topics | - | 1875 |
151151
| `0xa5` - `0xaf` | Unused | - |
152-
| [`0xb0`](#jumpto) | JUMPTO | Tentative [libevmasm has different numbers](https://github.com/ethereum/solidity/blob/c61610302aa2bfa029715b534719d25fe3949059/libevmasm/Instruction.h#L176)| [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
153-
| [`0xb1`](#jumpif) | JUMPIF | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
154-
| [`0xb2`](#jumpsub) | JUMPSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
155-
| [`0xb4`](#jumpsubv) | JUMPSUBV | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
156-
| [`0xb5`](#beginsub) | BEGINSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
157-
| [`0xb6`](#begindata) | BEGINDATA | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
158-
| [`0xb8`](#returnsub) | RETURNSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
159-
| [`0xb9`](#putlocal) | PUTLOCAL | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
160-
| [`0xba`](#getlocal) | GETLOCAL | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
152+
| `0xb0` | JUMPTO | Tentative [libevmasm has different numbers](https://github.com/ethereum/solidity/blob/c61610302aa2bfa029715b534719d25fe3949059/libevmasm/Instruction.h#L176)| [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
153+
| `0xb1` | JUMPIF | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
154+
| `0xb2` | JUMPSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
155+
| `0xb4` | JUMPSUBV | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
156+
| `0xb5` | BEGINSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
157+
| `0xb6` | BEGINDATA | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
158+
| `0xb8` | RETURNSUB | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
159+
| `0xb9` | PUTLOCAL | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
160+
| `0xba` | GETLOCAL | Tentative | [EIP 615](https://github.com/ethereum/EIPs/blob/606405b5ab7aa28d8191958504e8aad4649666c9/EIPS/eip-615.md) |
161161
| `0xbb` - `0xe0` | Unused | - |
162-
| [`0xe1`](#sloadbytes) | SLOADBYTES | Only referenced in pyethereum | - | - |
163-
| [`0xe2`](#sstorebytes) | SSTOREBYTES | Only referenced in pyethereum | - | - |
164-
| [`0xe3`](#ssize) | SSIZE | Only referenced in pyethereum | - | - |
162+
| `0xe1` | SLOADBYTES | Only referenced in pyethereum | - | - |
163+
| `0xe2` | SSTOREBYTES | Only referenced in pyethereum | - | - |
164+
| `0xe3` | SSIZE | Only referenced in pyethereum | - | - |
165165
| `0xe4` - `0xef` | Unused | - |
166166
| [`0xf0`](#create) | CREATE | Create a new account with associated code | - | 32000 |
167167
| [`0xf1`](#call) | CALL | Message-call into an account | - | Complicated |
@@ -172,9 +172,8 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
172172
| `0xf6` - `0xf9` | Unused | - | - |
173173
| [`0xfa`](#staticcall) | STATICCALL | Similar to CALL, but does not modify state | - | 40 |
174174
| `0xfb` | Unused | - | - |
175-
| [`0xfc`](#txexecgas) | TXEXECGAS | Not in yellow paper FIXME | - | - |
176175
| [`0xfd`](#revert) | REVERT | Stop execution and revert state changes, without consuming all provided gas and providing a reason | - | 0 |
177-
| [`0xfe`](#invalid) | INVALID | Designated invalid instruction | - | 0 |
176+
| `0xfe` | INVALID | Designated invalid instruction | - | 0 |
178177
| [`0xff`](#selfdestruct) | SELFDESTRUCT | Halt execution and register account for later deletion | - | 5000* |
179178

180179
## Instruction Details
@@ -408,7 +407,7 @@ res = value >> shift
408407
value: int256
409408

410409
-----
411-
### SHA3
410+
### KECCAK256
412411
**0x20**
413412

414413
(offset, len) => (hash)

0 commit comments

Comments
 (0)