mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-10 17:53:06 +00:00
block_size macro
This commit is contained in:
parent
f3937e9977
commit
6ab6580058
@ -20,7 +20,7 @@
|
||||
// stack: 0
|
||||
%mload_kernel_general
|
||||
// stack: num_blocks
|
||||
%mul_const(128)
|
||||
%block_size
|
||||
%add_const(2)
|
||||
// stack: num_bytes+2
|
||||
%endmacro
|
||||
@ -36,3 +36,8 @@
|
||||
%blake2b_internal_state_addr
|
||||
%add_const(16)
|
||||
%endmacro
|
||||
|
||||
// Block size is 128 bytes.
|
||||
%macro block_size
|
||||
%mul_const(128)
|
||||
%endmacro
|
||||
@ -42,7 +42,7 @@ compression_loop:
|
||||
DUP2
|
||||
// stack: cur_block, is_last_block * num_bytes, cur_block, is_last_block, retdest
|
||||
%increment
|
||||
%mul_const(128)
|
||||
%block_size
|
||||
// stack: (cur_block + 1) * 128, is_last_block * num_bytes, cur_block, is_last_block, retdest
|
||||
DUP4
|
||||
// stack: is_last_block, (cur_block + 1) * 128, is_last_block * num_bytes, cur_block, is_last_block, retdest
|
||||
@ -56,7 +56,7 @@ compression_loop:
|
||||
// stack: cur_block, t, is_last_block, retdest
|
||||
DUP1
|
||||
// stack: cur_block, cur_block, t, is_last_block, retdest
|
||||
%mul_const(128)
|
||||
%block_size
|
||||
%add_const(2)
|
||||
// stack: cur_block_start_byte, t, cur_block, is_last_block, retdest
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user