Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Jul 24, 2024
1 parent d7b832d commit a4abea1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions evm_arithmetization/src/cpu/kernel/asm/core/util.asm
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@
%add_const(0x10000000000000000) // scale each context by 2^64
// stack: new_ctx
DUP1

// Memory addresses are represented as `ctx.2^64 + segment.2^32 + offset`,
// each address component expected to fit in a 32-bit limb.
// We enforce here that the new context id won't overflow.
PUSH 0xffffffffffffffffffffffff // 2^96 - 1
// stack: max, new_ctx, new_ctx
LT
%jumpi(fault_exception)

// stack: new_ctx
DUP1
%mstore_global_metadata(@GLOBAL_METADATA_LARGEST_CONTEXT)
Expand Down

0 comments on commit a4abea1

Please sign in to comment.