Skip to content

Commit

Permalink
Add support for solc0.8.20 opcodes ##arch
Browse files Browse the repository at this point in the history
  • Loading branch information
Silur authored Jan 21, 2025
1 parent 412d93a commit 51fa368
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions libr/arch/p/evm/evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ static const EvmOpDef opcodes[256] = {
[EVM_OP_MSIZE] = { "msize", 1 },
[EVM_OP_GAS] = { "gas", 1 },
[EVM_OP_JUMPDEST] = { "jumpdest", 1 },
[EVM_OP_TLOAD] = { "tload", 1 },
[EVM_OP_TSTORE] = { "tstore", 1 },
[EVM_OP_MCOPY] = { "mcopy", 1 },
[EVM_OP_PUSH0] = { "push0", 1 },
// ....
[EVM_OP_CREATE] = { "create", 1 },
[EVM_OP_CALL] = { "call", 1 },
Expand Down
6 changes: 5 additions & 1 deletion libr/arch/p/evm/evm.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ typedef enum {
EVM_OP_GAS,
EVM_OP_JUMPDEST,

EVM_OP_PUSH1 = 0x60,
EVM_OP_TLOAD = 0x5c,
EVM_OP_TSTORE,
EVM_OP_MCOPY,
EVM_OP_PUSH0,
EVM_OP_PUSH1,
EVM_OP_PUSH2,
EVM_OP_PUSH3,
EVM_OP_PUSH4,
Expand Down
4 changes: 4 additions & 0 deletions libr/asm/d/evm.sdb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ pc=program counter
msize=size of memory in current execution context, in bytes
gas=get the amount of available gas
jumpdest=mark valid jump destination
tload=load word from transient storage
tstore=save word to transient storage
mcopy=copy memory areas
push0=push value 0 onto stack
push1=push 1-byte value onto stack
push2=push 2-byte value onto stack
push3=push 3-byte value onto stack
Expand Down

0 comments on commit 51fa368

Please sign in to comment.