Daniel Lubarov
c03773bab1
Inline some SHA2 constants
...
I think `%mload_kernel_code_u32` is good when we need to do random access, but since the indices are constant here, let's just hardcode them like this.
This reduces the assembled size of `compression.asm` from 1827 to 1454 bytes. I think there's still a lot more we could do to shrink it, though it's not that important.
2022-10-03 14:59:33 -07:00
Daniel Lubarov
295bd60ee7
Merge pull request #752 from mir-protocol/hash_kernel
...
Fill in `hash_kernel`
2022-10-03 14:28:46 -07:00
Daniel Lubarov
5e32241543
Fill in hash_kernel
2022-10-03 14:12:05 -07:00
Nicholas Ward
43df58ea18
alphabetical
2022-10-03 14:10:10 -07:00
Nicholas Ward
9919562a64
clippy
2022-10-03 14:08:09 -07:00
Nicholas Ward
99fb730aea
rearranging and cleanup
2022-10-03 14:07:21 -07:00
Nicholas Ward
9ee861fb15
minor fixes
2022-10-03 13:43:03 -07:00
Nicholas Ward
6ff0b84e59
fix
2022-10-03 13:34:16 -07:00
Nicholas Ward
249fc6c1e4
fix
2022-10-03 13:34:16 -07:00
Nicholas Ward
416a7a868b
fmt
2022-10-03 13:34:16 -07:00
Nicholas Ward
69e33eff72
fix
2022-10-03 13:34:16 -07:00
Nicholas Ward
9f49521e22
label name simplification
2022-10-03 13:34:16 -07:00
Nicholas Ward
1e03c438e0
moved memory functions to memory ASM file (not sha2)
2022-10-03 13:34:16 -07:00
Nicholas Ward
1f3ee6dae2
remove prover_inputs from Interpreter
2022-10-03 13:34:16 -07:00
Nicholas Ward
fa01f83e65
Update evm/src/cpu/kernel/tests/sha2.rs
...
Co-authored-by: Dima V <50062893+typ3c4t@users.noreply.github.com>
2022-10-03 13:34:16 -07:00
Nicholas Ward
19b14c2723
Update evm/src/cpu/kernel/tests/sha2.rs
...
Co-authored-by: Dima V <50062893+typ3c4t@users.noreply.github.com>
2022-10-03 13:34:16 -07:00
Nicholas Ward
cfbc029e7b
cleaned up test: compare as U256, not string
2022-10-03 13:34:16 -07:00
Nicholas Ward
42320d815e
fix
2022-10-03 13:34:16 -07:00
Nicholas Ward
65b8993b6f
addressed comments
2022-10-03 13:34:16 -07:00
Nicholas Ward
c11c526462
cleanup and comments
2022-10-03 13:34:16 -07:00
Nicholas Ward
5d7edb33d4
comment
2022-10-03 13:34:16 -07:00
Nicholas Ward
7eba422792
addressed comments
2022-10-03 13:34:16 -07:00
Nicholas Ward
78a4b92e83
in %stack, treat identifiers as 1-length blocks
2022-10-03 13:34:16 -07:00
Nicholas Ward
7eadfee580
removed parentheses
2022-10-03 13:34:16 -07:00
Nicholas Ward
d1d404b989
addressed comments
2022-10-03 13:34:16 -07:00
Nicholas Ward
5cf8bf2ba3
more %stack sha2 cleanup
2022-10-03 13:34:16 -07:00
Nicholas Ward
140242c556
more %stack sha2 cleanup
2022-10-03 13:34:16 -07:00
Nicholas Ward
5ca5a3b3c8
more %stack
2022-10-03 13:34:16 -07:00
Nicholas Ward
d8f2e04c2b
more use of %stack macro to make sha2 cleaner
2022-10-03 13:34:16 -07:00
Nicholas Ward
e482bc7f0c
addressed comments
2022-10-03 13:34:16 -07:00
Nicholas Ward
83c959d91e
opcodes to uppercase, and cleanup
2022-10-03 13:34:16 -07:00
Nicholas Ward
2e3366d110
started on using %stack in sha2 asm
2022-10-03 13:34:16 -07:00
Nicholas Ward
fa3436b1a0
removed JUMPDESTs
2022-10-03 13:34:16 -07:00
Nicholas Ward
790b32c30b
fix
2022-10-03 13:34:16 -07:00
Nicholas Ward
cad56263f4
fix
2022-10-03 13:34:16 -07:00
Nicholas Ward
0eab1a4b0f
fmt
2022-10-03 13:34:16 -07:00
Nicholas Ward
e652ef922b
simplification and documentation
2022-10-03 13:34:16 -07:00
Nicholas Ward
9f923f7b6d
cleanup
2022-10-03 13:34:16 -07:00
Nicholas Ward
f3e48dcbfa
fmt
2022-10-03 13:34:16 -07:00
Nicholas Ward
fee0963eca
cleanup
2022-10-03 13:34:16 -07:00
Nicholas Ward
4b2f1a484e
split up sha2.asm file
2022-10-03 13:34:16 -07:00
Nicholas Ward
0394fa3fba
cleaned up test
2022-10-03 13:34:16 -07:00
Nicholas Ward
db71890045
randomized Sha2 test
2022-10-03 13:34:16 -07:00
Nicholas Ward
5b7575684c
fixes
2022-10-03 13:34:16 -07:00
Nicholas Ward
8ebf4c8f7c
more fixes
2022-10-03 13:34:16 -07:00
Nicholas Ward
67e19fd7c9
fix of message schedule
2022-10-03 13:34:16 -07:00
Nicholas Ward
b7c9f2cb5b
fmt
2022-10-03 13:34:16 -07:00
Nicholas Ward
8e067dcffc
cleanup
2022-10-03 13:34:16 -07:00
Nicholas Ward
0150c2f0b0
cleanup
2022-10-03 13:34:16 -07:00
Nicholas Ward
9f5d75fed4
fix
2022-10-03 13:34:16 -07:00