Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 30 additions & 18 deletions src/compiler/evm_frontend/evm_mir_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4772,9 +4772,11 @@ void EVMMirBuilder::handleCodeCopy(Operand DestOffsetComponents,
reloadGasFromMemory();
}
#endif
if (!UsePreparedMemory) {
reloadMemorySizeFromInstance();
}
// No-expand helpers run on a proven memory range, but the instance memory
// backing buffer may still be materialized or rebased on first use. Keep
// the cached base pointer and size in sync so the next direct memory
// operation never reads a stale base.
reloadMemorySizeFromInstance();
}

typename EVMMirBuilder::Operand
Expand Down Expand Up @@ -6010,9 +6012,11 @@ EVMMirBuilder::handleKeccak256(Operand OffsetComponents,
#ifdef ZEN_ENABLE_EVM_GAS_REGISTER
reloadGasFromMemory();
#endif
if (!UsePreparedMemory) {
reloadMemorySizeFromInstance();
}
// No-expand helpers run on a proven memory range, but the instance memory
// backing buffer may still be materialized or rebased on first use. Keep
// the cached base pointer and size in sync so the next direct memory
// operation never reads a stale base.
reloadMemorySizeFromInstance();
return Result;
}

Expand Down Expand Up @@ -6042,9 +6046,11 @@ EVMMirBuilder::handleKeccak256TwoWord(Operand OffsetComponents, Operand Word0,
#ifdef ZEN_ENABLE_EVM_GAS_REGISTER
reloadGasFromMemory();
#endif
if (!UsePreparedMemory) {
reloadMemorySizeFromInstance();
}
// No-expand helpers run on a proven memory range, but the instance memory
// backing buffer may still be materialized or rebased on first use. Keep
// the cached base pointer and size in sync so the next direct memory
// operation never reads a stale base.
reloadMemorySizeFromInstance();
return Result;
}

Expand Down Expand Up @@ -6075,9 +6081,11 @@ typename EVMMirBuilder::Operand EVMMirBuilder::handleKeccak256CallDataConstSlot(
#ifdef ZEN_ENABLE_EVM_GAS_REGISTER
reloadGasFromMemory();
#endif
if (!UsePreparedMemory) {
reloadMemorySizeFromInstance();
}
// No-expand helpers run on a proven memory range, but the instance memory
// backing buffer may still be materialized or rebased on first use. Keep
// the cached base pointer and size in sync so the next direct memory
// operation never reads a stale base.
reloadMemorySizeFromInstance();
return Result;
}

Expand Down Expand Up @@ -6107,9 +6115,11 @@ EVMMirBuilder::handleKeccak256CallerConstSlot(Operand OffsetComponents,
#ifdef ZEN_ENABLE_EVM_GAS_REGISTER
reloadGasFromMemory();
#endif
if (!UsePreparedMemory) {
reloadMemorySizeFromInstance();
}
// No-expand helpers run on a proven memory range, but the instance memory
// backing buffer may still be materialized or rebased on first use. Keep
// the cached base pointer and size in sync so the next direct memory
// operation never reads a stale base.
reloadMemorySizeFromInstance();
return Result;
}

Expand Down Expand Up @@ -7409,9 +7419,11 @@ void EVMMirBuilder::handleCallDataCopy(Operand DestOffsetComponents,
reloadGasFromMemory();
}
#endif
if (!UsePreparedMemory) {
reloadMemorySizeFromInstance();
}
// No-expand helpers run on a proven memory range, but the instance memory
// backing buffer may still be materialized or rebased on first use. Keep
// the cached base pointer and size in sync so the next direct memory
// operation never reads a stale base.
reloadMemorySizeFromInstance();
}

void EVMMirBuilder::handleExtCodeCopy(Operand AddressComponents,
Expand Down
Loading
Loading