diff options
| author | cheapie <cheapiephp@gmail.com> | 2026-11-07 16:25:42 -0600 |
|---|---|---|
| committer | cheapie <cheapiephp@gmail.com> | 2026-11-07 16:25:42 -0600 |
| commit | 9ae11c52355e8a362d34d7cabfbc573ddf8c2f80 (patch) | |
| tree | d5543de18e410daa4f0efbcec323d1ad7f8513c9 /assembly/zknhtest/zknhtest.S | |
| parent | 15d38061302f61304e276f0045d8e4b3f1548e33 (diff) | |
| download | rvcontroller-9ae11c52355e8a362d34d7cabfbc573ddf8c2f80.tar rvcontroller-9ae11c52355e8a362d34d7cabfbc573ddf8c2f80.tar.gz rvcontroller-9ae11c52355e8a362d34d7cabfbc573ddf8c2f80.tar.bz2 rvcontroller-9ae11c52355e8a362d34d7cabfbc573ddf8c2f80.tar.xz rvcontroller-9ae11c52355e8a362d34d7cabfbc573ddf8c2f80.zip | |
Add Zknh
Diffstat (limited to 'assembly/zknhtest/zknhtest.S')
| -rw-r--r-- | assembly/zknhtest/zknhtest.S | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/assembly/zknhtest/zknhtest.S b/assembly/zknhtest/zknhtest.S new file mode 100644 index 0000000..98bd647 --- /dev/null +++ b/assembly/zknhtest/zknhtest.S @@ -0,0 +1,36 @@ +li a0,0x12345678 +sha256sig0 s0,a0 +sha256sig1 s1,a0 +sha256sum0 s4,a0 +sha256sum1 s5,a0 + +# Sigma0 +rori s2,a0,7 +rori t0,a0,18 +xor s2,s2,t0 +srli t0,a0,3 +xor s2,s2,t0 + +# Sigma1 +rori s3,a0,17 +rori t0,a0,19 +xor s3,s3,t0 +srli t0,a0,10 +xor s3,s3,t0 + +# Sum0 +rori s6,a0,2 +rori t0,a0,13 +xor s6,s6,t0 +rori t0,a0,22 +xor s6,s6,t0 + +# Sum1 +rori s7,a0,6 +rori t0,a0,11 +xor s7,s7,t0 +rori t0,a0,25 +xor s7,s7,t0 + +li a7,10 +ecall |
