diff options
-rw-r--r-- | src/lib/libcrypto/whrlpool/asm/wp-mmx.pl | 495 | ||||
-rw-r--r-- | src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl | 483 |
2 files changed, 0 insertions, 978 deletions
diff --git a/src/lib/libcrypto/whrlpool/asm/wp-mmx.pl b/src/lib/libcrypto/whrlpool/asm/wp-mmx.pl deleted file mode 100644 index a54d702c3f..0000000000 --- a/src/lib/libcrypto/whrlpool/asm/wp-mmx.pl +++ /dev/null | |||
@@ -1,495 +0,0 @@ | |||
1 | #!/usr/bin/env perl | ||
2 | # | ||
3 | # ==================================================================== | ||
4 | # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL | ||
5 | # project. Rights for redistribution and usage in source and binary | ||
6 | # forms are granted according to the OpenSSL license. | ||
7 | # ==================================================================== | ||
8 | # | ||
9 | # whirlpool_block_mmx implementation. | ||
10 | # | ||
11 | *SCALE=\(2); # 2 or 8, that is the question:-) Value of 8 results | ||
12 | # in 16KB large table, which is tough on L1 cache, but eliminates | ||
13 | # unaligned references to it. Value of 2 results in 4KB table, but | ||
14 | # 7/8 of references to it are unaligned. AMD cores seem to be | ||
15 | # allergic to the latter, while Intel ones - to former [see the | ||
16 | # table]. I stick to value of 2 for two reasons: 1. smaller table | ||
17 | # minimizes cache trashing and thus mitigates the hazard of side- | ||
18 | # channel leakage similar to AES cache-timing one; 2. performance | ||
19 | # gap among different µ-archs is smaller. | ||
20 | # | ||
21 | # Performance table lists rounded amounts of CPU cycles spent by | ||
22 | # whirlpool_block_mmx routine on single 64 byte input block, i.e. | ||
23 | # smaller is better and asymptotic throughput can be estimated by | ||
24 | # multiplying 64 by CPU clock frequency and dividing by relevant | ||
25 | # value from the given table: | ||
26 | # | ||
27 | # $SCALE=2/8 icc8 gcc3 | ||
28 | # Intel P4 3200/4600 4600(*) 6400 | ||
29 | # Intel PIII 2900/3000 4900 5400 | ||
30 | # AMD K[78] 2500/1800 9900 8200(**) | ||
31 | # | ||
32 | # (*) I've sketched even non-MMX assembler, but for the record | ||
33 | # I've failed to beat the Intel compiler on P4, without using | ||
34 | # MMX that is... | ||
35 | # (**) ... on AMD on the other hand non-MMX assembler was observed | ||
36 | # to perform significantly better, but I figured this MMX | ||
37 | # implementation is even faster anyway, so why bother? As for | ||
38 | # pre-MMX AMD core[s], the improvement coefficient is more | ||
39 | # than likely to vary anyway and I don't know how. But the | ||
40 | # least I know is that gcc-generated code compiled with | ||
41 | # -DL_ENDIAN and -DOPENSSL_SMALL_FOOTPRINT [see C module for | ||
42 | # details] and optimized for Pentium was observed to perform | ||
43 | # *better* on Pentium 100 than unrolled non-MMX assembler | ||
44 | # loop... So we just say that I don't know if maintaining | ||
45 | # non-MMX implementation would actually pay off, but till | ||
46 | # opposite is proved "unlikely" is assumed. | ||
47 | |||
48 | $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; | ||
49 | push(@INC,"${dir}","${dir}../../perlasm"); | ||
50 | require "x86asm.pl"; | ||
51 | |||
52 | &asm_init($ARGV[0],"wp-mmx.pl"); | ||
53 | |||
54 | sub L() { &data_byte(@_); } | ||
55 | sub LL() | ||
56 | { if ($SCALE==2) { &data_byte(@_); &data_byte(@_); } | ||
57 | elsif ($SCALE==8) { for ($i=0;$i<8;$i++) { | ||
58 | &data_byte(@_); | ||
59 | unshift(@_,pop(@_)); | ||
60 | } | ||
61 | } | ||
62 | else { die "invalid SCALE value"; } | ||
63 | } | ||
64 | |||
65 | sub scale() | ||
66 | { if ($SCALE==2) { &lea(@_[0],&DWP(0,@_[1],@_[1])); } | ||
67 | elsif ($SCALE==8) { &lea(@_[0],&DWP(0,"",@_[1],8)); } | ||
68 | else { die "invalid SCALE value"; } | ||
69 | } | ||
70 | |||
71 | sub row() | ||
72 | { if ($SCALE==2) { ((8-shift)&7); } | ||
73 | elsif ($SCALE==8) { (8*shift); } | ||
74 | else { die "invalid SCALE value"; } | ||
75 | } | ||
76 | |||
77 | $tbl="ebp"; | ||
78 | @mm=("mm0","mm1","mm2","mm3","mm4","mm5","mm6","mm7"); | ||
79 | |||
80 | &static_label("table"); | ||
81 | |||
82 | &function_begin_B("whirlpool_block_mmx"); | ||
83 | &push ("ebp"); | ||
84 | &push ("ebx"); | ||
85 | &push ("esi"); | ||
86 | &push ("edi"); | ||
87 | |||
88 | &mov ("esi",&wparam(0)); # hash value | ||
89 | &mov ("edi",&wparam(1)); # input data stream | ||
90 | &mov ("ebp",&wparam(2)); # number of chunks in input | ||
91 | |||
92 | &mov ("eax","esp"); # copy stack pointer | ||
93 | &sub ("esp",128+20); # allocate frame | ||
94 | &and ("esp",-64); # align for cache-line | ||
95 | |||
96 | &lea ("ebx",&DWP(128,"esp")); | ||
97 | &mov (&DWP(0,"ebx"),"esi"); # save parameter block | ||
98 | &mov (&DWP(4,"ebx"),"edi"); | ||
99 | &mov (&DWP(8,"ebx"),"ebp"); | ||
100 | &mov (&DWP(16,"ebx"),"eax"); # saved stack pointer | ||
101 | |||
102 | &picsetup($tbl); | ||
103 | &picsymbol($tbl, &label("table"), $tbl); | ||
104 | |||
105 | &xor ("ecx","ecx"); | ||
106 | &xor ("edx","edx"); | ||
107 | |||
108 | for($i=0;$i<8;$i++) { &movq(@mm[$i],&QWP($i*8,"esi")); } # L=H | ||
109 | &set_label("outerloop"); | ||
110 | for($i=0;$i<8;$i++) { &movq(&QWP($i*8,"esp"),@mm[$i]); } # K=L | ||
111 | for($i=0;$i<8;$i++) { &pxor(@mm[$i],&QWP($i*8,"edi")); } # L^=inp | ||
112 | for($i=0;$i<8;$i++) { &movq(&QWP(64+$i*8,"esp"),@mm[$i]); } # S=L | ||
113 | |||
114 | &xor ("esi","esi"); | ||
115 | &mov (&DWP(12,"ebx"),"esi"); # zero round counter | ||
116 | |||
117 | &set_label("round",16); | ||
118 | &movq (@mm[0],&QWP(2048*$SCALE,$tbl,"esi",8)); # rc[r] | ||
119 | &mov ("eax",&DWP(0,"esp")); | ||
120 | &mov ("ebx",&DWP(4,"esp")); | ||
121 | for($i=0;$i<8;$i++) { | ||
122 | my $func = ($i==0)? \&movq : \&pxor; | ||
123 | &movb (&LB("ecx"),&LB("eax")); | ||
124 | &movb (&LB("edx"),&HB("eax")); | ||
125 | &scale ("esi","ecx"); | ||
126 | &scale ("edi","edx"); | ||
127 | &shr ("eax",16); | ||
128 | &pxor (@mm[0],&QWP(&row(0),$tbl,"esi",8)); | ||
129 | &$func (@mm[1],&QWP(&row(1),$tbl,"edi",8)); | ||
130 | &movb (&LB("ecx"),&LB("eax")); | ||
131 | &movb (&LB("edx"),&HB("eax")); | ||
132 | &mov ("eax",&DWP(($i+1)*8,"esp")); | ||
133 | &scale ("esi","ecx"); | ||
134 | &scale ("edi","edx"); | ||
135 | &$func (@mm[2],&QWP(&row(2),$tbl,"esi",8)); | ||
136 | &$func (@mm[3],&QWP(&row(3),$tbl,"edi",8)); | ||
137 | &movb (&LB("ecx"),&LB("ebx")); | ||
138 | &movb (&LB("edx"),&HB("ebx")); | ||
139 | &scale ("esi","ecx"); | ||
140 | &scale ("edi","edx"); | ||
141 | &shr ("ebx",16); | ||
142 | &$func (@mm[4],&QWP(&row(4),$tbl,"esi",8)); | ||
143 | &$func (@mm[5],&QWP(&row(5),$tbl,"edi",8)); | ||
144 | &movb (&LB("ecx"),&LB("ebx")); | ||
145 | &movb (&LB("edx"),&HB("ebx")); | ||
146 | &mov ("ebx",&DWP(($i+1)*8+4,"esp")); | ||
147 | &scale ("esi","ecx"); | ||
148 | &scale ("edi","edx"); | ||
149 | &$func (@mm[6],&QWP(&row(6),$tbl,"esi",8)); | ||
150 | &$func (@mm[7],&QWP(&row(7),$tbl,"edi",8)); | ||
151 | push(@mm,shift(@mm)); | ||
152 | } | ||
153 | |||
154 | for($i=0;$i<8;$i++) { &movq(&QWP($i*8,"esp"),@mm[$i]); } # K=L | ||
155 | |||
156 | for($i=0;$i<8;$i++) { | ||
157 | &movb (&LB("ecx"),&LB("eax")); | ||
158 | &movb (&LB("edx"),&HB("eax")); | ||
159 | &scale ("esi","ecx"); | ||
160 | &scale ("edi","edx"); | ||
161 | &shr ("eax",16); | ||
162 | &pxor (@mm[0],&QWP(&row(0),$tbl,"esi",8)); | ||
163 | &pxor (@mm[1],&QWP(&row(1),$tbl,"edi",8)); | ||
164 | &movb (&LB("ecx"),&LB("eax")); | ||
165 | &movb (&LB("edx"),&HB("eax")); | ||
166 | &mov ("eax",&DWP(64+($i+1)*8,"esp")) if ($i<7); | ||
167 | &scale ("esi","ecx"); | ||
168 | &scale ("edi","edx"); | ||
169 | &pxor (@mm[2],&QWP(&row(2),$tbl,"esi",8)); | ||
170 | &pxor (@mm[3],&QWP(&row(3),$tbl,"edi",8)); | ||
171 | &movb (&LB("ecx"),&LB("ebx")); | ||
172 | &movb (&LB("edx"),&HB("ebx")); | ||
173 | &scale ("esi","ecx"); | ||
174 | &scale ("edi","edx"); | ||
175 | &shr ("ebx",16); | ||
176 | &pxor (@mm[4],&QWP(&row(4),$tbl,"esi",8)); | ||
177 | &pxor (@mm[5],&QWP(&row(5),$tbl,"edi",8)); | ||
178 | &movb (&LB("ecx"),&LB("ebx")); | ||
179 | &movb (&LB("edx"),&HB("ebx")); | ||
180 | &mov ("ebx",&DWP(64+($i+1)*8+4,"esp")) if ($i<7); | ||
181 | &scale ("esi","ecx"); | ||
182 | &scale ("edi","edx"); | ||
183 | &pxor (@mm[6],&QWP(&row(6),$tbl,"esi",8)); | ||
184 | &pxor (@mm[7],&QWP(&row(7),$tbl,"edi",8)); | ||
185 | push(@mm,shift(@mm)); | ||
186 | } | ||
187 | &lea ("ebx",&DWP(128,"esp")); | ||
188 | &mov ("esi",&DWP(12,"ebx")); # pull round counter | ||
189 | &add ("esi",1); | ||
190 | &cmp ("esi",10); | ||
191 | &je (&label("roundsdone")); | ||
192 | |||
193 | &mov (&DWP(12,"ebx"),"esi"); # update round counter | ||
194 | for($i=0;$i<8;$i++) { &movq(&QWP(64+$i*8,"esp"),@mm[$i]); } # S=L | ||
195 | &jmp (&label("round")); | ||
196 | |||
197 | &set_label("roundsdone",16); | ||
198 | &mov ("esi",&DWP(0,"ebx")); # reload argument block | ||
199 | &mov ("edi",&DWP(4,"ebx")); | ||
200 | &mov ("eax",&DWP(8,"ebx")); | ||
201 | |||
202 | for($i=0;$i<8;$i++) { &pxor(@mm[$i],&QWP($i*8,"edi")); } # L^=inp | ||
203 | for($i=0;$i<8;$i++) { &pxor(@mm[$i],&QWP($i*8,"esi")); } # L^=H | ||
204 | for($i=0;$i<8;$i++) { &movq(&QWP($i*8,"esi"),@mm[$i]); } # H=L | ||
205 | |||
206 | &lea ("edi",&DWP(64,"edi")); # inp+=64 | ||
207 | &sub ("eax",1); # num-- | ||
208 | &jz (&label("alldone")); | ||
209 | &mov (&DWP(4,"ebx"),"edi"); # update argument block | ||
210 | &mov (&DWP(8,"ebx"),"eax"); | ||
211 | &jmp (&label("outerloop")); | ||
212 | |||
213 | &set_label("alldone"); | ||
214 | &emms (); | ||
215 | &mov ("esp",&DWP(16,"ebx")); # restore saved stack pointer | ||
216 | &pop ("edi"); | ||
217 | &pop ("esi"); | ||
218 | &pop ("ebx"); | ||
219 | &pop ("ebp"); | ||
220 | &ret (); | ||
221 | &function_end_B("whirlpool_block_mmx"); | ||
222 | |||
223 | &rodataseg(); | ||
224 | &align(64); | ||
225 | &set_label("table"); | ||
226 | &LL(0x18,0x18,0x60,0x18,0xc0,0x78,0x30,0xd8); | ||
227 | &LL(0x23,0x23,0x8c,0x23,0x05,0xaf,0x46,0x26); | ||
228 | &LL(0xc6,0xc6,0x3f,0xc6,0x7e,0xf9,0x91,0xb8); | ||
229 | &LL(0xe8,0xe8,0x87,0xe8,0x13,0x6f,0xcd,0xfb); | ||
230 | &LL(0x87,0x87,0x26,0x87,0x4c,0xa1,0x13,0xcb); | ||
231 | &LL(0xb8,0xb8,0xda,0xb8,0xa9,0x62,0x6d,0x11); | ||
232 | &LL(0x01,0x01,0x04,0x01,0x08,0x05,0x02,0x09); | ||
233 | &LL(0x4f,0x4f,0x21,0x4f,0x42,0x6e,0x9e,0x0d); | ||
234 | &LL(0x36,0x36,0xd8,0x36,0xad,0xee,0x6c,0x9b); | ||
235 | &LL(0xa6,0xa6,0xa2,0xa6,0x59,0x04,0x51,0xff); | ||
236 | &LL(0xd2,0xd2,0x6f,0xd2,0xde,0xbd,0xb9,0x0c); | ||
237 | &LL(0xf5,0xf5,0xf3,0xf5,0xfb,0x06,0xf7,0x0e); | ||
238 | &LL(0x79,0x79,0xf9,0x79,0xef,0x80,0xf2,0x96); | ||
239 | &LL(0x6f,0x6f,0xa1,0x6f,0x5f,0xce,0xde,0x30); | ||
240 | &LL(0x91,0x91,0x7e,0x91,0xfc,0xef,0x3f,0x6d); | ||
241 | &LL(0x52,0x52,0x55,0x52,0xaa,0x07,0xa4,0xf8); | ||
242 | &LL(0x60,0x60,0x9d,0x60,0x27,0xfd,0xc0,0x47); | ||
243 | &LL(0xbc,0xbc,0xca,0xbc,0x89,0x76,0x65,0x35); | ||
244 | &LL(0x9b,0x9b,0x56,0x9b,0xac,0xcd,0x2b,0x37); | ||
245 | &LL(0x8e,0x8e,0x02,0x8e,0x04,0x8c,0x01,0x8a); | ||
246 | &LL(0xa3,0xa3,0xb6,0xa3,0x71,0x15,0x5b,0xd2); | ||
247 | &LL(0x0c,0x0c,0x30,0x0c,0x60,0x3c,0x18,0x6c); | ||
248 | &LL(0x7b,0x7b,0xf1,0x7b,0xff,0x8a,0xf6,0x84); | ||
249 | &LL(0x35,0x35,0xd4,0x35,0xb5,0xe1,0x6a,0x80); | ||
250 | &LL(0x1d,0x1d,0x74,0x1d,0xe8,0x69,0x3a,0xf5); | ||
251 | &LL(0xe0,0xe0,0xa7,0xe0,0x53,0x47,0xdd,0xb3); | ||
252 | &LL(0xd7,0xd7,0x7b,0xd7,0xf6,0xac,0xb3,0x21); | ||
253 | &LL(0xc2,0xc2,0x2f,0xc2,0x5e,0xed,0x99,0x9c); | ||
254 | &LL(0x2e,0x2e,0xb8,0x2e,0x6d,0x96,0x5c,0x43); | ||
255 | &LL(0x4b,0x4b,0x31,0x4b,0x62,0x7a,0x96,0x29); | ||
256 | &LL(0xfe,0xfe,0xdf,0xfe,0xa3,0x21,0xe1,0x5d); | ||
257 | &LL(0x57,0x57,0x41,0x57,0x82,0x16,0xae,0xd5); | ||
258 | &LL(0x15,0x15,0x54,0x15,0xa8,0x41,0x2a,0xbd); | ||
259 | &LL(0x77,0x77,0xc1,0x77,0x9f,0xb6,0xee,0xe8); | ||
260 | &LL(0x37,0x37,0xdc,0x37,0xa5,0xeb,0x6e,0x92); | ||
261 | &LL(0xe5,0xe5,0xb3,0xe5,0x7b,0x56,0xd7,0x9e); | ||
262 | &LL(0x9f,0x9f,0x46,0x9f,0x8c,0xd9,0x23,0x13); | ||
263 | &LL(0xf0,0xf0,0xe7,0xf0,0xd3,0x17,0xfd,0x23); | ||
264 | &LL(0x4a,0x4a,0x35,0x4a,0x6a,0x7f,0x94,0x20); | ||
265 | &LL(0xda,0xda,0x4f,0xda,0x9e,0x95,0xa9,0x44); | ||
266 | &LL(0x58,0x58,0x7d,0x58,0xfa,0x25,0xb0,0xa2); | ||
267 | &LL(0xc9,0xc9,0x03,0xc9,0x06,0xca,0x8f,0xcf); | ||
268 | &LL(0x29,0x29,0xa4,0x29,0x55,0x8d,0x52,0x7c); | ||
269 | &LL(0x0a,0x0a,0x28,0x0a,0x50,0x22,0x14,0x5a); | ||
270 | &LL(0xb1,0xb1,0xfe,0xb1,0xe1,0x4f,0x7f,0x50); | ||
271 | &LL(0xa0,0xa0,0xba,0xa0,0x69,0x1a,0x5d,0xc9); | ||
272 | &LL(0x6b,0x6b,0xb1,0x6b,0x7f,0xda,0xd6,0x14); | ||
273 | &LL(0x85,0x85,0x2e,0x85,0x5c,0xab,0x17,0xd9); | ||
274 | &LL(0xbd,0xbd,0xce,0xbd,0x81,0x73,0x67,0x3c); | ||
275 | &LL(0x5d,0x5d,0x69,0x5d,0xd2,0x34,0xba,0x8f); | ||
276 | &LL(0x10,0x10,0x40,0x10,0x80,0x50,0x20,0x90); | ||
277 | &LL(0xf4,0xf4,0xf7,0xf4,0xf3,0x03,0xf5,0x07); | ||
278 | &LL(0xcb,0xcb,0x0b,0xcb,0x16,0xc0,0x8b,0xdd); | ||
279 | &LL(0x3e,0x3e,0xf8,0x3e,0xed,0xc6,0x7c,0xd3); | ||
280 | &LL(0x05,0x05,0x14,0x05,0x28,0x11,0x0a,0x2d); | ||
281 | &LL(0x67,0x67,0x81,0x67,0x1f,0xe6,0xce,0x78); | ||
282 | &LL(0xe4,0xe4,0xb7,0xe4,0x73,0x53,0xd5,0x97); | ||
283 | &LL(0x27,0x27,0x9c,0x27,0x25,0xbb,0x4e,0x02); | ||
284 | &LL(0x41,0x41,0x19,0x41,0x32,0x58,0x82,0x73); | ||
285 | &LL(0x8b,0x8b,0x16,0x8b,0x2c,0x9d,0x0b,0xa7); | ||
286 | &LL(0xa7,0xa7,0xa6,0xa7,0x51,0x01,0x53,0xf6); | ||
287 | &LL(0x7d,0x7d,0xe9,0x7d,0xcf,0x94,0xfa,0xb2); | ||
288 | &LL(0x95,0x95,0x6e,0x95,0xdc,0xfb,0x37,0x49); | ||
289 | &LL(0xd8,0xd8,0x47,0xd8,0x8e,0x9f,0xad,0x56); | ||
290 | &LL(0xfb,0xfb,0xcb,0xfb,0x8b,0x30,0xeb,0x70); | ||
291 | &LL(0xee,0xee,0x9f,0xee,0x23,0x71,0xc1,0xcd); | ||
292 | &LL(0x7c,0x7c,0xed,0x7c,0xc7,0x91,0xf8,0xbb); | ||
293 | &LL(0x66,0x66,0x85,0x66,0x17,0xe3,0xcc,0x71); | ||
294 | &LL(0xdd,0xdd,0x53,0xdd,0xa6,0x8e,0xa7,0x7b); | ||
295 | &LL(0x17,0x17,0x5c,0x17,0xb8,0x4b,0x2e,0xaf); | ||
296 | &LL(0x47,0x47,0x01,0x47,0x02,0x46,0x8e,0x45); | ||
297 | &LL(0x9e,0x9e,0x42,0x9e,0x84,0xdc,0x21,0x1a); | ||
298 | &LL(0xca,0xca,0x0f,0xca,0x1e,0xc5,0x89,0xd4); | ||
299 | &LL(0x2d,0x2d,0xb4,0x2d,0x75,0x99,0x5a,0x58); | ||
300 | &LL(0xbf,0xbf,0xc6,0xbf,0x91,0x79,0x63,0x2e); | ||
301 | &LL(0x07,0x07,0x1c,0x07,0x38,0x1b,0x0e,0x3f); | ||
302 | &LL(0xad,0xad,0x8e,0xad,0x01,0x23,0x47,0xac); | ||
303 | &LL(0x5a,0x5a,0x75,0x5a,0xea,0x2f,0xb4,0xb0); | ||
304 | &LL(0x83,0x83,0x36,0x83,0x6c,0xb5,0x1b,0xef); | ||
305 | &LL(0x33,0x33,0xcc,0x33,0x85,0xff,0x66,0xb6); | ||
306 | &LL(0x63,0x63,0x91,0x63,0x3f,0xf2,0xc6,0x5c); | ||
307 | &LL(0x02,0x02,0x08,0x02,0x10,0x0a,0x04,0x12); | ||
308 | &LL(0xaa,0xaa,0x92,0xaa,0x39,0x38,0x49,0x93); | ||
309 | &LL(0x71,0x71,0xd9,0x71,0xaf,0xa8,0xe2,0xde); | ||
310 | &LL(0xc8,0xc8,0x07,0xc8,0x0e,0xcf,0x8d,0xc6); | ||
311 | &LL(0x19,0x19,0x64,0x19,0xc8,0x7d,0x32,0xd1); | ||
312 | &LL(0x49,0x49,0x39,0x49,0x72,0x70,0x92,0x3b); | ||
313 | &LL(0xd9,0xd9,0x43,0xd9,0x86,0x9a,0xaf,0x5f); | ||
314 | &LL(0xf2,0xf2,0xef,0xf2,0xc3,0x1d,0xf9,0x31); | ||
315 | &LL(0xe3,0xe3,0xab,0xe3,0x4b,0x48,0xdb,0xa8); | ||
316 | &LL(0x5b,0x5b,0x71,0x5b,0xe2,0x2a,0xb6,0xb9); | ||
317 | &LL(0x88,0x88,0x1a,0x88,0x34,0x92,0x0d,0xbc); | ||
318 | &LL(0x9a,0x9a,0x52,0x9a,0xa4,0xc8,0x29,0x3e); | ||
319 | &LL(0x26,0x26,0x98,0x26,0x2d,0xbe,0x4c,0x0b); | ||
320 | &LL(0x32,0x32,0xc8,0x32,0x8d,0xfa,0x64,0xbf); | ||
321 | &LL(0xb0,0xb0,0xfa,0xb0,0xe9,0x4a,0x7d,0x59); | ||
322 | &LL(0xe9,0xe9,0x83,0xe9,0x1b,0x6a,0xcf,0xf2); | ||
323 | &LL(0x0f,0x0f,0x3c,0x0f,0x78,0x33,0x1e,0x77); | ||
324 | &LL(0xd5,0xd5,0x73,0xd5,0xe6,0xa6,0xb7,0x33); | ||
325 | &LL(0x80,0x80,0x3a,0x80,0x74,0xba,0x1d,0xf4); | ||
326 | &LL(0xbe,0xbe,0xc2,0xbe,0x99,0x7c,0x61,0x27); | ||
327 | &LL(0xcd,0xcd,0x13,0xcd,0x26,0xde,0x87,0xeb); | ||
328 | &LL(0x34,0x34,0xd0,0x34,0xbd,0xe4,0x68,0x89); | ||
329 | &LL(0x48,0x48,0x3d,0x48,0x7a,0x75,0x90,0x32); | ||
330 | &LL(0xff,0xff,0xdb,0xff,0xab,0x24,0xe3,0x54); | ||
331 | &LL(0x7a,0x7a,0xf5,0x7a,0xf7,0x8f,0xf4,0x8d); | ||
332 | &LL(0x90,0x90,0x7a,0x90,0xf4,0xea,0x3d,0x64); | ||
333 | &LL(0x5f,0x5f,0x61,0x5f,0xc2,0x3e,0xbe,0x9d); | ||
334 | &LL(0x20,0x20,0x80,0x20,0x1d,0xa0,0x40,0x3d); | ||
335 | &LL(0x68,0x68,0xbd,0x68,0x67,0xd5,0xd0,0x0f); | ||
336 | &LL(0x1a,0x1a,0x68,0x1a,0xd0,0x72,0x34,0xca); | ||
337 | &LL(0xae,0xae,0x82,0xae,0x19,0x2c,0x41,0xb7); | ||
338 | &LL(0xb4,0xb4,0xea,0xb4,0xc9,0x5e,0x75,0x7d); | ||
339 | &LL(0x54,0x54,0x4d,0x54,0x9a,0x19,0xa8,0xce); | ||
340 | &LL(0x93,0x93,0x76,0x93,0xec,0xe5,0x3b,0x7f); | ||
341 | &LL(0x22,0x22,0x88,0x22,0x0d,0xaa,0x44,0x2f); | ||
342 | &LL(0x64,0x64,0x8d,0x64,0x07,0xe9,0xc8,0x63); | ||
343 | &LL(0xf1,0xf1,0xe3,0xf1,0xdb,0x12,0xff,0x2a); | ||
344 | &LL(0x73,0x73,0xd1,0x73,0xbf,0xa2,0xe6,0xcc); | ||
345 | &LL(0x12,0x12,0x48,0x12,0x90,0x5a,0x24,0x82); | ||
346 | &LL(0x40,0x40,0x1d,0x40,0x3a,0x5d,0x80,0x7a); | ||
347 | &LL(0x08,0x08,0x20,0x08,0x40,0x28,0x10,0x48); | ||
348 | &LL(0xc3,0xc3,0x2b,0xc3,0x56,0xe8,0x9b,0x95); | ||
349 | &LL(0xec,0xec,0x97,0xec,0x33,0x7b,0xc5,0xdf); | ||
350 | &LL(0xdb,0xdb,0x4b,0xdb,0x96,0x90,0xab,0x4d); | ||
351 | &LL(0xa1,0xa1,0xbe,0xa1,0x61,0x1f,0x5f,0xc0); | ||
352 | &LL(0x8d,0x8d,0x0e,0x8d,0x1c,0x83,0x07,0x91); | ||
353 | &LL(0x3d,0x3d,0xf4,0x3d,0xf5,0xc9,0x7a,0xc8); | ||
354 | &LL(0x97,0x97,0x66,0x97,0xcc,0xf1,0x33,0x5b); | ||
355 | &LL(0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00); | ||
356 | &LL(0xcf,0xcf,0x1b,0xcf,0x36,0xd4,0x83,0xf9); | ||
357 | &LL(0x2b,0x2b,0xac,0x2b,0x45,0x87,0x56,0x6e); | ||
358 | &LL(0x76,0x76,0xc5,0x76,0x97,0xb3,0xec,0xe1); | ||
359 | &LL(0x82,0x82,0x32,0x82,0x64,0xb0,0x19,0xe6); | ||
360 | &LL(0xd6,0xd6,0x7f,0xd6,0xfe,0xa9,0xb1,0x28); | ||
361 | &LL(0x1b,0x1b,0x6c,0x1b,0xd8,0x77,0x36,0xc3); | ||
362 | &LL(0xb5,0xb5,0xee,0xb5,0xc1,0x5b,0x77,0x74); | ||
363 | &LL(0xaf,0xaf,0x86,0xaf,0x11,0x29,0x43,0xbe); | ||
364 | &LL(0x6a,0x6a,0xb5,0x6a,0x77,0xdf,0xd4,0x1d); | ||
365 | &LL(0x50,0x50,0x5d,0x50,0xba,0x0d,0xa0,0xea); | ||
366 | &LL(0x45,0x45,0x09,0x45,0x12,0x4c,0x8a,0x57); | ||
367 | &LL(0xf3,0xf3,0xeb,0xf3,0xcb,0x18,0xfb,0x38); | ||
368 | &LL(0x30,0x30,0xc0,0x30,0x9d,0xf0,0x60,0xad); | ||
369 | &LL(0xef,0xef,0x9b,0xef,0x2b,0x74,0xc3,0xc4); | ||
370 | &LL(0x3f,0x3f,0xfc,0x3f,0xe5,0xc3,0x7e,0xda); | ||
371 | &LL(0x55,0x55,0x49,0x55,0x92,0x1c,0xaa,0xc7); | ||
372 | &LL(0xa2,0xa2,0xb2,0xa2,0x79,0x10,0x59,0xdb); | ||
373 | &LL(0xea,0xea,0x8f,0xea,0x03,0x65,0xc9,0xe9); | ||
374 | &LL(0x65,0x65,0x89,0x65,0x0f,0xec,0xca,0x6a); | ||
375 | &LL(0xba,0xba,0xd2,0xba,0xb9,0x68,0x69,0x03); | ||
376 | &LL(0x2f,0x2f,0xbc,0x2f,0x65,0x93,0x5e,0x4a); | ||
377 | &LL(0xc0,0xc0,0x27,0xc0,0x4e,0xe7,0x9d,0x8e); | ||
378 | &LL(0xde,0xde,0x5f,0xde,0xbe,0x81,0xa1,0x60); | ||
379 | &LL(0x1c,0x1c,0x70,0x1c,0xe0,0x6c,0x38,0xfc); | ||
380 | &LL(0xfd,0xfd,0xd3,0xfd,0xbb,0x2e,0xe7,0x46); | ||
381 | &LL(0x4d,0x4d,0x29,0x4d,0x52,0x64,0x9a,0x1f); | ||
382 | &LL(0x92,0x92,0x72,0x92,0xe4,0xe0,0x39,0x76); | ||
383 | &LL(0x75,0x75,0xc9,0x75,0x8f,0xbc,0xea,0xfa); | ||
384 | &LL(0x06,0x06,0x18,0x06,0x30,0x1e,0x0c,0x36); | ||
385 | &LL(0x8a,0x8a,0x12,0x8a,0x24,0x98,0x09,0xae); | ||
386 | &LL(0xb2,0xb2,0xf2,0xb2,0xf9,0x40,0x79,0x4b); | ||
387 | &LL(0xe6,0xe6,0xbf,0xe6,0x63,0x59,0xd1,0x85); | ||
388 | &LL(0x0e,0x0e,0x38,0x0e,0x70,0x36,0x1c,0x7e); | ||
389 | &LL(0x1f,0x1f,0x7c,0x1f,0xf8,0x63,0x3e,0xe7); | ||
390 | &LL(0x62,0x62,0x95,0x62,0x37,0xf7,0xc4,0x55); | ||
391 | &LL(0xd4,0xd4,0x77,0xd4,0xee,0xa3,0xb5,0x3a); | ||
392 | &LL(0xa8,0xa8,0x9a,0xa8,0x29,0x32,0x4d,0x81); | ||
393 | &LL(0x96,0x96,0x62,0x96,0xc4,0xf4,0x31,0x52); | ||
394 | &LL(0xf9,0xf9,0xc3,0xf9,0x9b,0x3a,0xef,0x62); | ||
395 | &LL(0xc5,0xc5,0x33,0xc5,0x66,0xf6,0x97,0xa3); | ||
396 | &LL(0x25,0x25,0x94,0x25,0x35,0xb1,0x4a,0x10); | ||
397 | &LL(0x59,0x59,0x79,0x59,0xf2,0x20,0xb2,0xab); | ||
398 | &LL(0x84,0x84,0x2a,0x84,0x54,0xae,0x15,0xd0); | ||
399 | &LL(0x72,0x72,0xd5,0x72,0xb7,0xa7,0xe4,0xc5); | ||
400 | &LL(0x39,0x39,0xe4,0x39,0xd5,0xdd,0x72,0xec); | ||
401 | &LL(0x4c,0x4c,0x2d,0x4c,0x5a,0x61,0x98,0x16); | ||
402 | &LL(0x5e,0x5e,0x65,0x5e,0xca,0x3b,0xbc,0x94); | ||
403 | &LL(0x78,0x78,0xfd,0x78,0xe7,0x85,0xf0,0x9f); | ||
404 | &LL(0x38,0x38,0xe0,0x38,0xdd,0xd8,0x70,0xe5); | ||
405 | &LL(0x8c,0x8c,0x0a,0x8c,0x14,0x86,0x05,0x98); | ||
406 | &LL(0xd1,0xd1,0x63,0xd1,0xc6,0xb2,0xbf,0x17); | ||
407 | &LL(0xa5,0xa5,0xae,0xa5,0x41,0x0b,0x57,0xe4); | ||
408 | &LL(0xe2,0xe2,0xaf,0xe2,0x43,0x4d,0xd9,0xa1); | ||
409 | &LL(0x61,0x61,0x99,0x61,0x2f,0xf8,0xc2,0x4e); | ||
410 | &LL(0xb3,0xb3,0xf6,0xb3,0xf1,0x45,0x7b,0x42); | ||
411 | &LL(0x21,0x21,0x84,0x21,0x15,0xa5,0x42,0x34); | ||
412 | &LL(0x9c,0x9c,0x4a,0x9c,0x94,0xd6,0x25,0x08); | ||
413 | &LL(0x1e,0x1e,0x78,0x1e,0xf0,0x66,0x3c,0xee); | ||
414 | &LL(0x43,0x43,0x11,0x43,0x22,0x52,0x86,0x61); | ||
415 | &LL(0xc7,0xc7,0x3b,0xc7,0x76,0xfc,0x93,0xb1); | ||
416 | &LL(0xfc,0xfc,0xd7,0xfc,0xb3,0x2b,0xe5,0x4f); | ||
417 | &LL(0x04,0x04,0x10,0x04,0x20,0x14,0x08,0x24); | ||
418 | &LL(0x51,0x51,0x59,0x51,0xb2,0x08,0xa2,0xe3); | ||
419 | &LL(0x99,0x99,0x5e,0x99,0xbc,0xc7,0x2f,0x25); | ||
420 | &LL(0x6d,0x6d,0xa9,0x6d,0x4f,0xc4,0xda,0x22); | ||
421 | &LL(0x0d,0x0d,0x34,0x0d,0x68,0x39,0x1a,0x65); | ||
422 | &LL(0xfa,0xfa,0xcf,0xfa,0x83,0x35,0xe9,0x79); | ||
423 | &LL(0xdf,0xdf,0x5b,0xdf,0xb6,0x84,0xa3,0x69); | ||
424 | &LL(0x7e,0x7e,0xe5,0x7e,0xd7,0x9b,0xfc,0xa9); | ||
425 | &LL(0x24,0x24,0x90,0x24,0x3d,0xb4,0x48,0x19); | ||
426 | &LL(0x3b,0x3b,0xec,0x3b,0xc5,0xd7,0x76,0xfe); | ||
427 | &LL(0xab,0xab,0x96,0xab,0x31,0x3d,0x4b,0x9a); | ||
428 | &LL(0xce,0xce,0x1f,0xce,0x3e,0xd1,0x81,0xf0); | ||
429 | &LL(0x11,0x11,0x44,0x11,0x88,0x55,0x22,0x99); | ||
430 | &LL(0x8f,0x8f,0x06,0x8f,0x0c,0x89,0x03,0x83); | ||
431 | &LL(0x4e,0x4e,0x25,0x4e,0x4a,0x6b,0x9c,0x04); | ||
432 | &LL(0xb7,0xb7,0xe6,0xb7,0xd1,0x51,0x73,0x66); | ||
433 | &LL(0xeb,0xeb,0x8b,0xeb,0x0b,0x60,0xcb,0xe0); | ||
434 | &LL(0x3c,0x3c,0xf0,0x3c,0xfd,0xcc,0x78,0xc1); | ||
435 | &LL(0x81,0x81,0x3e,0x81,0x7c,0xbf,0x1f,0xfd); | ||
436 | &LL(0x94,0x94,0x6a,0x94,0xd4,0xfe,0x35,0x40); | ||
437 | &LL(0xf7,0xf7,0xfb,0xf7,0xeb,0x0c,0xf3,0x1c); | ||
438 | &LL(0xb9,0xb9,0xde,0xb9,0xa1,0x67,0x6f,0x18); | ||
439 | &LL(0x13,0x13,0x4c,0x13,0x98,0x5f,0x26,0x8b); | ||
440 | &LL(0x2c,0x2c,0xb0,0x2c,0x7d,0x9c,0x58,0x51); | ||
441 | &LL(0xd3,0xd3,0x6b,0xd3,0xd6,0xb8,0xbb,0x05); | ||
442 | &LL(0xe7,0xe7,0xbb,0xe7,0x6b,0x5c,0xd3,0x8c); | ||
443 | &LL(0x6e,0x6e,0xa5,0x6e,0x57,0xcb,0xdc,0x39); | ||
444 | &LL(0xc4,0xc4,0x37,0xc4,0x6e,0xf3,0x95,0xaa); | ||
445 | &LL(0x03,0x03,0x0c,0x03,0x18,0x0f,0x06,0x1b); | ||
446 | &LL(0x56,0x56,0x45,0x56,0x8a,0x13,0xac,0xdc); | ||
447 | &LL(0x44,0x44,0x0d,0x44,0x1a,0x49,0x88,0x5e); | ||
448 | &LL(0x7f,0x7f,0xe1,0x7f,0xdf,0x9e,0xfe,0xa0); | ||
449 | &LL(0xa9,0xa9,0x9e,0xa9,0x21,0x37,0x4f,0x88); | ||
450 | &LL(0x2a,0x2a,0xa8,0x2a,0x4d,0x82,0x54,0x67); | ||
451 | &LL(0xbb,0xbb,0xd6,0xbb,0xb1,0x6d,0x6b,0x0a); | ||
452 | &LL(0xc1,0xc1,0x23,0xc1,0x46,0xe2,0x9f,0x87); | ||
453 | &LL(0x53,0x53,0x51,0x53,0xa2,0x02,0xa6,0xf1); | ||
454 | &LL(0xdc,0xdc,0x57,0xdc,0xae,0x8b,0xa5,0x72); | ||
455 | &LL(0x0b,0x0b,0x2c,0x0b,0x58,0x27,0x16,0x53); | ||
456 | &LL(0x9d,0x9d,0x4e,0x9d,0x9c,0xd3,0x27,0x01); | ||
457 | &LL(0x6c,0x6c,0xad,0x6c,0x47,0xc1,0xd8,0x2b); | ||
458 | &LL(0x31,0x31,0xc4,0x31,0x95,0xf5,0x62,0xa4); | ||
459 | &LL(0x74,0x74,0xcd,0x74,0x87,0xb9,0xe8,0xf3); | ||
460 | &LL(0xf6,0xf6,0xff,0xf6,0xe3,0x09,0xf1,0x15); | ||
461 | &LL(0x46,0x46,0x05,0x46,0x0a,0x43,0x8c,0x4c); | ||
462 | &LL(0xac,0xac,0x8a,0xac,0x09,0x26,0x45,0xa5); | ||
463 | &LL(0x89,0x89,0x1e,0x89,0x3c,0x97,0x0f,0xb5); | ||
464 | &LL(0x14,0x14,0x50,0x14,0xa0,0x44,0x28,0xb4); | ||
465 | &LL(0xe1,0xe1,0xa3,0xe1,0x5b,0x42,0xdf,0xba); | ||
466 | &LL(0x16,0x16,0x58,0x16,0xb0,0x4e,0x2c,0xa6); | ||
467 | &LL(0x3a,0x3a,0xe8,0x3a,0xcd,0xd2,0x74,0xf7); | ||
468 | &LL(0x69,0x69,0xb9,0x69,0x6f,0xd0,0xd2,0x06); | ||
469 | &LL(0x09,0x09,0x24,0x09,0x48,0x2d,0x12,0x41); | ||
470 | &LL(0x70,0x70,0xdd,0x70,0xa7,0xad,0xe0,0xd7); | ||
471 | &LL(0xb6,0xb6,0xe2,0xb6,0xd9,0x54,0x71,0x6f); | ||
472 | &LL(0xd0,0xd0,0x67,0xd0,0xce,0xb7,0xbd,0x1e); | ||
473 | &LL(0xed,0xed,0x93,0xed,0x3b,0x7e,0xc7,0xd6); | ||
474 | &LL(0xcc,0xcc,0x17,0xcc,0x2e,0xdb,0x85,0xe2); | ||
475 | &LL(0x42,0x42,0x15,0x42,0x2a,0x57,0x84,0x68); | ||
476 | &LL(0x98,0x98,0x5a,0x98,0xb4,0xc2,0x2d,0x2c); | ||
477 | &LL(0xa4,0xa4,0xaa,0xa4,0x49,0x0e,0x55,0xed); | ||
478 | &LL(0x28,0x28,0xa0,0x28,0x5d,0x88,0x50,0x75); | ||
479 | &LL(0x5c,0x5c,0x6d,0x5c,0xda,0x31,0xb8,0x86); | ||
480 | &LL(0xf8,0xf8,0xc7,0xf8,0x93,0x3f,0xed,0x6b); | ||
481 | &LL(0x86,0x86,0x22,0x86,0x44,0xa4,0x11,0xc2); | ||
482 | |||
483 | &L(0x18,0x23,0xc6,0xe8,0x87,0xb8,0x01,0x4f); # rc[ROUNDS] | ||
484 | &L(0x36,0xa6,0xd2,0xf5,0x79,0x6f,0x91,0x52); | ||
485 | &L(0x60,0xbc,0x9b,0x8e,0xa3,0x0c,0x7b,0x35); | ||
486 | &L(0x1d,0xe0,0xd7,0xc2,0x2e,0x4b,0xfe,0x57); | ||
487 | &L(0x15,0x77,0x37,0xe5,0x9f,0xf0,0x4a,0xda); | ||
488 | &L(0x58,0xc9,0x29,0x0a,0xb1,0xa0,0x6b,0x85); | ||
489 | &L(0xbd,0x5d,0x10,0xf4,0xcb,0x3e,0x05,0x67); | ||
490 | &L(0xe4,0x27,0x41,0x8b,0xa7,0x7d,0x95,0xd8); | ||
491 | &L(0xfb,0xee,0x7c,0x66,0xdd,0x17,0x47,0x9e); | ||
492 | &L(0xca,0x2d,0xbf,0x07,0xad,0x5a,0x83,0x33); | ||
493 | &previous(); | ||
494 | |||
495 | &asm_finish(); | ||
diff --git a/src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl b/src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl deleted file mode 100644 index 2a3902430b..0000000000 --- a/src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl +++ /dev/null | |||
@@ -1,483 +0,0 @@ | |||
1 | #!/usr/bin/env perl | ||
2 | # | ||
3 | # ==================================================================== | ||
4 | # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL | ||
5 | # project. Rights for redistribution and usage in source and binary | ||
6 | # forms are granted according to the OpenSSL license. | ||
7 | # ==================================================================== | ||
8 | # | ||
9 | # whirlpool_block for x86_64. | ||
10 | # | ||
11 | # 2500 cycles per 64-byte input block on AMD64, which is *identical* | ||
12 | # to 32-bit MMX version executed on same CPU. So why did I bother? | ||
13 | # Well, it's faster than gcc 3.3.2 generated code by over 50%, and | ||
14 | # over 80% faster than PathScale 1.4, an "ambitious" commercial | ||
15 | # compiler. Furthermore it surpasses gcc 3.4.3 by 170% and Sun Studio | ||
16 | # 10 - by 360%[!]... What is it with x86_64 compilers? It's not the | ||
17 | # first example when they fail to generate more optimal code, when | ||
18 | # I believe they had *all* chances to... | ||
19 | # | ||
20 | # Note that register and stack frame layout are virtually identical | ||
21 | # to 32-bit MMX version, except that %r8-15 are used instead of | ||
22 | # %mm0-8. You can even notice that K[i] and S[i] are loaded to | ||
23 | # %eax:%ebx as pair of 32-bit values and not as single 64-bit one. | ||
24 | # This is done in order to avoid 64-bit shift penalties on Intel | ||
25 | # EM64T core. Speaking of which! I bet it's possible to improve | ||
26 | # Opteron performance by compressing the table to 2KB and replacing | ||
27 | # unaligned references with complementary rotations [which would | ||
28 | # incidentally replace lea instructions], but it would definitely | ||
29 | # just "kill" EM64T, because it has only 1 shifter/rotator [against | ||
30 | # 3 on Opteron] and which is *unacceptably* slow with 64-bit | ||
31 | # operand. | ||
32 | |||
33 | $flavour = shift; | ||
34 | $output = shift; | ||
35 | if ($flavour =~ /\./) { $output = $flavour; undef $flavour; } | ||
36 | |||
37 | $0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate; | ||
38 | ( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or | ||
39 | ( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or | ||
40 | die "can't locate x86_64-xlate.pl"; | ||
41 | |||
42 | open OUT,"| \"$^X\" $xlate $flavour $output"; | ||
43 | *STDOUT=*OUT; | ||
44 | |||
45 | sub L() { $code.=".byte ".join(',',@_)."\n"; } | ||
46 | sub LL(){ $code.=".byte ".join(',',@_).",".join(',',@_)."\n"; } | ||
47 | |||
48 | @mm=("%r8","%r9","%r10","%r11","%r12","%r13","%r14","%r15"); | ||
49 | |||
50 | $func="whirlpool_block"; | ||
51 | $table=".Ltable"; | ||
52 | |||
53 | $code=<<___; | ||
54 | .text | ||
55 | |||
56 | .globl $func | ||
57 | .type $func,\@function,3 | ||
58 | .align 16 | ||
59 | $func: | ||
60 | _CET_ENDBR | ||
61 | push %rbx | ||
62 | push %rbp | ||
63 | push %r12 | ||
64 | push %r13 | ||
65 | push %r14 | ||
66 | push %r15 | ||
67 | |||
68 | mov %rsp,%r11 | ||
69 | sub \$128+40,%rsp | ||
70 | and \$-64,%rsp | ||
71 | |||
72 | lea 128(%rsp),%r10 | ||
73 | mov %rdi,0(%r10) # save parameter block | ||
74 | mov %rsi,8(%r10) | ||
75 | mov %rdx,16(%r10) | ||
76 | mov %r11,32(%r10) # saved stack pointer | ||
77 | .Lprologue: | ||
78 | |||
79 | mov %r10,%rbx | ||
80 | lea $table(%rip),%rbp | ||
81 | |||
82 | xor %rcx,%rcx | ||
83 | xor %rdx,%rdx | ||
84 | ___ | ||
85 | for($i=0;$i<8;$i++) { $code.="mov $i*8(%rdi),@mm[$i]\n"; } # L=H | ||
86 | $code.=".Louterloop:\n"; | ||
87 | for($i=0;$i<8;$i++) { $code.="mov @mm[$i],$i*8(%rsp)\n"; } # K=L | ||
88 | for($i=0;$i<8;$i++) { $code.="xor $i*8(%rsi),@mm[$i]\n"; } # L^=inp | ||
89 | for($i=0;$i<8;$i++) { $code.="mov @mm[$i],64+$i*8(%rsp)\n"; } # S=L | ||
90 | $code.=<<___; | ||
91 | xor %rsi,%rsi | ||
92 | mov %rsi,24(%rbx) # zero round counter | ||
93 | .align 16 | ||
94 | .Lround: | ||
95 | mov 4096(%rbp,%rsi,8),@mm[0] # rc[r] | ||
96 | mov 0(%rsp),%eax | ||
97 | mov 4(%rsp),%ebx | ||
98 | ___ | ||
99 | for($i=0;$i<8;$i++) { | ||
100 | my $func = ($i==0)? "mov" : "xor"; | ||
101 | $code.=<<___; | ||
102 | mov %al,%cl | ||
103 | mov %ah,%dl | ||
104 | lea (%rcx,%rcx),%rsi | ||
105 | lea (%rdx,%rdx),%rdi | ||
106 | shr \$16,%eax | ||
107 | xor 0(%rbp,%rsi,8),@mm[0] | ||
108 | $func 7(%rbp,%rdi,8),@mm[1] | ||
109 | mov %al,%cl | ||
110 | mov %ah,%dl | ||
111 | mov $i*8+8(%rsp),%eax # ($i+1)*8 | ||
112 | lea (%rcx,%rcx),%rsi | ||
113 | lea (%rdx,%rdx),%rdi | ||
114 | $func 6(%rbp,%rsi,8),@mm[2] | ||
115 | $func 5(%rbp,%rdi,8),@mm[3] | ||
116 | mov %bl,%cl | ||
117 | mov %bh,%dl | ||
118 | lea (%rcx,%rcx),%rsi | ||
119 | lea (%rdx,%rdx),%rdi | ||
120 | shr \$16,%ebx | ||
121 | $func 4(%rbp,%rsi,8),@mm[4] | ||
122 | $func 3(%rbp,%rdi,8),@mm[5] | ||
123 | mov %bl,%cl | ||
124 | mov %bh,%dl | ||
125 | mov $i*8+8+4(%rsp),%ebx # ($i+1)*8+4 | ||
126 | lea (%rcx,%rcx),%rsi | ||
127 | lea (%rdx,%rdx),%rdi | ||
128 | $func 2(%rbp,%rsi,8),@mm[6] | ||
129 | $func 1(%rbp,%rdi,8),@mm[7] | ||
130 | ___ | ||
131 | push(@mm,shift(@mm)); | ||
132 | } | ||
133 | for($i=0;$i<8;$i++) { $code.="mov @mm[$i],$i*8(%rsp)\n"; } # K=L | ||
134 | for($i=0;$i<8;$i++) { | ||
135 | $code.=<<___; | ||
136 | mov %al,%cl | ||
137 | mov %ah,%dl | ||
138 | lea (%rcx,%rcx),%rsi | ||
139 | lea (%rdx,%rdx),%rdi | ||
140 | shr \$16,%eax | ||
141 | xor 0(%rbp,%rsi,8),@mm[0] | ||
142 | xor 7(%rbp,%rdi,8),@mm[1] | ||
143 | mov %al,%cl | ||
144 | mov %ah,%dl | ||
145 | `"mov 64+$i*8+8(%rsp),%eax" if($i<7);` # 64+($i+1)*8 | ||
146 | lea (%rcx,%rcx),%rsi | ||
147 | lea (%rdx,%rdx),%rdi | ||
148 | xor 6(%rbp,%rsi,8),@mm[2] | ||
149 | xor 5(%rbp,%rdi,8),@mm[3] | ||
150 | mov %bl,%cl | ||
151 | mov %bh,%dl | ||
152 | lea (%rcx,%rcx),%rsi | ||
153 | lea (%rdx,%rdx),%rdi | ||
154 | shr \$16,%ebx | ||
155 | xor 4(%rbp,%rsi,8),@mm[4] | ||
156 | xor 3(%rbp,%rdi,8),@mm[5] | ||
157 | mov %bl,%cl | ||
158 | mov %bh,%dl | ||
159 | `"mov 64+$i*8+8+4(%rsp),%ebx" if($i<7);` # 64+($i+1)*8+4 | ||
160 | lea (%rcx,%rcx),%rsi | ||
161 | lea (%rdx,%rdx),%rdi | ||
162 | xor 2(%rbp,%rsi,8),@mm[6] | ||
163 | xor 1(%rbp,%rdi,8),@mm[7] | ||
164 | ___ | ||
165 | push(@mm,shift(@mm)); | ||
166 | } | ||
167 | $code.=<<___; | ||
168 | lea 128(%rsp),%rbx | ||
169 | mov 24(%rbx),%rsi # pull round counter | ||
170 | add \$1,%rsi | ||
171 | cmp \$10,%rsi | ||
172 | je .Lroundsdone | ||
173 | |||
174 | mov %rsi,24(%rbx) # update round counter | ||
175 | ___ | ||
176 | for($i=0;$i<8;$i++) { $code.="mov @mm[$i],64+$i*8(%rsp)\n"; } # S=L | ||
177 | $code.=<<___; | ||
178 | jmp .Lround | ||
179 | .align 16 | ||
180 | .Lroundsdone: | ||
181 | mov 0(%rbx),%rdi # reload argument block | ||
182 | mov 8(%rbx),%rsi | ||
183 | mov 16(%rbx),%rax | ||
184 | ___ | ||
185 | for($i=0;$i<8;$i++) { $code.="xor $i*8(%rsi),@mm[$i]\n"; } # L^=inp | ||
186 | for($i=0;$i<8;$i++) { $code.="xor $i*8(%rdi),@mm[$i]\n"; } # L^=H | ||
187 | for($i=0;$i<8;$i++) { $code.="mov @mm[$i],$i*8(%rdi)\n"; } # H=L | ||
188 | $code.=<<___; | ||
189 | lea 64(%rsi),%rsi # inp+=64 | ||
190 | sub \$1,%rax # num-- | ||
191 | jz .Lalldone | ||
192 | mov %rsi,8(%rbx) # update parameter block | ||
193 | mov %rax,16(%rbx) | ||
194 | jmp .Louterloop | ||
195 | .Lalldone: | ||
196 | mov 32(%rbx),%rsi # restore saved pointer | ||
197 | mov (%rsi),%r15 | ||
198 | mov 8(%rsi),%r14 | ||
199 | mov 16(%rsi),%r13 | ||
200 | mov 24(%rsi),%r12 | ||
201 | mov 32(%rsi),%rbp | ||
202 | mov 40(%rsi),%rbx | ||
203 | lea 48(%rsi),%rsp | ||
204 | .Lepilogue: | ||
205 | ret | ||
206 | .size $func,.-$func | ||
207 | |||
208 | .section .rodata | ||
209 | .align 64 | ||
210 | .type $table,\@object | ||
211 | $table: | ||
212 | ___ | ||
213 | &LL(0x18,0x18,0x60,0x18,0xc0,0x78,0x30,0xd8); | ||
214 | &LL(0x23,0x23,0x8c,0x23,0x05,0xaf,0x46,0x26); | ||
215 | &LL(0xc6,0xc6,0x3f,0xc6,0x7e,0xf9,0x91,0xb8); | ||
216 | &LL(0xe8,0xe8,0x87,0xe8,0x13,0x6f,0xcd,0xfb); | ||
217 | &LL(0x87,0x87,0x26,0x87,0x4c,0xa1,0x13,0xcb); | ||
218 | &LL(0xb8,0xb8,0xda,0xb8,0xa9,0x62,0x6d,0x11); | ||
219 | &LL(0x01,0x01,0x04,0x01,0x08,0x05,0x02,0x09); | ||
220 | &LL(0x4f,0x4f,0x21,0x4f,0x42,0x6e,0x9e,0x0d); | ||
221 | &LL(0x36,0x36,0xd8,0x36,0xad,0xee,0x6c,0x9b); | ||
222 | &LL(0xa6,0xa6,0xa2,0xa6,0x59,0x04,0x51,0xff); | ||
223 | &LL(0xd2,0xd2,0x6f,0xd2,0xde,0xbd,0xb9,0x0c); | ||
224 | &LL(0xf5,0xf5,0xf3,0xf5,0xfb,0x06,0xf7,0x0e); | ||
225 | &LL(0x79,0x79,0xf9,0x79,0xef,0x80,0xf2,0x96); | ||
226 | &LL(0x6f,0x6f,0xa1,0x6f,0x5f,0xce,0xde,0x30); | ||
227 | &LL(0x91,0x91,0x7e,0x91,0xfc,0xef,0x3f,0x6d); | ||
228 | &LL(0x52,0x52,0x55,0x52,0xaa,0x07,0xa4,0xf8); | ||
229 | &LL(0x60,0x60,0x9d,0x60,0x27,0xfd,0xc0,0x47); | ||
230 | &LL(0xbc,0xbc,0xca,0xbc,0x89,0x76,0x65,0x35); | ||
231 | &LL(0x9b,0x9b,0x56,0x9b,0xac,0xcd,0x2b,0x37); | ||
232 | &LL(0x8e,0x8e,0x02,0x8e,0x04,0x8c,0x01,0x8a); | ||
233 | &LL(0xa3,0xa3,0xb6,0xa3,0x71,0x15,0x5b,0xd2); | ||
234 | &LL(0x0c,0x0c,0x30,0x0c,0x60,0x3c,0x18,0x6c); | ||
235 | &LL(0x7b,0x7b,0xf1,0x7b,0xff,0x8a,0xf6,0x84); | ||
236 | &LL(0x35,0x35,0xd4,0x35,0xb5,0xe1,0x6a,0x80); | ||
237 | &LL(0x1d,0x1d,0x74,0x1d,0xe8,0x69,0x3a,0xf5); | ||
238 | &LL(0xe0,0xe0,0xa7,0xe0,0x53,0x47,0xdd,0xb3); | ||
239 | &LL(0xd7,0xd7,0x7b,0xd7,0xf6,0xac,0xb3,0x21); | ||
240 | &LL(0xc2,0xc2,0x2f,0xc2,0x5e,0xed,0x99,0x9c); | ||
241 | &LL(0x2e,0x2e,0xb8,0x2e,0x6d,0x96,0x5c,0x43); | ||
242 | &LL(0x4b,0x4b,0x31,0x4b,0x62,0x7a,0x96,0x29); | ||
243 | &LL(0xfe,0xfe,0xdf,0xfe,0xa3,0x21,0xe1,0x5d); | ||
244 | &LL(0x57,0x57,0x41,0x57,0x82,0x16,0xae,0xd5); | ||
245 | &LL(0x15,0x15,0x54,0x15,0xa8,0x41,0x2a,0xbd); | ||
246 | &LL(0x77,0x77,0xc1,0x77,0x9f,0xb6,0xee,0xe8); | ||
247 | &LL(0x37,0x37,0xdc,0x37,0xa5,0xeb,0x6e,0x92); | ||
248 | &LL(0xe5,0xe5,0xb3,0xe5,0x7b,0x56,0xd7,0x9e); | ||
249 | &LL(0x9f,0x9f,0x46,0x9f,0x8c,0xd9,0x23,0x13); | ||
250 | &LL(0xf0,0xf0,0xe7,0xf0,0xd3,0x17,0xfd,0x23); | ||
251 | &LL(0x4a,0x4a,0x35,0x4a,0x6a,0x7f,0x94,0x20); | ||
252 | &LL(0xda,0xda,0x4f,0xda,0x9e,0x95,0xa9,0x44); | ||
253 | &LL(0x58,0x58,0x7d,0x58,0xfa,0x25,0xb0,0xa2); | ||
254 | &LL(0xc9,0xc9,0x03,0xc9,0x06,0xca,0x8f,0xcf); | ||
255 | &LL(0x29,0x29,0xa4,0x29,0x55,0x8d,0x52,0x7c); | ||
256 | &LL(0x0a,0x0a,0x28,0x0a,0x50,0x22,0x14,0x5a); | ||
257 | &LL(0xb1,0xb1,0xfe,0xb1,0xe1,0x4f,0x7f,0x50); | ||
258 | &LL(0xa0,0xa0,0xba,0xa0,0x69,0x1a,0x5d,0xc9); | ||
259 | &LL(0x6b,0x6b,0xb1,0x6b,0x7f,0xda,0xd6,0x14); | ||
260 | &LL(0x85,0x85,0x2e,0x85,0x5c,0xab,0x17,0xd9); | ||
261 | &LL(0xbd,0xbd,0xce,0xbd,0x81,0x73,0x67,0x3c); | ||
262 | &LL(0x5d,0x5d,0x69,0x5d,0xd2,0x34,0xba,0x8f); | ||
263 | &LL(0x10,0x10,0x40,0x10,0x80,0x50,0x20,0x90); | ||
264 | &LL(0xf4,0xf4,0xf7,0xf4,0xf3,0x03,0xf5,0x07); | ||
265 | &LL(0xcb,0xcb,0x0b,0xcb,0x16,0xc0,0x8b,0xdd); | ||
266 | &LL(0x3e,0x3e,0xf8,0x3e,0xed,0xc6,0x7c,0xd3); | ||
267 | &LL(0x05,0x05,0x14,0x05,0x28,0x11,0x0a,0x2d); | ||
268 | &LL(0x67,0x67,0x81,0x67,0x1f,0xe6,0xce,0x78); | ||
269 | &LL(0xe4,0xe4,0xb7,0xe4,0x73,0x53,0xd5,0x97); | ||
270 | &LL(0x27,0x27,0x9c,0x27,0x25,0xbb,0x4e,0x02); | ||
271 | &LL(0x41,0x41,0x19,0x41,0x32,0x58,0x82,0x73); | ||
272 | &LL(0x8b,0x8b,0x16,0x8b,0x2c,0x9d,0x0b,0xa7); | ||
273 | &LL(0xa7,0xa7,0xa6,0xa7,0x51,0x01,0x53,0xf6); | ||
274 | &LL(0x7d,0x7d,0xe9,0x7d,0xcf,0x94,0xfa,0xb2); | ||
275 | &LL(0x95,0x95,0x6e,0x95,0xdc,0xfb,0x37,0x49); | ||
276 | &LL(0xd8,0xd8,0x47,0xd8,0x8e,0x9f,0xad,0x56); | ||
277 | &LL(0xfb,0xfb,0xcb,0xfb,0x8b,0x30,0xeb,0x70); | ||
278 | &LL(0xee,0xee,0x9f,0xee,0x23,0x71,0xc1,0xcd); | ||
279 | &LL(0x7c,0x7c,0xed,0x7c,0xc7,0x91,0xf8,0xbb); | ||
280 | &LL(0x66,0x66,0x85,0x66,0x17,0xe3,0xcc,0x71); | ||
281 | &LL(0xdd,0xdd,0x53,0xdd,0xa6,0x8e,0xa7,0x7b); | ||
282 | &LL(0x17,0x17,0x5c,0x17,0xb8,0x4b,0x2e,0xaf); | ||
283 | &LL(0x47,0x47,0x01,0x47,0x02,0x46,0x8e,0x45); | ||
284 | &LL(0x9e,0x9e,0x42,0x9e,0x84,0xdc,0x21,0x1a); | ||
285 | &LL(0xca,0xca,0x0f,0xca,0x1e,0xc5,0x89,0xd4); | ||
286 | &LL(0x2d,0x2d,0xb4,0x2d,0x75,0x99,0x5a,0x58); | ||
287 | &LL(0xbf,0xbf,0xc6,0xbf,0x91,0x79,0x63,0x2e); | ||
288 | &LL(0x07,0x07,0x1c,0x07,0x38,0x1b,0x0e,0x3f); | ||
289 | &LL(0xad,0xad,0x8e,0xad,0x01,0x23,0x47,0xac); | ||
290 | &LL(0x5a,0x5a,0x75,0x5a,0xea,0x2f,0xb4,0xb0); | ||
291 | &LL(0x83,0x83,0x36,0x83,0x6c,0xb5,0x1b,0xef); | ||
292 | &LL(0x33,0x33,0xcc,0x33,0x85,0xff,0x66,0xb6); | ||
293 | &LL(0x63,0x63,0x91,0x63,0x3f,0xf2,0xc6,0x5c); | ||
294 | &LL(0x02,0x02,0x08,0x02,0x10,0x0a,0x04,0x12); | ||
295 | &LL(0xaa,0xaa,0x92,0xaa,0x39,0x38,0x49,0x93); | ||
296 | &LL(0x71,0x71,0xd9,0x71,0xaf,0xa8,0xe2,0xde); | ||
297 | &LL(0xc8,0xc8,0x07,0xc8,0x0e,0xcf,0x8d,0xc6); | ||
298 | &LL(0x19,0x19,0x64,0x19,0xc8,0x7d,0x32,0xd1); | ||
299 | &LL(0x49,0x49,0x39,0x49,0x72,0x70,0x92,0x3b); | ||
300 | &LL(0xd9,0xd9,0x43,0xd9,0x86,0x9a,0xaf,0x5f); | ||
301 | &LL(0xf2,0xf2,0xef,0xf2,0xc3,0x1d,0xf9,0x31); | ||
302 | &LL(0xe3,0xe3,0xab,0xe3,0x4b,0x48,0xdb,0xa8); | ||
303 | &LL(0x5b,0x5b,0x71,0x5b,0xe2,0x2a,0xb6,0xb9); | ||
304 | &LL(0x88,0x88,0x1a,0x88,0x34,0x92,0x0d,0xbc); | ||
305 | &LL(0x9a,0x9a,0x52,0x9a,0xa4,0xc8,0x29,0x3e); | ||
306 | &LL(0x26,0x26,0x98,0x26,0x2d,0xbe,0x4c,0x0b); | ||
307 | &LL(0x32,0x32,0xc8,0x32,0x8d,0xfa,0x64,0xbf); | ||
308 | &LL(0xb0,0xb0,0xfa,0xb0,0xe9,0x4a,0x7d,0x59); | ||
309 | &LL(0xe9,0xe9,0x83,0xe9,0x1b,0x6a,0xcf,0xf2); | ||
310 | &LL(0x0f,0x0f,0x3c,0x0f,0x78,0x33,0x1e,0x77); | ||
311 | &LL(0xd5,0xd5,0x73,0xd5,0xe6,0xa6,0xb7,0x33); | ||
312 | &LL(0x80,0x80,0x3a,0x80,0x74,0xba,0x1d,0xf4); | ||
313 | &LL(0xbe,0xbe,0xc2,0xbe,0x99,0x7c,0x61,0x27); | ||
314 | &LL(0xcd,0xcd,0x13,0xcd,0x26,0xde,0x87,0xeb); | ||
315 | &LL(0x34,0x34,0xd0,0x34,0xbd,0xe4,0x68,0x89); | ||
316 | &LL(0x48,0x48,0x3d,0x48,0x7a,0x75,0x90,0x32); | ||
317 | &LL(0xff,0xff,0xdb,0xff,0xab,0x24,0xe3,0x54); | ||
318 | &LL(0x7a,0x7a,0xf5,0x7a,0xf7,0x8f,0xf4,0x8d); | ||
319 | &LL(0x90,0x90,0x7a,0x90,0xf4,0xea,0x3d,0x64); | ||
320 | &LL(0x5f,0x5f,0x61,0x5f,0xc2,0x3e,0xbe,0x9d); | ||
321 | &LL(0x20,0x20,0x80,0x20,0x1d,0xa0,0x40,0x3d); | ||
322 | &LL(0x68,0x68,0xbd,0x68,0x67,0xd5,0xd0,0x0f); | ||
323 | &LL(0x1a,0x1a,0x68,0x1a,0xd0,0x72,0x34,0xca); | ||
324 | &LL(0xae,0xae,0x82,0xae,0x19,0x2c,0x41,0xb7); | ||
325 | &LL(0xb4,0xb4,0xea,0xb4,0xc9,0x5e,0x75,0x7d); | ||
326 | &LL(0x54,0x54,0x4d,0x54,0x9a,0x19,0xa8,0xce); | ||
327 | &LL(0x93,0x93,0x76,0x93,0xec,0xe5,0x3b,0x7f); | ||
328 | &LL(0x22,0x22,0x88,0x22,0x0d,0xaa,0x44,0x2f); | ||
329 | &LL(0x64,0x64,0x8d,0x64,0x07,0xe9,0xc8,0x63); | ||
330 | &LL(0xf1,0xf1,0xe3,0xf1,0xdb,0x12,0xff,0x2a); | ||
331 | &LL(0x73,0x73,0xd1,0x73,0xbf,0xa2,0xe6,0xcc); | ||
332 | &LL(0x12,0x12,0x48,0x12,0x90,0x5a,0x24,0x82); | ||
333 | &LL(0x40,0x40,0x1d,0x40,0x3a,0x5d,0x80,0x7a); | ||
334 | &LL(0x08,0x08,0x20,0x08,0x40,0x28,0x10,0x48); | ||
335 | &LL(0xc3,0xc3,0x2b,0xc3,0x56,0xe8,0x9b,0x95); | ||
336 | &LL(0xec,0xec,0x97,0xec,0x33,0x7b,0xc5,0xdf); | ||
337 | &LL(0xdb,0xdb,0x4b,0xdb,0x96,0x90,0xab,0x4d); | ||
338 | &LL(0xa1,0xa1,0xbe,0xa1,0x61,0x1f,0x5f,0xc0); | ||
339 | &LL(0x8d,0x8d,0x0e,0x8d,0x1c,0x83,0x07,0x91); | ||
340 | &LL(0x3d,0x3d,0xf4,0x3d,0xf5,0xc9,0x7a,0xc8); | ||
341 | &LL(0x97,0x97,0x66,0x97,0xcc,0xf1,0x33,0x5b); | ||
342 | &LL(0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00); | ||
343 | &LL(0xcf,0xcf,0x1b,0xcf,0x36,0xd4,0x83,0xf9); | ||
344 | &LL(0x2b,0x2b,0xac,0x2b,0x45,0x87,0x56,0x6e); | ||
345 | &LL(0x76,0x76,0xc5,0x76,0x97,0xb3,0xec,0xe1); | ||
346 | &LL(0x82,0x82,0x32,0x82,0x64,0xb0,0x19,0xe6); | ||
347 | &LL(0xd6,0xd6,0x7f,0xd6,0xfe,0xa9,0xb1,0x28); | ||
348 | &LL(0x1b,0x1b,0x6c,0x1b,0xd8,0x77,0x36,0xc3); | ||
349 | &LL(0xb5,0xb5,0xee,0xb5,0xc1,0x5b,0x77,0x74); | ||
350 | &LL(0xaf,0xaf,0x86,0xaf,0x11,0x29,0x43,0xbe); | ||
351 | &LL(0x6a,0x6a,0xb5,0x6a,0x77,0xdf,0xd4,0x1d); | ||
352 | &LL(0x50,0x50,0x5d,0x50,0xba,0x0d,0xa0,0xea); | ||
353 | &LL(0x45,0x45,0x09,0x45,0x12,0x4c,0x8a,0x57); | ||
354 | &LL(0xf3,0xf3,0xeb,0xf3,0xcb,0x18,0xfb,0x38); | ||
355 | &LL(0x30,0x30,0xc0,0x30,0x9d,0xf0,0x60,0xad); | ||
356 | &LL(0xef,0xef,0x9b,0xef,0x2b,0x74,0xc3,0xc4); | ||
357 | &LL(0x3f,0x3f,0xfc,0x3f,0xe5,0xc3,0x7e,0xda); | ||
358 | &LL(0x55,0x55,0x49,0x55,0x92,0x1c,0xaa,0xc7); | ||
359 | &LL(0xa2,0xa2,0xb2,0xa2,0x79,0x10,0x59,0xdb); | ||
360 | &LL(0xea,0xea,0x8f,0xea,0x03,0x65,0xc9,0xe9); | ||
361 | &LL(0x65,0x65,0x89,0x65,0x0f,0xec,0xca,0x6a); | ||
362 | &LL(0xba,0xba,0xd2,0xba,0xb9,0x68,0x69,0x03); | ||
363 | &LL(0x2f,0x2f,0xbc,0x2f,0x65,0x93,0x5e,0x4a); | ||
364 | &LL(0xc0,0xc0,0x27,0xc0,0x4e,0xe7,0x9d,0x8e); | ||
365 | &LL(0xde,0xde,0x5f,0xde,0xbe,0x81,0xa1,0x60); | ||
366 | &LL(0x1c,0x1c,0x70,0x1c,0xe0,0x6c,0x38,0xfc); | ||
367 | &LL(0xfd,0xfd,0xd3,0xfd,0xbb,0x2e,0xe7,0x46); | ||
368 | &LL(0x4d,0x4d,0x29,0x4d,0x52,0x64,0x9a,0x1f); | ||
369 | &LL(0x92,0x92,0x72,0x92,0xe4,0xe0,0x39,0x76); | ||
370 | &LL(0x75,0x75,0xc9,0x75,0x8f,0xbc,0xea,0xfa); | ||
371 | &LL(0x06,0x06,0x18,0x06,0x30,0x1e,0x0c,0x36); | ||
372 | &LL(0x8a,0x8a,0x12,0x8a,0x24,0x98,0x09,0xae); | ||
373 | &LL(0xb2,0xb2,0xf2,0xb2,0xf9,0x40,0x79,0x4b); | ||
374 | &LL(0xe6,0xe6,0xbf,0xe6,0x63,0x59,0xd1,0x85); | ||
375 | &LL(0x0e,0x0e,0x38,0x0e,0x70,0x36,0x1c,0x7e); | ||
376 | &LL(0x1f,0x1f,0x7c,0x1f,0xf8,0x63,0x3e,0xe7); | ||
377 | &LL(0x62,0x62,0x95,0x62,0x37,0xf7,0xc4,0x55); | ||
378 | &LL(0xd4,0xd4,0x77,0xd4,0xee,0xa3,0xb5,0x3a); | ||
379 | &LL(0xa8,0xa8,0x9a,0xa8,0x29,0x32,0x4d,0x81); | ||
380 | &LL(0x96,0x96,0x62,0x96,0xc4,0xf4,0x31,0x52); | ||
381 | &LL(0xf9,0xf9,0xc3,0xf9,0x9b,0x3a,0xef,0x62); | ||
382 | &LL(0xc5,0xc5,0x33,0xc5,0x66,0xf6,0x97,0xa3); | ||
383 | &LL(0x25,0x25,0x94,0x25,0x35,0xb1,0x4a,0x10); | ||
384 | &LL(0x59,0x59,0x79,0x59,0xf2,0x20,0xb2,0xab); | ||
385 | &LL(0x84,0x84,0x2a,0x84,0x54,0xae,0x15,0xd0); | ||
386 | &LL(0x72,0x72,0xd5,0x72,0xb7,0xa7,0xe4,0xc5); | ||
387 | &LL(0x39,0x39,0xe4,0x39,0xd5,0xdd,0x72,0xec); | ||
388 | &LL(0x4c,0x4c,0x2d,0x4c,0x5a,0x61,0x98,0x16); | ||
389 | &LL(0x5e,0x5e,0x65,0x5e,0xca,0x3b,0xbc,0x94); | ||
390 | &LL(0x78,0x78,0xfd,0x78,0xe7,0x85,0xf0,0x9f); | ||
391 | &LL(0x38,0x38,0xe0,0x38,0xdd,0xd8,0x70,0xe5); | ||
392 | &LL(0x8c,0x8c,0x0a,0x8c,0x14,0x86,0x05,0x98); | ||
393 | &LL(0xd1,0xd1,0x63,0xd1,0xc6,0xb2,0xbf,0x17); | ||
394 | &LL(0xa5,0xa5,0xae,0xa5,0x41,0x0b,0x57,0xe4); | ||
395 | &LL(0xe2,0xe2,0xaf,0xe2,0x43,0x4d,0xd9,0xa1); | ||
396 | &LL(0x61,0x61,0x99,0x61,0x2f,0xf8,0xc2,0x4e); | ||
397 | &LL(0xb3,0xb3,0xf6,0xb3,0xf1,0x45,0x7b,0x42); | ||
398 | &LL(0x21,0x21,0x84,0x21,0x15,0xa5,0x42,0x34); | ||
399 | &LL(0x9c,0x9c,0x4a,0x9c,0x94,0xd6,0x25,0x08); | ||
400 | &LL(0x1e,0x1e,0x78,0x1e,0xf0,0x66,0x3c,0xee); | ||
401 | &LL(0x43,0x43,0x11,0x43,0x22,0x52,0x86,0x61); | ||
402 | &LL(0xc7,0xc7,0x3b,0xc7,0x76,0xfc,0x93,0xb1); | ||
403 | &LL(0xfc,0xfc,0xd7,0xfc,0xb3,0x2b,0xe5,0x4f); | ||
404 | &LL(0x04,0x04,0x10,0x04,0x20,0x14,0x08,0x24); | ||
405 | &LL(0x51,0x51,0x59,0x51,0xb2,0x08,0xa2,0xe3); | ||
406 | &LL(0x99,0x99,0x5e,0x99,0xbc,0xc7,0x2f,0x25); | ||
407 | &LL(0x6d,0x6d,0xa9,0x6d,0x4f,0xc4,0xda,0x22); | ||
408 | &LL(0x0d,0x0d,0x34,0x0d,0x68,0x39,0x1a,0x65); | ||
409 | &LL(0xfa,0xfa,0xcf,0xfa,0x83,0x35,0xe9,0x79); | ||
410 | &LL(0xdf,0xdf,0x5b,0xdf,0xb6,0x84,0xa3,0x69); | ||
411 | &LL(0x7e,0x7e,0xe5,0x7e,0xd7,0x9b,0xfc,0xa9); | ||
412 | &LL(0x24,0x24,0x90,0x24,0x3d,0xb4,0x48,0x19); | ||
413 | &LL(0x3b,0x3b,0xec,0x3b,0xc5,0xd7,0x76,0xfe); | ||
414 | &LL(0xab,0xab,0x96,0xab,0x31,0x3d,0x4b,0x9a); | ||
415 | &LL(0xce,0xce,0x1f,0xce,0x3e,0xd1,0x81,0xf0); | ||
416 | &LL(0x11,0x11,0x44,0x11,0x88,0x55,0x22,0x99); | ||
417 | &LL(0x8f,0x8f,0x06,0x8f,0x0c,0x89,0x03,0x83); | ||
418 | &LL(0x4e,0x4e,0x25,0x4e,0x4a,0x6b,0x9c,0x04); | ||
419 | &LL(0xb7,0xb7,0xe6,0xb7,0xd1,0x51,0x73,0x66); | ||
420 | &LL(0xeb,0xeb,0x8b,0xeb,0x0b,0x60,0xcb,0xe0); | ||
421 | &LL(0x3c,0x3c,0xf0,0x3c,0xfd,0xcc,0x78,0xc1); | ||
422 | &LL(0x81,0x81,0x3e,0x81,0x7c,0xbf,0x1f,0xfd); | ||
423 | &LL(0x94,0x94,0x6a,0x94,0xd4,0xfe,0x35,0x40); | ||
424 | &LL(0xf7,0xf7,0xfb,0xf7,0xeb,0x0c,0xf3,0x1c); | ||
425 | &LL(0xb9,0xb9,0xde,0xb9,0xa1,0x67,0x6f,0x18); | ||
426 | &LL(0x13,0x13,0x4c,0x13,0x98,0x5f,0x26,0x8b); | ||
427 | &LL(0x2c,0x2c,0xb0,0x2c,0x7d,0x9c,0x58,0x51); | ||
428 | &LL(0xd3,0xd3,0x6b,0xd3,0xd6,0xb8,0xbb,0x05); | ||
429 | &LL(0xe7,0xe7,0xbb,0xe7,0x6b,0x5c,0xd3,0x8c); | ||
430 | &LL(0x6e,0x6e,0xa5,0x6e,0x57,0xcb,0xdc,0x39); | ||
431 | &LL(0xc4,0xc4,0x37,0xc4,0x6e,0xf3,0x95,0xaa); | ||
432 | &LL(0x03,0x03,0x0c,0x03,0x18,0x0f,0x06,0x1b); | ||
433 | &LL(0x56,0x56,0x45,0x56,0x8a,0x13,0xac,0xdc); | ||
434 | &LL(0x44,0x44,0x0d,0x44,0x1a,0x49,0x88,0x5e); | ||
435 | &LL(0x7f,0x7f,0xe1,0x7f,0xdf,0x9e,0xfe,0xa0); | ||
436 | &LL(0xa9,0xa9,0x9e,0xa9,0x21,0x37,0x4f,0x88); | ||
437 | &LL(0x2a,0x2a,0xa8,0x2a,0x4d,0x82,0x54,0x67); | ||
438 | &LL(0xbb,0xbb,0xd6,0xbb,0xb1,0x6d,0x6b,0x0a); | ||
439 | &LL(0xc1,0xc1,0x23,0xc1,0x46,0xe2,0x9f,0x87); | ||
440 | &LL(0x53,0x53,0x51,0x53,0xa2,0x02,0xa6,0xf1); | ||
441 | &LL(0xdc,0xdc,0x57,0xdc,0xae,0x8b,0xa5,0x72); | ||
442 | &LL(0x0b,0x0b,0x2c,0x0b,0x58,0x27,0x16,0x53); | ||
443 | &LL(0x9d,0x9d,0x4e,0x9d,0x9c,0xd3,0x27,0x01); | ||
444 | &LL(0x6c,0x6c,0xad,0x6c,0x47,0xc1,0xd8,0x2b); | ||
445 | &LL(0x31,0x31,0xc4,0x31,0x95,0xf5,0x62,0xa4); | ||
446 | &LL(0x74,0x74,0xcd,0x74,0x87,0xb9,0xe8,0xf3); | ||
447 | &LL(0xf6,0xf6,0xff,0xf6,0xe3,0x09,0xf1,0x15); | ||
448 | &LL(0x46,0x46,0x05,0x46,0x0a,0x43,0x8c,0x4c); | ||
449 | &LL(0xac,0xac,0x8a,0xac,0x09,0x26,0x45,0xa5); | ||
450 | &LL(0x89,0x89,0x1e,0x89,0x3c,0x97,0x0f,0xb5); | ||
451 | &LL(0x14,0x14,0x50,0x14,0xa0,0x44,0x28,0xb4); | ||
452 | &LL(0xe1,0xe1,0xa3,0xe1,0x5b,0x42,0xdf,0xba); | ||
453 | &LL(0x16,0x16,0x58,0x16,0xb0,0x4e,0x2c,0xa6); | ||
454 | &LL(0x3a,0x3a,0xe8,0x3a,0xcd,0xd2,0x74,0xf7); | ||
455 | &LL(0x69,0x69,0xb9,0x69,0x6f,0xd0,0xd2,0x06); | ||
456 | &LL(0x09,0x09,0x24,0x09,0x48,0x2d,0x12,0x41); | ||
457 | &LL(0x70,0x70,0xdd,0x70,0xa7,0xad,0xe0,0xd7); | ||
458 | &LL(0xb6,0xb6,0xe2,0xb6,0xd9,0x54,0x71,0x6f); | ||
459 | &LL(0xd0,0xd0,0x67,0xd0,0xce,0xb7,0xbd,0x1e); | ||
460 | &LL(0xed,0xed,0x93,0xed,0x3b,0x7e,0xc7,0xd6); | ||
461 | &LL(0xcc,0xcc,0x17,0xcc,0x2e,0xdb,0x85,0xe2); | ||
462 | &LL(0x42,0x42,0x15,0x42,0x2a,0x57,0x84,0x68); | ||
463 | &LL(0x98,0x98,0x5a,0x98,0xb4,0xc2,0x2d,0x2c); | ||
464 | &LL(0xa4,0xa4,0xaa,0xa4,0x49,0x0e,0x55,0xed); | ||
465 | &LL(0x28,0x28,0xa0,0x28,0x5d,0x88,0x50,0x75); | ||
466 | &LL(0x5c,0x5c,0x6d,0x5c,0xda,0x31,0xb8,0x86); | ||
467 | &LL(0xf8,0xf8,0xc7,0xf8,0x93,0x3f,0xed,0x6b); | ||
468 | &LL(0x86,0x86,0x22,0x86,0x44,0xa4,0x11,0xc2); | ||
469 | |||
470 | &L(0x18,0x23,0xc6,0xe8,0x87,0xb8,0x01,0x4f); # rc[ROUNDS] | ||
471 | &L(0x36,0xa6,0xd2,0xf5,0x79,0x6f,0x91,0x52); | ||
472 | &L(0x60,0xbc,0x9b,0x8e,0xa3,0x0c,0x7b,0x35); | ||
473 | &L(0x1d,0xe0,0xd7,0xc2,0x2e,0x4b,0xfe,0x57); | ||
474 | &L(0x15,0x77,0x37,0xe5,0x9f,0xf0,0x4a,0xda); | ||
475 | &L(0x58,0xc9,0x29,0x0a,0xb1,0xa0,0x6b,0x85); | ||
476 | &L(0xbd,0x5d,0x10,0xf4,0xcb,0x3e,0x05,0x67); | ||
477 | &L(0xe4,0x27,0x41,0x8b,0xa7,0x7d,0x95,0xd8); | ||
478 | &L(0xfb,0xee,0x7c,0x66,0xdd,0x17,0x47,0x9e); | ||
479 | &L(0xca,0x2d,0xbf,0x07,0xad,0x5a,0x83,0x33); | ||
480 | |||
481 | $code =~ s/\`([^\`]*)\`/eval $1/gem; | ||
482 | print $code; | ||
483 | close STDOUT; | ||