Skip to content

Add EIP: MLOAD8 and CALLDATALOAD8 Opcodes#11038

Merged
eth-bot merged 25 commits intoethereum:masterfrom
Helkomine:master
Jan 21, 2026
Merged

Add EIP: MLOAD8 and CALLDATALOAD8 Opcodes#11038
eth-bot merged 25 commits intoethereum:masterfrom
Helkomine:master

Conversation

@Helkomine
Copy link
Contributor

This PR introduces a draft EIP proposing two new EVM opcodes, MLOAD8 and CALLDATALOAD8, which allow efficient single-byte access to memory and calldata.

A discussion thread has been opened on Ethereum Magicians: https://ethereum-magicians.org/t/eip-xxxx-mload8-and-calldataload8-opcodes/27396

This EIP introduces new EVM opcodes for efficient single-byte memory and calldata loads, reducing gas costs and bytecode size.
Added details for MLOAD8 and CALLDATALOAD8 instructions, including stack inputs, outputs, gas costs, and exceptional conditions.
Clarified opcode references in the abstract and motivation sections.
Propose new opcodes for direct single-byte loading to reduce gas costs and bytecode size.
@Helkomine Helkomine requested a review from eth-bot as a code owner January 7, 2026 10:58
@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft labels Jan 7, 2026
@eth-bot
Copy link
Collaborator

eth-bot commented Jan 7, 2026

✅ All reviewers have approved.

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Jan 7, 2026
@github-actions github-actions bot added t-core and removed w-ci Waiting on CI to pass labels Jan 7, 2026
@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Jan 7, 2026
@eth-bot eth-bot changed the title Add EIP-XXXX: MLOAD8 and CALLDATALOAD8 Add EIP: MLOAD8 and CALLDATALOAD8 Opcodes Jan 7, 2026
@github-actions github-actions bot added the w-ci Waiting on CI to pass label Jan 7, 2026
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

The commit 5e819b8 (as a parent of 61d002c) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Jan 7, 2026
Copy link
Contributor

@xinbenlv xinbenlv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this proposal! The addition of MLOAD8 and CALLDATALOAD8 fills a clear gap in the EVM instruction set, offering symmetry with MSTORE8 and potential gas savings for byte-oriented processing. The draft is well-written and follows the standard structure.

The proposal is solid and ready for Draft status once the ambiguity regarding memory expansion size (1 byte vs 32 bytes) is resolved in the text.


## Specification

### MLOAD8 (TBD)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While (TBD) is acceptable for an initial draft, consider proposing specific opcode values (e.g., from the 0x5X range if available) to facilitate early client prototyping and collision checking.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also add an hmtl <-- TODO --> marker with all TBDs for the EIP bot to flag it if not addressed later when moving to review stage

Thanks for the detailed review!

- Clarified memory expansion order and aligned expansion semantics with MSTORE8.
- Added an explicit explanation of memory expansion prior to load.
- Included a concrete gas and bytecode size savings example in the rationale.
- Added a note on tentative opcode placement to facilitate early prototyping.

Please let me know if further clarification would be helpful.
@eth-bot eth-bot enabled auto-merge (squash) January 21, 2026 17:38
Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Reviewers Have Approved; Performing Automatic Merge...

@eth-bot eth-bot merged commit 76c1b2a into ethereum:master Jan 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments