Skip to content
Draft
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
12 changes: 8 additions & 4 deletions src/compiler/evm_frontend/evm_mir_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2451,7 +2451,8 @@ EVMMirBuilder::handleCall(Operand GasOp, Operand ToAddrOp, Operand ValueOp,
Operand ArgsOffsetOp, Operand ArgsSizeOp,
Operand RetOffsetOp, Operand RetSizeOp) {
const auto &RuntimeFunctions = getRuntimeFunctionTable();
normalizeOperandU64(GasOp);
uint64_t Non64Value = std::numeric_limits<uint64_t>::max();
normalizeOperandU64(GasOp, &Non64Value);
normalizeOffsetWithSize(ArgsOffsetOp, ArgsSizeOp);
normalizeOffsetWithSize(RetOffsetOp, RetSizeOp);

Expand All @@ -2475,7 +2476,8 @@ EVMMirBuilder::handleCallCode(Operand GasOp, Operand ToAddrOp, Operand ValueOp,
Operand ArgsOffsetOp, Operand ArgsSizeOp,
Operand RetOffsetOp, Operand RetSizeOp) {
const auto &RuntimeFunctions = getRuntimeFunctionTable();
normalizeOperandU64(GasOp);
uint64_t Non64Value = std::numeric_limits<uint64_t>::max();
normalizeOperandU64(GasOp, &Non64Value);
normalizeOffsetWithSize(ArgsOffsetOp, ArgsSizeOp);
normalizeOffsetWithSize(RetOffsetOp, RetSizeOp);

Expand Down Expand Up @@ -2523,7 +2525,8 @@ EVMMirBuilder::handleDelegateCall(Operand GasOp, Operand ToAddrOp,
Operand ArgsOffsetOp, Operand ArgsSizeOp,
Operand RetOffsetOp, Operand RetSizeOp) {
const auto &RuntimeFunctions = getRuntimeFunctionTable();
normalizeOperandU64(GasOp);
uint64_t Non64Value = std::numeric_limits<uint64_t>::max();
normalizeOperandU64(GasOp, &Non64Value);
normalizeOffsetWithSize(ArgsOffsetOp, ArgsSizeOp);
normalizeOffsetWithSize(RetOffsetOp, RetSizeOp);

Expand All @@ -2546,7 +2549,8 @@ EVMMirBuilder::handleStaticCall(Operand GasOp, Operand ToAddrOp,
Operand ArgsOffsetOp, Operand ArgsSizeOp,
Operand RetOffsetOp, Operand RetSizeOp) {
const auto &RuntimeFunctions = getRuntimeFunctionTable();
normalizeOperandU64(GasOp);
uint64_t Non64Value = std::numeric_limits<uint64_t>::max();
normalizeOperandU64(GasOp, &Non64Value);
normalizeOffsetWithSize(ArgsOffsetOp, ArgsSizeOp);
normalizeOffsetWithSize(RetOffsetOp, RetSizeOp);

Expand Down