diff options
Diffstat (limited to 'nacl/crypto_scalarmult/curve25519/athlon/todouble.s')
-rw-r--r-- | nacl/crypto_scalarmult/curve25519/athlon/todouble.s | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/nacl/crypto_scalarmult/curve25519/athlon/todouble.s b/nacl/crypto_scalarmult/curve25519/athlon/todouble.s new file mode 100644 index 00000000..c37aa447 --- /dev/null +++ b/nacl/crypto_scalarmult/curve25519/athlon/todouble.s | |||
@@ -0,0 +1,144 @@ | |||
1 | .text | ||
2 | .p2align 5 | ||
3 | .globl _crypto_scalarmult_curve25519_athlon_todouble | ||
4 | .globl crypto_scalarmult_curve25519_athlon_todouble | ||
5 | _crypto_scalarmult_curve25519_athlon_todouble: | ||
6 | crypto_scalarmult_curve25519_athlon_todouble: | ||
7 | mov %esp,%eax | ||
8 | and $31,%eax | ||
9 | add $96,%eax | ||
10 | sub %eax,%esp | ||
11 | movl 8(%esp,%eax),%ecx | ||
12 | movl 0(%ecx),%edx | ||
13 | movl $0x43300000,4(%esp) | ||
14 | movl %edx,0(%esp) | ||
15 | movl 4(%ecx),%edx | ||
16 | and $0xffffff,%edx | ||
17 | movl $0x45300000,12(%esp) | ||
18 | movl %edx,8(%esp) | ||
19 | movl 7(%ecx),%edx | ||
20 | and $0xffffff,%edx | ||
21 | movl $0x46b00000,20(%esp) | ||
22 | movl %edx,16(%esp) | ||
23 | movl 10(%ecx),%edx | ||
24 | and $0xffffff,%edx | ||
25 | movl $0x48300000,28(%esp) | ||
26 | movl %edx,24(%esp) | ||
27 | movl 13(%ecx),%edx | ||
28 | and $0xffffff,%edx | ||
29 | movl $0x49b00000,36(%esp) | ||
30 | movl %edx,32(%esp) | ||
31 | movl 16(%ecx),%edx | ||
32 | movl $0x4b300000,44(%esp) | ||
33 | movl %edx,40(%esp) | ||
34 | movl 20(%ecx),%edx | ||
35 | and $0xffffff,%edx | ||
36 | movl $0x4d300000,52(%esp) | ||
37 | movl %edx,48(%esp) | ||
38 | movl 23(%ecx),%edx | ||
39 | and $0xffffff,%edx | ||
40 | movl $0x4eb00000,60(%esp) | ||
41 | movl %edx,56(%esp) | ||
42 | movl 26(%ecx),%edx | ||
43 | and $0xffffff,%edx | ||
44 | movl $0x50300000,68(%esp) | ||
45 | movl %edx,64(%esp) | ||
46 | movl 28(%ecx),%ecx | ||
47 | shr $8,%ecx | ||
48 | and $0x7fffff,%ecx | ||
49 | movl $0x51b00000,76(%esp) | ||
50 | movl %ecx,72(%esp) | ||
51 | movl 4(%esp,%eax),%ecx | ||
52 | fldl 72(%esp) | ||
53 | fsubl crypto_scalarmult_curve25519_athlon_in9offset | ||
54 | fldl crypto_scalarmult_curve25519_athlon_alpha255 | ||
55 | fadd %st(1),%st(0) | ||
56 | fsubl crypto_scalarmult_curve25519_athlon_alpha255 | ||
57 | fsubr %st(0),%st(1) | ||
58 | fldl 0(%esp) | ||
59 | fsubl crypto_scalarmult_curve25519_athlon_in0offset | ||
60 | fxch %st(1) | ||
61 | fmull crypto_scalarmult_curve25519_athlon_scale | ||
62 | faddp %st(0),%st(1) | ||
63 | fldl crypto_scalarmult_curve25519_athlon_alpha26 | ||
64 | fadd %st(1),%st(0) | ||
65 | fsubl crypto_scalarmult_curve25519_athlon_alpha26 | ||
66 | fsubr %st(0),%st(1) | ||
67 | fxch %st(1) | ||
68 | fstpl 0(%ecx) | ||
69 | fldl 8(%esp) | ||
70 | fsubl crypto_scalarmult_curve25519_athlon_in1offset | ||
71 | faddp %st(0),%st(1) | ||
72 | fldl crypto_scalarmult_curve25519_athlon_alpha51 | ||
73 | fadd %st(1),%st(0) | ||
74 | fsubl crypto_scalarmult_curve25519_athlon_alpha51 | ||
75 | fsubr %st(0),%st(1) | ||
76 | fxch %st(1) | ||
77 | fstpl 8(%ecx) | ||
78 | fldl 16(%esp) | ||
79 | fsubl crypto_scalarmult_curve25519_athlon_in2offset | ||
80 | faddp %st(0),%st(1) | ||
81 | fldl crypto_scalarmult_curve25519_athlon_alpha77 | ||
82 | fadd %st(1),%st(0) | ||
83 | fsubl crypto_scalarmult_curve25519_athlon_alpha77 | ||
84 | fsubr %st(0),%st(1) | ||
85 | fxch %st(1) | ||
86 | fstpl 16(%ecx) | ||
87 | fldl 24(%esp) | ||
88 | fsubl crypto_scalarmult_curve25519_athlon_in3offset | ||
89 | faddp %st(0),%st(1) | ||
90 | fldl crypto_scalarmult_curve25519_athlon_alpha102 | ||
91 | fadd %st(1),%st(0) | ||
92 | fsubl crypto_scalarmult_curve25519_athlon_alpha102 | ||
93 | fsubr %st(0),%st(1) | ||
94 | fxch %st(1) | ||
95 | fstpl 24(%ecx) | ||
96 | fldl 32(%esp) | ||
97 | fsubl crypto_scalarmult_curve25519_athlon_in4offset | ||
98 | faddp %st(0),%st(1) | ||
99 | fldl crypto_scalarmult_curve25519_athlon_alpha128 | ||
100 | fadd %st(1),%st(0) | ||
101 | fsubl crypto_scalarmult_curve25519_athlon_alpha128 | ||
102 | fsubr %st(0),%st(1) | ||
103 | fxch %st(1) | ||
104 | fstpl 32(%ecx) | ||
105 | fldl 40(%esp) | ||
106 | fsubl crypto_scalarmult_curve25519_athlon_in5offset | ||
107 | faddp %st(0),%st(1) | ||
108 | fldl crypto_scalarmult_curve25519_athlon_alpha153 | ||
109 | fadd %st(1),%st(0) | ||
110 | fsubl crypto_scalarmult_curve25519_athlon_alpha153 | ||
111 | fsubr %st(0),%st(1) | ||
112 | fxch %st(1) | ||
113 | fstpl 40(%ecx) | ||
114 | fldl 48(%esp) | ||
115 | fsubl crypto_scalarmult_curve25519_athlon_in6offset | ||
116 | faddp %st(0),%st(1) | ||
117 | fldl crypto_scalarmult_curve25519_athlon_alpha179 | ||
118 | fadd %st(1),%st(0) | ||
119 | fsubl crypto_scalarmult_curve25519_athlon_alpha179 | ||
120 | fsubr %st(0),%st(1) | ||
121 | fxch %st(1) | ||
122 | fstpl 48(%ecx) | ||
123 | fldl 56(%esp) | ||
124 | fsubl crypto_scalarmult_curve25519_athlon_in7offset | ||
125 | faddp %st(0),%st(1) | ||
126 | fldl crypto_scalarmult_curve25519_athlon_alpha204 | ||
127 | fadd %st(1),%st(0) | ||
128 | fsubl crypto_scalarmult_curve25519_athlon_alpha204 | ||
129 | fsubr %st(0),%st(1) | ||
130 | fxch %st(1) | ||
131 | fstpl 56(%ecx) | ||
132 | fldl 64(%esp) | ||
133 | fsubl crypto_scalarmult_curve25519_athlon_in8offset | ||
134 | faddp %st(0),%st(1) | ||
135 | fldl crypto_scalarmult_curve25519_athlon_alpha230 | ||
136 | fadd %st(1),%st(0) | ||
137 | fsubl crypto_scalarmult_curve25519_athlon_alpha230 | ||
138 | fsubr %st(0),%st(1) | ||
139 | fxch %st(1) | ||
140 | fstpl 64(%ecx) | ||
141 | faddp %st(0),%st(1) | ||
142 | fstpl 72(%ecx) | ||
143 | add %eax,%esp | ||
144 | ret | ||