This commit is contained in:
Nicholas Ward 2022-12-12 17:36:21 -08:00
parent a564d7350c
commit 53004867b3
2 changed files with 12 additions and 12 deletions

View File

@ -269,21 +269,11 @@ compression_end:
// stack: h_0'', h_1'', h_2'', h_3'', h_4'', h_5'', h_6'', h_7'', cur_block + 1, retdest
// Combine hash values.
%shl_const(64)
OR
%shl_const(64)
OR
%shl_const(64)
OR
%u64s_to_u256
// stack: h_0'' || h_1'' || h_2'' || h_3'', h_4'', h_5'', h_6'', h_7'', cur_block + 1, retdest
%stack (first, second: 4, cur) -> (second, first)
// stack: h_4'', h_5'', h_6'', h_7'', h_0'' || h_1'' || h_2'' || h_3'', retdest
%shl_const(64)
OR
%shl_const(64)
OR
%shl_const(64)
OR
%u64s_to_u256
// stack: hash_second = h_4'' || h_5'' || h_6'' || h_7'', hash_first = h_0'' || h_1'' || h_2'' || h_3'', retdest
%stack (second, first, ret) -> (ret, second, first)
// stack: retdest, hash_first, hash_second

View File

@ -335,3 +335,13 @@
OR
// stack: word_inverted
%endmacro
// Combine four big-endian u64s into a u256.
%macro u64s_to_u256
// stack: a, b, c, d
%rep 3
%shl_const(64)
OR
%endrep
// stack: a || b || c || d
%endmacro