Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Oct 26, 2023
1 parent e74045a commit 530a1d9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions evm/src/cpu/kernel/asm/memory/syscalls.asm
Original file line number Diff line number Diff line change
Expand Up @@ -221,20 +221,20 @@ global sys_mcopy:
// stack: Gverylow, kexit_info, dest_offset, offset, size
DUP5 %num_bytes_to_num_words %mul_const(@GAS_COPY) ADD %charge_gas

// stack: kexit_info, dest_offset, offset, size
DUP4
// stack: size, kexit_info, dest_offset, offset, size
ISZERO %jumpi(returndatacopy_empty) // If size is empty, just pop the stack and exit the kernel

%stack (kexit_info, dest_offset, offset, size) -> (dest_offset, size, kexit_info, dest_offset, offset, size)
%add_or_fault
// stack: expanded_num_bytes, kexit_info, dest_offset, offset, size, kexit_info
DUP1 %ensure_reasonable_offset
%update_mem_bytes

// stack: kexit_info, dest_offset, offset, size
DUP4
// stack: size, kexit_info, dest_offset, offset, size
ISZERO %jumpi(returndatacopy_empty) // If size is empty, just pop the stack and exit the kernel

// stack: kexit_info, dest_offset, offset, size
// stack: kexit_info, dest_offset, offset, size
DUP3 DUP3 EQ
// stack: dest_offset = offset, kexit_info, dest_offset, offset, size
// stack: dest_offset = offset, kexit_info, dest_offset, offset, size
%jumpi(returndatacopy_empty) // If SRC == DST, just pop the stack and exit the kernel

// stack: kexit_info, dest_offset, offset, size
Expand Down

0 comments on commit 530a1d9

Please sign in to comment.