Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
feat(opcodes): mcopy opcode (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzanitti authored Sep 2, 2023
1 parent 813b6b6 commit 2395ef6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion huff_utils/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use strum_macros::EnumString;
/// They are arranged in a particular order such that all the opcodes that have common
/// prefixes are ordered by decreasing length to avoid mismatch when lexing.
/// Example : [origin, or] or [push32, ..., push3]
pub const OPCODES: [&str; 147] = [
pub const OPCODES: [&str; 148] = [
"lt",
"gt",
"slt",
Expand Down Expand Up @@ -39,6 +39,7 @@ pub const OPCODES: [&str; 147] = [
"chainid",
"selfbalance",
"pop",
"mcopy",
"mload",
"mstore8",
"mstore",
Expand Down Expand Up @@ -199,6 +200,7 @@ pub static OPCODES_MAP: phf::Map<&'static str, Opcode> = phf_map! {
"jumpi" => Opcode::Jumpi,
"pc" => Opcode::Pc,
"msize" => Opcode::Msize,
"mcopy" => Opcode::Mcopy,
"push0" => Opcode::Push0,
"push1" => Opcode::Push1,
"push2" => Opcode::Push2,
Expand Down Expand Up @@ -440,6 +442,8 @@ pub enum Opcode {
Gas,
/// Marks a valid destination for jumps
Jumpdest,
/// Copies an area of memory from src to dst. Areas can overlap.
Mcopy,
/// Places a zero on top of the stack
Push0,
/// Places 1 byte item on top of the stack
Expand Down Expand Up @@ -678,6 +682,7 @@ impl Opcode {
Opcode::Msize => "59",
Opcode::Gas => "5a",
Opcode::Jumpdest => "5b",
Opcode::Mcopy => "5e",
Opcode::Push0 => "5f",
Opcode::Push1 => "60",
Opcode::Push2 => "61",
Expand Down

0 comments on commit 2395ef6

Please sign in to comment.