2 # salsa20_pm.s version 20051229
6 #include <linux/linkage.h>
10 # enter salsa20_encrypt_bytes
11 ENTRY(salsa20_encrypt_bytes)
27 movl 4(%esp,%eax),%edx
29 movl 8(%esp,%eax),%esi
31 movl 12(%esp,%eax),%edi
33 movl 16(%esp,%eax),%ebx
36 # goto done if unsigned<=
39 # in0 = *(uint32 *) (x + 0)
41 # in1 = *(uint32 *) (x + 4)
43 # in2 = *(uint32 *) (x + 8)
47 # in3 = *(uint32 *) (x + 12)
51 # in4 = *(uint32 *) (x + 16)
55 # in5 = *(uint32 *) (x + 20)
59 # in6 = *(uint32 *) (x + 24)
63 # in7 = *(uint32 *) (x + 28)
67 # in8 = *(uint32 *) (x + 32)
71 # in9 = *(uint32 *) (x + 36)
75 # in10 = *(uint32 *) (x + 40)
79 # in11 = *(uint32 *) (x + 44)
83 # in12 = *(uint32 *) (x + 48)
87 # in13 = *(uint32 *) (x + 52)
91 # in14 = *(uint32 *) (x + 56)
95 # in15 = *(uint32 *) (x + 60)
108 # goto nocopy if unsigned>=
116 # while (i) { *out++ = *m++; --i }
127 # bytes_backup = bytes
734 # goto mainloop if unsigned >
756 # in0 ^= *(uint32 *) (m + 0)
758 # in1 ^= *(uint32 *) (m + 4)
760 # *(uint32 *) (out + 0) = in0
762 # *(uint32 *) (out + 4) = in1
772 # in2 ^= *(uint32 *) (m + 8)
774 # in3 ^= *(uint32 *) (m + 12)
776 # *(uint32 *) (out + 8) = in2
778 # *(uint32 *) (out + 12) = in3
788 # in4 ^= *(uint32 *) (m + 16)
790 # in5 ^= *(uint32 *) (m + 20)
792 # *(uint32 *) (out + 16) = in4
794 # *(uint32 *) (out + 20) = in5
804 # in6 ^= *(uint32 *) (m + 24)
806 # in7 ^= *(uint32 *) (m + 28)
808 # *(uint32 *) (out + 24) = in6
810 # *(uint32 *) (out + 28) = in7
820 # in8 ^= *(uint32 *) (m + 32)
822 # in9 ^= *(uint32 *) (m + 36)
824 # *(uint32 *) (out + 32) = in8
826 # *(uint32 *) (out + 36) = in9
836 # in10 ^= *(uint32 *) (m + 40)
838 # in11 ^= *(uint32 *) (m + 44)
840 # *(uint32 *) (out + 40) = in10
842 # *(uint32 *) (out + 44) = in11
852 # in12 ^= *(uint32 *) (m + 48)
854 # in13 ^= *(uint32 *) (m + 52)
856 # *(uint32 *) (out + 48) = in12
858 # *(uint32 *) (out + 52) = in13
868 # in14 ^= *(uint32 *) (m + 56)
870 # in15 ^= *(uint32 *) (m + 60)
872 # *(uint32 *) (out + 56) = in14
874 # *(uint32 *) (out + 60) = in15
876 # bytes = bytes_backup
892 # goto bytesatleast65 if unsigned>
894 # goto bytesatleast64 if unsigned>=
902 # while (i) { *out++ = *m++; --i }
911 # *(uint32 *) (x + 32) = in8
913 # *(uint32 *) (x + 36) = in9
938 ENDPROC(salsa20_encrypt_bytes)