Skip to content

MLOAD/MSTORE Separation #53

Open
Open

Description

@ControlCplusControlV
No description provided.

Activity

  1. ControlCplusControlV commented on Dec 17, 2022

    @ControlCplusControlV
    OwnerAuthor

    MLOAD/MSTORE Separation

    Temporary variables that are stored in memory during compilation will start at an offset of 2^31. This is to avoid conflicts in memory addresses between mload/mstore and variables stored in memory during intermediate operations. Practically, this means that only memory space below 2^31 can be used for non-variable purposes (like a hash). However, variables stored in memory to avoid the EVM's stack too deep will be stored beyond 2^31.

    The following opcodes will not be allowed to reach Memory locations beyond 2^31 or reference beyond that address. EXTCODECOPY, RETURNDATACOPY, CALLDATACOPY, SHA3, and CODECOPY.

  2. 0xKitsune commented on Jan 21, 2023

    @0xKitsune
    Collaborator

    Lets run this one by the Miden team and see if they have any thoughts on this. With the recent changes to the VM there might be a preferred way to implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions