Skip to content

Commit

Permalink
Add DUPN and SWAPN opcode EIP-663
Browse files Browse the repository at this point in the history
  • Loading branch information
rodiazet committed Nov 28, 2022
1 parent c982f26 commit 3e3c0e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions include/evmc/instructions.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ enum evmc_opcode
OP_LOG3 = 0xa3,
OP_LOG4 = 0xa4,

OP_DUPN = 0xb2,
OP_SWAPN = 0xb3,

OP_CREATE = 0xf0,
OP_CALL = 0xf1,
OP_CALLCODE = 0xf2,
Expand Down
4 changes: 2 additions & 2 deletions lib/instructions/instruction_metrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ static struct evmc_instruction_metrics cancun_metrics[256] = {
/* = 0xaf */ {UNDEFINED, 0, 0},
/* = 0xb0 */ {UNDEFINED, 0, 0},
/* = 0xb1 */ {UNDEFINED, 0, 0},
/* = 0xb2 */ {UNDEFINED, 0, 0},
/* = 0xb3 */ {UNDEFINED, 0, 0},
/* DUPN = 0xb2 */ {VERYLOW, 0, 1},
/* SWAPN = 0xb3 */ {VERYLOW, 0, 0},
/* = 0xb4 */ {UNDEFINED, 0, 0},
/* = 0xb5 */ {UNDEFINED, 0, 0},
/* = 0xb6 */ {UNDEFINED, 0, 0},
Expand Down
4 changes: 2 additions & 2 deletions lib/instructions/instruction_names.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ static const char* cancun_names[256] = {
/* 0xaf */ NULL,
/* 0xb0 */ NULL,
/* 0xb1 */ NULL,
/* 0xb2 */ NULL,
/* 0xb3 */ NULL,
/* 0xb2 */ "DUPN",
/* 0xb3 */ "SWAPN",
/* 0xb4 */ NULL,
/* 0xb5 */ NULL,
/* 0xb6 */ NULL,
Expand Down

0 comments on commit 3e3c0e2

Please sign in to comment.