mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-04 06:43:07 +00:00
addressed comments
This commit is contained in:
parent
3b7ad771e0
commit
e40b9edb5b
@ -1,6 +1,6 @@
|
||||
global precompile_blake2_f:
|
||||
// stack: address, retdest, new_ctx, (old stack)
|
||||
%pop2
|
||||
// stack: retdest, new_ctx, (old stack)
|
||||
POP
|
||||
// stack: new_ctx, (old stack)
|
||||
DUP1
|
||||
SET_CONTEXT
|
||||
@ -17,7 +17,7 @@ global precompile_blake2_f:
|
||||
// stack: calldatasize, blake2_f_contd, kexit_info
|
||||
DUP1
|
||||
// stack: calldatasize, calldatasize, blake2_f_contd, kexit_info
|
||||
%assert_eq_const(213)
|
||||
%eq_const(213) ISZERO %jumpi(fault_exception)
|
||||
// stack: calldatasize, blake2_f_contd, kexit_info
|
||||
%decrement
|
||||
// stack: flag_addr=212, blake2_f_contd, kexit_info
|
||||
@ -25,9 +25,13 @@ global precompile_blake2_f:
|
||||
// stack: flag_addr, flag_addr, blake2_f_contd, kexit_info
|
||||
PUSH @SEGMENT_CALLDATA
|
||||
GET_CONTEXT
|
||||
// stack: ctx, @SEGMENT_CALLDATA, flag_addr, flag_addr size
|
||||
// stack: ctx, @SEGMENT_CALLDATA, flag_addr, flag_addr, blake2_f_contd, kexit_info
|
||||
MLOAD_GENERAL
|
||||
// stack: flag, flag_addr, blake2_f_contd, kexit_info
|
||||
DUP1
|
||||
// stack: flag, flag, flag_addr, blake2_f_contd, kexit_info
|
||||
%lt_const(2) ISZERO %jumpi(fault_exception) // Check flag < 2 (flag = 0 or flag = 1)
|
||||
// stack: flag, flag_addr, blake2_f_contd, kexit_info
|
||||
SWAP1
|
||||
// stack: flag_addr, flag, blake2_f_contd, kexit_info
|
||||
%sub_const(8)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user