Skip to content

Commit

Permalink
Revert "core/vm: move TSTORE,TLOAD to correct opcode nums (ethereum#2…
Browse files Browse the repository at this point in the history
…7613)"

This reverts commit 81806c2.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent 4652392 commit 8fd34eb
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions core/vm/opcodes.go
Expand Up @@ -117,8 +117,6 @@ const (
MSIZE OpCode = 0x59
GAS OpCode = 0x5a
JUMPDEST OpCode = 0x5b
TLOAD OpCode = 0x5c
TSTORE OpCode = 0x5d
PUSH0 OpCode = 0x5f
)

Expand Down Expand Up @@ -207,6 +205,12 @@ const (
LOG4
)

// 0xb0 range.
const (
TLOAD OpCode = 0xb3
TSTORE OpCode = 0xb4
)

// 0xf0 range - closures.
const (
CREATE OpCode = 0xf0
Expand Down Expand Up @@ -300,8 +304,6 @@ var opCodeToString = map[OpCode]string{
MSIZE: "MSIZE",
GAS: "GAS",
JUMPDEST: "JUMPDEST",
TLOAD: "TLOAD",
TSTORE: "TSTORE",
PUSH0: "PUSH0",

// 0x60 range - pushes.
Expand Down Expand Up @@ -381,6 +383,10 @@ var opCodeToString = map[OpCode]string{
LOG3: "LOG3",
LOG4: "LOG4",

// 0xb0 range.
TLOAD: "TLOAD",
TSTORE: "TSTORE",

// 0xf0 range - closures.
CREATE: "CREATE",
CALL: "CALL",
Expand Down Expand Up @@ -471,8 +477,6 @@ var stringToOp = map[string]OpCode{
"MSIZE": MSIZE,
"GAS": GAS,
"JUMPDEST": JUMPDEST,
"TLOAD": TLOAD,
"TSTORE": TSTORE,
"PUSH0": PUSH0,
"PUSH1": PUSH1,
"PUSH2": PUSH2,
Expand Down Expand Up @@ -543,6 +547,8 @@ var stringToOp = map[string]OpCode{
"LOG2": LOG2,
"LOG3": LOG3,
"LOG4": LOG4,
"TLOAD": TLOAD,
"TSTORE": TSTORE,
"CREATE": CREATE,
"CREATE2": CREATE2,
"CALL": CALL,
Expand Down

0 comments on commit 8fd34eb

Please sign in to comment.