util file

This commit is contained in:
Nicholas Ward 2022-11-14 16:48:33 -08:00
parent df932544bd
commit 772dc5c9e7

View File

@ -0,0 +1,15 @@
// Load a 64-bit word from kernel general memory.
%macro mload_blake_word
// stack: offset
DUP1
%mload_kernel_general_u32
// stack: hi, offset
%shl_const(32)
// stack: hi << 32, offset
SWAP1
// stack: offset, hi << 32
%add_const(4)
%mload_kernel_general_u32
OR
// stack: (hi << 32) | lo
%endmacro