Skip to content

refactor: migrate memory opcodes (mload/mstore) from runtime to IR implementation - #265

Merged
zoowii merged 7 commits into
DTVMStack:mainfrom
ZR74:pr-memory
Jan 20, 2026
Merged

refactor: migrate memory opcodes (mload/mstore) from runtime to IR implementation#265
zoowii merged 7 commits into
DTVMStack:mainfrom
ZR74:pr-memory

Conversation

@ZR74

@ZR74 ZR74 commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

2. What is the scope of this PR (e.g. component or file name):

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains CI/CD configuration changes
  • Contains documentation changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

6. Release note

None

std::memcpy(MemoryBase + DestOffset, Code + Offset, CopySize);
if (Size > CopySize) {
std::memset(Memory.data() + DestOffset + CopySize, 0, Size - CopySize);
std::memset(MemoryBase + DestOffset + CopySize, 0, Size - CopySize);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Need to add a CALL output non-overwrite test (evm case), first fill the output area with non-zero values, call returns data length < retSize, after execution verify that [retOffset+CopySize, retOffset+retSize) remains unchanged.

@zoowii
zoowii merged commit f3c70c5 into DTVMStack:main Jan 20, 2026
10 checks passed
@ZR74
ZR74 deleted the pr-memory branch January 21, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants