1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/linkage.h>
4 # enter salsa20_encrypt_bytes
5 ENTRY(salsa20_encrypt_bytes)
18 # unsigned>? bytes - 0
20 # comment:fp stack unchanged by jump
21 # goto done if !unsigned>
23 # comment:fp stack unchanged by fallthrough
40 # in0 = *(uint64 *) (x + 0)
42 # in2 = *(uint64 *) (x + 8)
44 # in4 = *(uint64 *) (x + 16)
46 # in6 = *(uint64 *) (x + 24)
48 # in8 = *(uint64 *) (x + 32)
50 # in10 = *(uint64 *) (x + 40)
52 # in12 = *(uint64 *) (x + 48)
54 # in14 = *(uint64 *) (x + 56)
76 # unsigned<? bytes - 64
78 # comment:fp stack unchanged by jump
79 # goto nocopy if !unsigned<
87 # while (i) { *out++ = *m++; --i }
93 # comment:fp stack unchanged by fallthrough
100 # bytes_backup = bytes
140 # (uint64) x11 >>= 32
146 # (uint64) x13 >>= 32
152 # (uint64) x15 >>= 32
598 # comment:fp stack unchanged by jump
599 # goto mainloop if unsigned>
637 # (uint32) x12 += j12
643 # (uint64) x13 >>= 32
677 # (uint32) x10 += j10
683 # (uint64) x11 >>= 32
691 # (uint32) x14 += j14
697 # (uint64) x15 >>= 32
707 # x0 ^= *(uint64 *) (m + 0)
709 # *(uint64 *) (out + 0) = x0
711 # x2 ^= *(uint64 *) (m + 8)
713 # *(uint64 *) (out + 8) = x2
715 # x4 ^= *(uint64 *) (m + 16)
717 # *(uint64 *) (out + 16) = x4
719 # x6 ^= *(uint64 *) (m + 24)
721 # *(uint64 *) (out + 24) = x6
723 # x8 ^= *(uint64 *) (m + 32)
725 # *(uint64 *) (out + 32) = x8
727 # x10 ^= *(uint64 *) (m + 40)
729 # *(uint64 *) (out + 40) = x10
731 # x12 ^= *(uint64 *) (m + 48)
733 # *(uint64 *) (out + 48) = x12
735 # x14 ^= *(uint64 *) (m + 56)
737 # *(uint64 *) (out + 56) = x14
739 # bytes = bytes_backup
747 # unsigned>? unsigned<? bytes - 64
749 # comment:fp stack unchanged by jump
750 # goto bytesatleast65 if unsigned>
752 # comment:fp stack unchanged by jump
753 # goto bytesatleast64 if !unsigned<
761 # while (i) { *out++ = *m++; --i }
763 # comment:fp stack unchanged by fallthrough
770 # *(uint64 *) (x + 32) = in8
786 # comment:fp stack unchanged by fallthrough
802 # comment:fp stack unchanged by jump
805 ENDPROC(salsa20_encrypt_bytes)