Add EIP: MLOAD8 and CALLDATALOAD8 Opcodes#11038
Conversation
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.
|
✅ All reviewers have approved. |
|
The commit 5e819b8 (as a parent of 61d002c) contains errors. |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
All Reviewers Have Approved; Performing Automatic Merge...
This PR introduces a draft EIP proposing two new EVM opcodes,
MLOAD8andCALLDATALOAD8, 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