2 ! des_enc.S (generated from des_enc.m4)
4 ! UltraSPARC assembler version of the LibDES/SSLeay/OpenSSL des_enc.c file.
6 ! Version 1.0. 32-bit version.
10 ! Version 2.0. 32/64-bit, PIC-ification, blended CPU adaptation
15 ! Assembler version: Copyright Svend Olaf Mikkelsen.
17 ! Original C code: Copyright Eric A. Young.
19 ! This code can be freely used by LibDES/SSLeay/OpenSSL users.
21 ! The LibDES/SSLeay/OpenSSL copyright notices must be respected.
23 ! This version can be redistributed.
25 ! To expand the m4 macros: m4 -B 8192 des_enc.m4 > des_enc.S
27 ! Global registers 1 to 5 are used. This is the same as done by the
28 ! cc compiler. The UltraSPARC load/store little endian feature is used.
30 ! Instruction grouping often refers to one CPU cycle.
32 ! Assemble through gcc: gcc -c -mcpu=ultrasparc -o des_enc.o des_enc.S
34 ! Assemble through cc: cc -c -xarch=v8plusa -o des_enc.o des_enc.S
36 ! Performance improvement according to './apps/openssl speed des'
39 ! 23% faster than cc-5.2 -xarch=v8plus -xO5
40 ! 115% faster than gcc-3.2.1 -m32 -mcpu=ultrasparc -O5
42 ! 50% faster than cc-5.2 -xarch=v9 -xO5
43 ! 100% faster than gcc-3.2.1 -m64 -mcpu=ultrasparc -O5
46 .ident "des_enc.m4 2.1"
47 .file "des_enc-sparc.S"
49 #ifdef OPENSSL_FIPSCANISTER
50 #include <openssl/fipssyms.h>
53 #if defined(__SUNPRO_C) && defined(__sparcv9)
54 # define ABI64 /* They've said -xarch=v9 at command line */
55 #elif defined(__GNUC__) && defined(__arch64__)
56 # define ABI64 /* They've said -m64 at command line */
60 .register %g2,#scratch
61 .register %g3,#scratch
68 # ifndef OPENSSL_SYSNAME_ULTRASPARC
69 # define OPENSSL_SYSNAME_ULTRASPARC
126 ! The logic used in initial and final permutations is the same as in
127 ! the C code. The permutations are done with a clever shift, xor, and
130 ! The macro also loads address sbox 1 to 5 to global 1 to 5, address
131 ! sbox 6 to local6, and addres sbox 8 to out3.
133 ! Rotates the halfs 3 left to bring the sbox bits in convenient positions.
135 ! Loads key first round from address in parameter 5 to out0, out1.
137 ! After the the original LibDES initial permutation, the resulting left
138 ! is in the variable initially used for right and vice versa. The macro
139 ! implements the possibility to keep the halfs in the original registers.
143 ! parameter 3 result left (modify in first round)
144 ! parameter 4 result right (use in first round)
145 ! parameter 5 key address
146 ! parameter 6 1/2 for include encryption/decryption
147 ! parameter 7 1 for move in1 to in3
148 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
149 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
154 ! $1 $2 $4 $3 $5 $6 $7 $8 $9
156 ld [out2+256], local1
159 xor local4, $1, local4
160 ifelse($7,1,{mov in1, in3},{nop})
162 ld [out2+260], local2
163 and local4, local1, local4
164 ifelse($8,1,{mov in3, in4},{})
165 ifelse($8,2,{mov in4, in3},{})
167 ld [out2+280], out4 ! loop counter
168 sll local4, 4, local1
171 ld [out2+264], local3
175 ifelse($9,1,{LDPTR KS3, in4},{})
176 xor local4, $2, local4
177 nop !sethi %hi(DES_SPtrans), global1 ! sbox addr
179 ifelse($9,1,{LDPTR KS2, in3},{})
180 and local4, local2, local4
181 nop !or global1, %lo(DES_SPtrans), global1 ! sbox addr
183 sll local4, 16, local1
189 sethi %hi(16711680), local5
190 xor local4, $1, local4
192 and local4, local3, local4
193 or local5, 255, local5
195 sll local4, 2, local2
201 xor local4, $2, local4
202 add global1, 768, global4
204 and local4, local5, local4
205 add global1, 1024, global5
207 ld [out2+272], local7
208 sll local4, 8, local1
214 ld [$5], out0 ! key 7531
215 xor local4, $1, local4
216 add global1, 256, global2
218 ld [$5+4], out1 ! key 8642
219 and local4, local7, local4
220 add global1, 512, global3
222 sll local4, 1, local1
229 add global1, 1280, local6 ! address sbox 8
232 add global1, 1792, out3 ! address sbox 8
235 or local4, local3, $4
237 or local2, local1, $3
241 ld [out2+284], local5 ! 0x0000FC00 used in the rounds
242 or local2, local1, $3
246 and local1, 252, local1
252 ld [out2+284], local5 ! 0x0000FC00 used in the rounds
253 or local2, local1, $3
257 and local1, 252, local1
265 ! The logic used in the DES rounds is the same as in the C code,
266 ! except that calculations for sbox 1 and sbox 5 begin before
267 ! the previous round is finished.
269 ! In each round one half (work) is modified based on key and the
272 ! In this version we do two rounds in a loop repeated 7 times
273 ! and two rounds seperately.
275 ! One half has the bits for the sboxes in the following positions:
277 ! 777777xx555555xx333333xx111111xx
279 ! 88xx666666xx444444xx222222xx8888
281 ! The bits for each sbox are xor-ed with the key bits for that box.
282 ! The above xx bits are cleared, and the result used for lookup in
283 ! the sbox table. Each sbox entry contains the 4 output bits permuted
284 ! into 32 bits according to the P permutation.
286 ! In the description of DES, left and right are switched after
287 ! each round, except after last round. In this code the original
288 ! left and right are kept in the same register in all rounds, meaning
289 ! that after the 16 rounds the result for right is in the register
290 ! originally used for left.
292 ! parameter 1 first work (left in first round)
293 ! parameter 2 first use (right in first round)
294 ! parameter 3 enc/dec 1/-1
295 ! parameter 4 loop label
296 ! parameter 5 key address register
297 ! parameter 6 optional address for key next encryption/decryption
298 ! parameter 7 not empty for include retl
300 ! also compares in2 to 8
302 define(rounds_macro, {
305 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
309 ld [out2+284], local5 ! 0x0000FC00
311 and local1, 252, local1
316 ! local6 is address sbox 6
317 ! out3 is address sbox 8
318 ! out4 is loop counter
320 ld [global1+local1], local1
321 xor $2, out1, out1 ! 8642
322 xor $2, out0, out0 ! 7531
323 ! fmovs %f0, %f0 ! fxor used for alignment
325 srl out1, 4, local0 ! rotate 4 right
326 and out0, local5, local3 ! 3
329 ld [$5+$3*8], local7 ! key 7531 next round
330 srl local3, 8, local3 ! 3
331 and local0, 252, local2 ! 2
334 ld [global3+local3],local3 ! 3
335 sll out1, 28, out1 ! rotate
336 xor $1, local1, $1 ! 1 finished, local1 now sbox 7
338 ld [global2+local2], local2 ! 2
339 srl out0, 24, local1 ! 7
340 or out1, local0, out1 ! rotate
342 ldub [out2+local1], local1 ! 7 (and 0xFC)
343 srl out1, 24, local0 ! 8
344 and out1, local5, local4 ! 4
346 ldub [out2+local0], local0 ! 8 (and 0xFC)
347 srl local4, 8, local4 ! 4
348 xor $1, local2, $1 ! 2 finished local2 now sbox 6
350 ld [global4+local4],local4 ! 4
351 srl out1, 16, local2 ! 6
352 xor $1, local3, $1 ! 3 finished local3 now sbox 5
354 ld [out3+local0],local0 ! 8
355 and local2, 252, local2 ! 6
356 add global1, 1536, local5 ! address sbox 7
358 ld [local6+local2], local2 ! 6
359 srl out0, 16, local3 ! 5
360 xor $1, local4, $1 ! 4 finished
362 ld [local5+local1],local1 ! 7
363 and local3, 252, local3 ! 5
364 xor $1, local0, $1 ! 8 finished
366 ld [global5+local3],local3 ! 5
367 xor $1, local2, $1 ! 6 finished
370 ld [$5+$3*8+4], out0 ! key 8642 next round
371 xor $1, local7, local2 ! sbox 5 next round
372 xor $1, local1, $1 ! 7 finished
374 srl local2, 16, local2 ! sbox 5 next round
375 xor $1, local3, $1 ! 5 finished
377 ld [$5+$3*16+4], out1 ! key 8642 next round again
378 and local2, 252, local2 ! sbox5 next round
380 xor $1, local7, local7 ! 7531
382 ld [global5+local2], local2 ! 5
383 srl local7, 24, local3 ! 7
384 xor $1, out0, out0 ! 8642
386 ldub [out2+local3], local3 ! 7 (and 0xFC)
387 srl out0, 4, local0 ! rotate 4 right
388 and local7, 252, local1 ! 1
390 sll out0, 28, out0 ! rotate
391 xor $2, local2, $2 ! 5 finished local2 used
393 srl local0, 8, local4 ! 4
394 and local0, 252, local2 ! 2
395 ld [local5+local3], local3 ! 7
397 srl local0, 16, local5 ! 6
398 or out0, local0, out0 ! rotate
399 ld [global2+local2], local2 ! 2
402 ld [$5+$3*16], out0 ! key 7531 next round
403 and local4, 252, local4 ! 4
405 and local5, 252, local5 ! 6
406 ld [global4+local4], local4 ! 4
407 xor $2, local3, $2 ! 7 finished local3 used
409 and local0, 252, local0 ! 8
410 ld [local6+local5], local5 ! 6
411 xor $2, local2, $2 ! 2 finished local2 now sbox 3
413 srl local7, 8, local2 ! 3 start
414 ld [out3+local0], local0 ! 8
415 xor $2, local4, $2 ! 4 finished
417 and local2, 252, local2 ! 3
418 ld [global1+local1], local1 ! 1
419 xor $2, local5, $2 ! 6 finished local5 used
421 ld [global3+local2], local2 ! 3
422 xor $2, local0, $2 ! 8 finished
423 add $5, $3*16, $5 ! enc add 8, dec add -8 to key pointer
425 ld [out2+284], local5 ! 0x0000FC00
426 xor $2, out0, local4 ! sbox 1 next round
427 xor $2, local1, $2 ! 1 finished
429 xor $2, local2, $2 ! 3 finished
430 #ifdef OPENSSL_SYSNAME_ULTRASPARC
435 and local4, 252, local1 ! sbox 1 next round
439 ld [global1+local1], local1
443 srl out1, 4, local0 ! rotate
444 and out0, local5, local3
446 ld [$5+$3*8], local7 ! key 7531
447 srl local3, 8, local3
448 and local0, 252, local2
450 ld [global3+local3],local3
451 sll out1, 28, out1 ! rotate
452 xor $1, local1, $1 ! 1 finished, local1 now sbox 7
454 ld [global2+local2], local2
456 or out1, local0, out1 ! rotate
458 ldub [out2+local1], local1
460 and out1, local5, local4
462 ldub [out2+local0], local0
463 srl local4, 8, local4
464 xor $1, local2, $1 ! 2 finished local2 now sbox 6
466 ld [global4+local4],local4
468 xor $1, local3, $1 ! 3 finished local3 now sbox 5
470 ld [out3+local0],local0
471 and local2, 252, local2
472 add global1, 1536, local5 ! address sbox 7
474 ld [local6+local2], local2
476 xor $1, local4, $1 ! 4 finished
478 ld [local5+local1],local1
479 and local3, 252, local3
482 ld [global5+local3],local3
483 xor $1, local2, $1 ! 6 finished
486 ifelse($6,{}, {}, {ld [out2+280], out4}) ! loop counter
487 xor $1, local7, local2 ! sbox 5 next round
488 xor $1, local1, $1 ! 7 finished
491 srl local2, 16, local2 ! sbox 5 next round
492 xor $1, local3, $1 ! 5 finished
494 and local2, 252, local2
495 ! next round (two rounds more)
496 xor $1, local7, local7 ! 7531
498 ld [global5+local2], local2
499 srl local7, 24, local3
500 xor $1, out0, out0 ! 8642
502 ldub [out2+local3], local3
503 srl out0, 4, local0 ! rotate
504 and local7, 252, local1
506 sll out0, 28, out0 ! rotate
507 xor $2, local2, $2 ! 5 finished local2 used
509 srl local0, 8, local4
510 and local0, 252, local2
511 ld [local5+local3], local3
513 srl local0, 16, local5
514 or out0, local0, out0 ! rotate
515 ld [global2+local2], local2
518 ifelse($6,{}, {}, {ld [$6], out0}) ! key next encryption/decryption
519 and local4, 252, local4
521 and local5, 252, local5
522 ld [global4+local4], local4
523 xor $2, local3, $2 ! 7 finished local3 used
525 and local0, 252, local0
526 ld [local6+local5], local5
527 xor $2, local2, $2 ! 2 finished local2 now sbox 3
529 srl local7, 8, local2 ! 3 start
530 ld [out3+local0], local0
533 and local2, 252, local2
534 ld [global1+local1], local1
535 xor $2, local5, $2 ! 6 finished local5 used
537 ld [global3+local2], local2
541 ifelse($6,{}, {}, {ld [$6+4], out1}) ! key next encryption/decryption
545 ifelse($7,{}, {}, {retl})
552 ! parameter 1 right (original left)
553 ! parameter 2 left (original right)
554 ! parameter 3 1 for optional store to [in0]
555 ! parameter 4 1 for load input/output address to local5/7
557 ! The final permutation logic switches the halfes, meaning that
558 ! left and right ends up the the registers originally used.
563 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
565 ! initially undo the rotate 3 left done after initial permutation
566 ! original left is received shifted 3 right and 29 left in local3/4
569 or local3, local4, $1
572 sethi %hi(0x55555555), local2
575 or local2, %lo(0x55555555), local2
578 sethi %hi(0x00ff00ff), local1
579 xor local3, $1, local3
580 or local1, %lo(0x00ff00ff), local1
581 and local3, local2, local3
582 sethi %hi(0x33333333), local4
583 sll local3, 1, local2
589 xor local3, $2, local3
590 or local4, %lo(0x33333333), local4
591 and local3, local1, local3
592 sethi %hi(0x0000ffff), local1
593 sll local3, 8, local2
599 xor local3, $1, local3
600 or local1, %lo(0x0000ffff), local1
601 and local3, local4, local3
602 sethi %hi(0x0f0f0f0f), local4
603 sll local3, 2, local2
605 ifelse($4,1, {LDPTR INPUT, local5})
608 ifelse($4,1, {LDPTR OUTPUT, local7})
611 xor local3, $2, local3
612 or local4, %lo(0x0f0f0f0f), local4
613 and local3, local1, local3
614 sll local3, 16, local2
616 xor $2, local3, local1
618 srl local1, 4, local3
620 xor local3, $1, local3
621 and local3, local4, local3
622 sll local3, 4, local2
628 ifelse($3,1, {st $1, [in0]})
630 xor local1, local2, $2
632 ifelse($3,1, {st $2, [in0+4]})
639 ! Does initial permutation for next block mixed with
640 ! final permutation for current block.
642 ! parameter 1 original left
643 ! parameter 2 original right
644 ! parameter 3 left ip
645 ! parameter 4 right ip
646 ! parameter 5 1: load ks1/ks2 to in3/in4, add 120 to in4
649 ! also adds -8 to length in2 and loads loop counter to out4
651 define(fp_ip_macro, {
654 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
656 define({temp1},{out4})
657 define({temp2},{local3})
659 define({ip1},{local1})
660 define({ip2},{local2})
661 define({ip4},{local4})
662 define({ip5},{local5})
664 ! $1 in local3, local4
668 or local3, local4, $1
671 ifelse($5,2,{mov in4, in3})
680 and temp1, ip5, temp1
681 xor local0, $3, local0
686 and local0, ip1, local0
689 sll local0, 4, local7
699 xor local0, $4, local0
700 and temp1, ip4, temp1
701 and local0, ip2, local0
704 sll local0, 16, local7
710 ld [out2+264], temp2 ! ip3
714 xor local0, $3, local0
715 and temp1, temp2, temp1
716 and local0, temp2, local0
719 sll local0, 2, local7
727 xor local0, $4, local0
728 and temp1, ip2, temp1
729 and local0, ip4, local0
731 xor $2, temp1, local4
732 sll local0, 8, local7
739 xor local0, $3, local0
742 and local0, ip5, local0
744 sll local0, 1, local7
751 and temp1, ip1, temp1
756 ifelse($5,1,{LDPTR KS2, in4})
758 xor local4, temp2, $2
760 ! reload since used as temporar:
762 ld [out2+280], out4 ! loop counter
765 ifelse($5,1,{add in4, 120, in4})
767 ifelse($5,1,{LDPTR KS1, in3})
770 or local0, local5, $4
771 or local2, local7, $3
777 ! {load_little_endian}
779 ! parameter 1 address
780 ! parameter 2 destination left
781 ! parameter 3 destination right
782 ! parameter 4 temporar
785 define(load_little_endian, {
787 ! {load_little_endian}
788 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
790 ! first in memory to rightmost in register
792 #ifdef OPENSSL_SYSNAME_ULTRASPARC
838 ! {load_little_endian_inc}
840 ! parameter 1 address
841 ! parameter 2 destination left
842 ! parameter 3 destination right
843 ! parameter 4 temporar
848 define(load_little_endian_inc, {
850 ! {load_little_endian_inc}
851 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
853 ! first in memory to rightmost in register
855 #ifdef OPENSSL_SYSNAME_ULTRASPARC
904 ! Loads 1 to 7 bytes little endian
905 ! Remaining bytes are zeroed.
907 ! parameter 1 address
909 ! parameter 3 destination register left
910 ! parameter 4 destination register right
914 ! parameter 8 return label
916 define(load_n_bytes, {
919 ! $1 $2 $5 $6 $7 $8 $7 $8 $9
924 add %o7,$7.jmp.table-$7.0,$5
976 ! {store_little_endian}
978 ! parameter 1 address
979 ! parameter 2 source left
980 ! parameter 3 source right
981 ! parameter 4 temporar
983 define(store_little_endian, {
985 ! {store_little_endian}
986 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
988 ! rightmost in register to first in memory
990 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1039 ! Stores 1 to 7 bytes little endian
1041 ! parameter 1 address
1042 ! parameter 2 length
1043 ! parameter 3 source register left
1044 ! parameter 4 source register right
1048 ! parameter 8 return label
1050 define(store_n_bytes, {
1053 ! $1 $2 $5 $6 $7 $8 $7 $8 $9
1058 add %o7,$7.jmp.table-$7.0,$5
1111 define(testvalue,{1})
1113 define(register_init, {
1115 ! For test purposes:
1117 sethi %hi(testvalue), local0
1118 or local0, %lo(testvalue), local0
1120 ifelse($1,{},{}, {mov local0, $1})
1121 ifelse($2,{},{}, {mov local0, $2})
1122 ifelse($3,{},{}, {mov local0, $3})
1123 ifelse($4,{},{}, {mov local0, $4})
1124 ifelse($5,{},{}, {mov local0, $5})
1125 ifelse($6,{},{}, {mov local0, $6})
1126 ifelse($7,{},{}, {mov local0, $7})
1127 ifelse($8,{},{}, {mov local0, $8})
1157 ! loads key next encryption/decryption first round from [in4]
1159 rounds_macro(in5, out5, 1, .des_enc.1, in3, in4, retl)
1166 ! implemented with out5 as first parameter to avoid
1167 ! register exchange in ede modes
1170 ! loads key next encryption/decryption first round from [in3]
1172 rounds_macro(out5, in5, -1, .des_dec.1, in4, in3, retl)
1176 ! void DES_encrypt1(data, ks, enc)
1177 ! *******************************
1180 .global DES_encrypt1
1181 .type DES_encrypt1,#function
1185 save %sp, FRAME, %sp
1187 sethi %hi(.PIC.DES_SPtrans-1f),global1
1188 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1190 add %o7,global1,global1
1191 sub global1,.PIC.DES_SPtrans-.des_and,out2
1193 ld [in0], in5 ! left
1196 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1197 be,pn %icc, .encrypt.dec ! enc/dec
1201 ld [in0+4], out5 ! right
1203 ! parameter 6 1/2 for include encryption/decryption
1204 ! parameter 7 1 for move in1 to in3
1205 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1207 ip_macro(in5, out5, in5, out5, in3, 0, 1, 1)
1209 rounds_macro(in5, out5, 1, .des_encrypt1.1, in3, in4) ! in4 not used
1211 fp_macro(in5, out5, 1) ! 1 for store to [in0]
1218 add in1, 120, in3 ! use last subkey for first round
1220 ! parameter 6 1/2 for include encryption/decryption
1221 ! parameter 7 1 for move in1 to in3
1222 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1224 ip_macro(in5, out5, out5, in5, in4, 2, 0, 1) ! include dec, ks in4
1226 fp_macro(out5, in5, 1) ! 1 for store to [in0]
1232 .size DES_encrypt1,.DES_encrypt1.end-DES_encrypt1
1235 ! void DES_encrypt2(data, ks, enc)
1236 !*********************************
1238 ! encrypts/decrypts without initial/final permutation
1241 .global DES_encrypt2
1242 .type DES_encrypt2,#function
1246 save %sp, FRAME, %sp
1248 sethi %hi(.PIC.DES_SPtrans-1f),global1
1249 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1251 add %o7,global1,global1
1252 sub global1,.PIC.DES_SPtrans-.des_and,out2
1254 ! Set sbox address 1 to 6 and rotate halfs 3 left
1255 ! Errors caught by destest? Yes. Still? *NO*
1257 !sethi %hi(DES_SPtrans), global1 ! address sbox 1
1259 !or global1, %lo(DES_SPtrans), global1 ! sbox 1
1261 add global1, 256, global2 ! sbox 2
1262 add global1, 512, global3 ! sbox 3
1264 ld [in0], out5 ! right
1265 add global1, 768, global4 ! sbox 4
1266 add global1, 1024, global5 ! sbox 5
1268 ld [in0+4], in5 ! left
1269 add global1, 1280, local6 ! sbox 6
1270 add global1, 1792, out3 ! sbox 8
1275 mov in1, in3 ! key address to in3
1281 add in5, local5, in5
1283 add out5, local7, out5
1286 ! we use our own stackframe
1288 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1289 be,pn %icc, .encrypt2.dec ! decryption
1293 STPTR in0, [%sp+BIAS+ARG0+0*ARGSZ]
1295 ld [in3], out0 ! key 7531 first round
1296 mov LOOPS, out4 ! loop counter
1298 ld [in3+4], out1 ! key 8642 first round
1299 sethi %hi(0x0000FC00), local5
1310 LDPTR [%sp+BIAS+ARG0+0*ARGSZ], in0
1323 ld [in4], out0 ! key 7531 first round
1324 mov LOOPS, out4 ! loop counter
1326 ld [in4+4], out1 ! key 8642 first round
1327 sethi %hi(0x0000FC00), local5
1329 mov in5, local1 ! left expected in out5
1343 LDPTR [%sp+BIAS+ARG0+0*ARGSZ], in0
1352 .size DES_encrypt2, .DES_encrypt2.end-DES_encrypt2
1355 ! void DES_encrypt3(data, ks1, ks2, ks3)
1356 ! **************************************
1359 .global DES_encrypt3
1360 .type DES_encrypt3,#function
1364 save %sp, FRAME, %sp
1366 sethi %hi(.PIC.DES_SPtrans-1f),global1
1367 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1369 add %o7,global1,global1
1370 sub global1,.PIC.DES_SPtrans-.des_and,out2
1372 ld [in0], in5 ! left
1373 add in2, 120, in4 ! ks2
1375 ld [in0+4], out5 ! right
1376 mov in3, in2 ! save ks3
1378 ! parameter 6 1/2 for include encryption/decryption
1379 ! parameter 7 1 for mov in1 to in3
1380 ! parameter 8 1 for mov in3 to in4
1381 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1383 ip_macro(in5, out5, in5, out5, in3, 1, 1, 0, 0)
1386 mov in2, in3 ! preload ks3
1391 fp_macro(in5, out5, 1)
1397 .size DES_encrypt3,.DES_encrypt3.end-DES_encrypt3
1400 ! void DES_decrypt3(data, ks1, ks2, ks3)
1401 ! **************************************
1404 .global DES_decrypt3
1405 .type DES_decrypt3,#function
1409 save %sp, FRAME, %sp
1411 sethi %hi(.PIC.DES_SPtrans-1f),global1
1412 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1414 add %o7,global1,global1
1415 sub global1,.PIC.DES_SPtrans-.des_and,out2
1417 ld [in0], in5 ! left
1418 add in3, 120, in4 ! ks3
1420 ld [in0+4], out5 ! right
1423 ! parameter 6 1/2 for include encryption/decryption
1424 ! parameter 7 1 for mov in1 to in3
1425 ! parameter 8 1 for mov in3 to in4
1426 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1428 ip_macro(in5, out5, out5, in5, in4, 2, 0, 0, 0)
1431 add in1, 120, in4 ! preload ks1
1436 fp_macro(out5, in5, 1)
1442 .size DES_decrypt3,.DES_decrypt3.end-DES_decrypt3
1444 ! void DES_ncbc_encrypt(input, output, length, schedule, ivec, enc)
1445 ! *****************************************************************
1449 .global DES_ncbc_encrypt
1450 .type DES_ncbc_encrypt,#function
1454 save %sp, FRAME, %sp
1456 define({INPUT}, { [%sp+BIAS+ARG0+0*ARGSZ] })
1457 define({OUTPUT}, { [%sp+BIAS+ARG0+1*ARGSZ] })
1458 define({IVEC}, { [%sp+BIAS+ARG0+4*ARGSZ] })
1460 sethi %hi(.PIC.DES_SPtrans-1f),global1
1461 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1463 add %o7,global1,global1
1464 sub global1,.PIC.DES_SPtrans-.des_and,out2
1468 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1469 be,pn %icc, .ncbc.dec
1475 ! addr left right temp label
1476 load_little_endian(in4, in5, out5, local3, .LLE1) ! iv
1478 addcc in2, -8, in2 ! bytes missing when first block done
1480 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1481 bl,pn %icc, .ncbc.enc.seven.or.less
1483 bl .ncbc.enc.seven.or.less
1485 mov in3, in4 ! schedule
1487 .ncbc.enc.next.block:
1489 load_little_endian(in0, out4, global4, local3, .LLE2) ! block
1491 .ncbc.enc.next.block_1:
1493 xor in5, out4, in5 ! iv xor
1494 xor out5, global4, out5 ! iv xor
1496 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1497 ip_macro(in5, out5, in5, out5, in3, 0, 0, 2)
1499 .ncbc.enc.next.block_2:
1501 !// call .des_enc ! compares in2 to 8
1502 ! rounds inlined for alignment purposes
1504 add global1, 768, global4 ! address sbox 4 since register used below
1506 rounds_macro(in5, out5, 1, .ncbc.enc.1, in3, in4) ! include encryption ks in3
1508 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1509 bl,pn %icc, .ncbc.enc.next.block_fp
1511 bl .ncbc.enc.next.block_fp
1513 add in0, 8, in0 ! input address
1515 ! If 8 or more bytes are to be encrypted after this block,
1516 ! we combine final permutation for this block with initial
1517 ! permutation for next block. Load next block:
1519 load_little_endian(in0, global3, global4, local5, .LLE12)
1521 ! parameter 1 original left
1522 ! parameter 2 original right
1523 ! parameter 3 left ip
1524 ! parameter 4 right ip
1525 ! parameter 5 1: load ks1/ks2 to in3/in4, add 120 to in4
1528 ! also adds -8 to length in2 and loads loop counter to out4
1530 fp_ip_macro(out0, out1, global3, global4, 2)
1532 store_little_endian(in1, out0, out1, local3, .SLE10) ! block
1534 ld [in3], out0 ! key 7531 first round next block
1536 xor global3, out5, in5 ! iv xor next block
1538 ld [in3+4], out1 ! key 8642
1539 add global1, 512, global3 ! address sbox 3 since register used
1540 xor global4, local1, out5 ! iv xor next block
1542 ba .ncbc.enc.next.block_2
1543 add in1, 8, in1 ! output adress
1545 .ncbc.enc.next.block_fp:
1549 store_little_endian(in1, in5, out5, local3, .SLE1) ! block
1551 addcc in2, -8, in2 ! bytes missing when next block done
1553 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1554 bpos,pt %icc, .ncbc.enc.next.block ! also jumps if 0
1556 bpos .ncbc.enc.next.block
1560 .ncbc.enc.seven.or.less:
1564 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1565 ble,pt %icc, .ncbc.enc.finish
1567 ble .ncbc.enc.finish
1571 add in2, 8, local1 ! bytes to load
1573 ! addr, length, dest left, dest right, temp, temp2, label, ret label
1574 load_n_bytes(in0, local1, global4, out4, local2, local3, .LNB1, .ncbc.enc.next.block_1)
1576 ! Loads 1 to 7 bytes little endian to global4, out4
1582 store_little_endian(local4, in5, out5, local5, .SLE2) ! ivec
1594 LDPTR IVEC, local7 ! ivec
1595 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1596 ble,pn %icc, .ncbc.dec.finish
1598 ble .ncbc.dec.finish
1600 mov in3, in4 ! schedule
1603 mov in0, local5 ! input
1605 load_little_endian(local7, in0, in1, local3, .LLE3) ! ivec
1607 .ncbc.dec.next.block:
1609 load_little_endian(local5, in5, out5, local3, .LLE4) ! block
1611 ! parameter 6 1/2 for include encryption/decryption
1612 ! parameter 7 1 for mov in1 to in3
1613 ! parameter 8 1 for mov in3 to in4
1615 ip_macro(in5, out5, out5, in5, in4, 2, 0, 1) ! include decryprion ks in4
1617 fp_macro(out5, in5, 0, 1) ! 1 for input and output address to local5/7
1619 ! in2 is bytes left to be stored
1620 ! in2 is compared to 8 in the rounds
1622 xor out5, in0, out4 ! iv xor
1623 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1624 bl,pn %icc, .ncbc.dec.seven.or.less
1626 bl .ncbc.dec.seven.or.less
1628 xor in5, in1, global4 ! iv xor
1630 ! Load ivec next block now, since input and output address might be the same.
1632 load_little_endian_inc(local5, in0, in1, local3, .LLE5) ! iv
1634 store_little_endian(local7, out4, global4, local3, .SLE3)
1637 add local7, 8, local7
1640 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1641 bg,pt %icc, .ncbc.dec.next.block
1643 bg .ncbc.dec.next.block
1645 STPTR local7, OUTPUT
1650 LDPTR IVEC, local4 ! ivec
1651 store_little_endian(local4, in0, in1, local5, .SLE4)
1658 .ncbc.dec.seven.or.less:
1660 load_little_endian_inc(local5, in0, in1, local3, .LLE13) ! ivec
1662 store_n_bytes(local7, in2, global4, out4, local3, local4, .SNB1, .ncbc.dec.store.iv)
1665 .DES_ncbc_encrypt.end:
1666 .size DES_ncbc_encrypt, .DES_ncbc_encrypt.end-DES_ncbc_encrypt
1669 ! void DES_ede3_cbc_encrypt(input, output, lenght, ks1, ks2, ks3, ivec, enc)
1670 ! **************************************************************************
1674 .global DES_ede3_cbc_encrypt
1675 .type DES_ede3_cbc_encrypt,#function
1677 DES_ede3_cbc_encrypt:
1679 save %sp, FRAME, %sp
1681 define({KS1}, { [%sp+BIAS+ARG0+3*ARGSZ] })
1682 define({KS2}, { [%sp+BIAS+ARG0+4*ARGSZ] })
1683 define({KS3}, { [%sp+BIAS+ARG0+5*ARGSZ] })
1685 sethi %hi(.PIC.DES_SPtrans-1f),global1
1686 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1688 add %o7,global1,global1
1689 sub global1,.PIC.DES_SPtrans-.des_and,out2
1691 LDPTR [%fp+BIAS+ARG0+7*ARGSZ], local3 ! enc
1692 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1695 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1696 be,pn %icc, .ede3.dec
1704 load_little_endian(local4, in5, out5, local3, .LLE6) ! ivec
1706 addcc in2, -8, in2 ! bytes missing after next block
1708 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1709 bl,pn %icc, .ede3.enc.seven.or.less
1711 bl .ede3.enc.seven.or.less
1715 .ede3.enc.next.block:
1717 load_little_endian(in0, out4, global4, local3, .LLE7)
1719 .ede3.enc.next.block_1:
1722 xor in5, out4, in5 ! iv xor
1723 xor out5, global4, out5 ! iv xor
1726 add in4, 120, in4 ! for decryption we use last subkey first
1729 ip_macro(in5, out5, in5, out5, in3)
1731 .ede3.enc.next.block_2:
1733 call .des_enc ! ks1 in3
1736 call .des_dec ! ks2 in4
1739 call .des_enc ! ks3 in3 compares in2 to 8
1742 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1743 bl,pn %icc, .ede3.enc.next.block_fp
1745 bl .ede3.enc.next.block_fp
1749 ! If 8 or more bytes are to be encrypted after this block,
1750 ! we combine final permutation for this block with initial
1751 ! permutation for next block. Load next block:
1753 load_little_endian(in0, global3, global4, local5, .LLE11)
1755 ! parameter 1 original left
1756 ! parameter 2 original right
1757 ! parameter 3 left ip
1758 ! parameter 4 right ip
1759 ! parameter 5 1: load ks1/ks2 to in3/in4, add 120 to in4
1762 ! also adds -8 to length in2 and loads loop counter to out4
1764 fp_ip_macro(out0, out1, global3, global4, 1)
1766 store_little_endian(in1, out0, out1, local3, .SLE9) ! block
1769 xor global3, out5, in5 ! iv xor next block
1771 ld [in3], out0 ! key 7531
1772 add global1, 512, global3 ! address sbox 3
1773 xor global4, local1, out5 ! iv xor next block
1775 ld [in3+4], out1 ! key 8642
1776 add global1, 768, global4 ! address sbox 4
1777 ba .ede3.enc.next.block_2
1780 .ede3.enc.next.block_fp:
1784 store_little_endian(in1, in5, out5, local3, .SLE5) ! block
1786 addcc in2, -8, in2 ! bytes missing when next block done
1788 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1789 bpos,pt %icc, .ede3.enc.next.block
1791 bpos .ede3.enc.next.block
1795 .ede3.enc.seven.or.less:
1799 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1800 ble,pt %icc, .ede3.enc.finish
1802 ble .ede3.enc.finish
1806 add in2, 8, local1 ! bytes to load
1808 ! addr, length, dest left, dest right, temp, temp2, label, ret label
1809 load_n_bytes(in0, local1, global4, out4, local2, local3, .LNB2, .ede3.enc.next.block_1)
1813 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1814 store_little_endian(local4, in5, out5, local5, .SLE6) ! ivec
1831 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1832 ble %icc, .ede3.dec.finish
1834 ble .ede3.dec.finish
1838 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local7 ! iv
1839 load_little_endian(local7, in0, in1, local3, .LLE8)
1841 .ede3.dec.next.block:
1843 load_little_endian(local5, in5, out5, local3, .LLE9)
1845 ! parameter 6 1/2 for include encryption/decryption
1846 ! parameter 7 1 for mov in1 to in3
1847 ! parameter 8 1 for mov in3 to in4
1848 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1850 ip_macro(in5, out5, out5, in5, in4, 2, 0, 0, 1) ! inc .des_dec ks3 in4
1852 call .des_enc ! ks2 in3
1855 call .des_dec ! ks1 in4
1858 fp_macro(out5, in5, 0, 1) ! 1 for input and output address local5/7
1860 ! in2 is bytes left to be stored
1861 ! in2 is compared to 8 in the rounds
1864 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1865 bl,pn %icc, .ede3.dec.seven.or.less
1867 bl .ede3.dec.seven.or.less
1869 xor in5, in1, global4
1871 load_little_endian_inc(local5, in0, in1, local3, .LLE10) ! iv next block
1873 store_little_endian(local7, out4, global4, local3, .SLE7) ! block
1877 add local7, 8, local7
1879 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1880 bg,pt %icc, .ede3.dec.next.block
1882 bg .ede3.dec.next.block
1884 STPTR local7, OUTPUT
1888 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1889 store_little_endian(local4, in0, in1, local5, .SLE8) ! ivec
1896 .ede3.dec.seven.or.less:
1898 load_little_endian_inc(local5, in0, in1, local3, .LLE14) ! iv
1900 store_n_bytes(local7, in2, global4, out4, local3, local4, .SNB2, .ede3.dec.store.iv)
1903 .DES_ede3_cbc_encrypt.end:
1904 .size DES_ede3_cbc_encrypt,.DES_ede3_cbc_encrypt.end-DES_ede3_cbc_encrypt
1907 .type .des_and,#object
1912 ! This table is used for AND 0xFC when it is known that register
1913 ! bits 8-31 are zero. Makes it possible to do three arithmetic
1914 ! operations in one cycle.
1916 .byte 0, 0, 0, 0, 4, 4, 4, 4
1917 .byte 8, 8, 8, 8, 12, 12, 12, 12
1918 .byte 16, 16, 16, 16, 20, 20, 20, 20
1919 .byte 24, 24, 24, 24, 28, 28, 28, 28
1920 .byte 32, 32, 32, 32, 36, 36, 36, 36
1921 .byte 40, 40, 40, 40, 44, 44, 44, 44
1922 .byte 48, 48, 48, 48, 52, 52, 52, 52
1923 .byte 56, 56, 56, 56, 60, 60, 60, 60
1924 .byte 64, 64, 64, 64, 68, 68, 68, 68
1925 .byte 72, 72, 72, 72, 76, 76, 76, 76
1926 .byte 80, 80, 80, 80, 84, 84, 84, 84
1927 .byte 88, 88, 88, 88, 92, 92, 92, 92
1928 .byte 96, 96, 96, 96, 100, 100, 100, 100
1929 .byte 104, 104, 104, 104, 108, 108, 108, 108
1930 .byte 112, 112, 112, 112, 116, 116, 116, 116
1931 .byte 120, 120, 120, 120, 124, 124, 124, 124
1932 .byte 128, 128, 128, 128, 132, 132, 132, 132
1933 .byte 136, 136, 136, 136, 140, 140, 140, 140
1934 .byte 144, 144, 144, 144, 148, 148, 148, 148
1935 .byte 152, 152, 152, 152, 156, 156, 156, 156
1936 .byte 160, 160, 160, 160, 164, 164, 164, 164
1937 .byte 168, 168, 168, 168, 172, 172, 172, 172
1938 .byte 176, 176, 176, 176, 180, 180, 180, 180
1939 .byte 184, 184, 184, 184, 188, 188, 188, 188
1940 .byte 192, 192, 192, 192, 196, 196, 196, 196
1941 .byte 200, 200, 200, 200, 204, 204, 204, 204
1942 .byte 208, 208, 208, 208, 212, 212, 212, 212
1943 .byte 216, 216, 216, 216, 220, 220, 220, 220
1944 .byte 224, 224, 224, 224, 228, 228, 228, 228
1945 .byte 232, 232, 232, 232, 236, 236, 236, 236
1946 .byte 240, 240, 240, 240, 244, 244, 244, 244
1947 .byte 248, 248, 248, 248, 252, 252, 252, 252
1949 ! 5 numbers for initil/final permutation
1951 .word 0x0f0f0f0f ! offset 256
1952 .word 0x0000ffff ! 260
1953 .word 0x33333333 ! 264
1954 .word 0x00ff00ff ! 268
1955 .word 0x55555555 ! 272
1959 .word 0x0000FC00 ! 284
1962 .type DES_SPtrans,#object
1963 .size DES_SPtrans,2048
1968 .word 0x02080800, 0x00080000, 0x02000002, 0x02080802
1969 .word 0x02000000, 0x00080802, 0x00080002, 0x02000002
1970 .word 0x00080802, 0x02080800, 0x02080000, 0x00000802
1971 .word 0x02000802, 0x02000000, 0x00000000, 0x00080002
1972 .word 0x00080000, 0x00000002, 0x02000800, 0x00080800
1973 .word 0x02080802, 0x02080000, 0x00000802, 0x02000800
1974 .word 0x00000002, 0x00000800, 0x00080800, 0x02080002
1975 .word 0x00000800, 0x02000802, 0x02080002, 0x00000000
1976 .word 0x00000000, 0x02080802, 0x02000800, 0x00080002
1977 .word 0x02080800, 0x00080000, 0x00000802, 0x02000800
1978 .word 0x02080002, 0x00000800, 0x00080800, 0x02000002
1979 .word 0x00080802, 0x00000002, 0x02000002, 0x02080000
1980 .word 0x02080802, 0x00080800, 0x02080000, 0x02000802
1981 .word 0x02000000, 0x00000802, 0x00080002, 0x00000000
1982 .word 0x00080000, 0x02000000, 0x02000802, 0x02080800
1983 .word 0x00000002, 0x02080002, 0x00000800, 0x00080802
1985 .word 0x40108010, 0x00000000, 0x00108000, 0x40100000
1986 .word 0x40000010, 0x00008010, 0x40008000, 0x00108000
1987 .word 0x00008000, 0x40100010, 0x00000010, 0x40008000
1988 .word 0x00100010, 0x40108000, 0x40100000, 0x00000010
1989 .word 0x00100000, 0x40008010, 0x40100010, 0x00008000
1990 .word 0x00108010, 0x40000000, 0x00000000, 0x00100010
1991 .word 0x40008010, 0x00108010, 0x40108000, 0x40000010
1992 .word 0x40000000, 0x00100000, 0x00008010, 0x40108010
1993 .word 0x00100010, 0x40108000, 0x40008000, 0x00108010
1994 .word 0x40108010, 0x00100010, 0x40000010, 0x00000000
1995 .word 0x40000000, 0x00008010, 0x00100000, 0x40100010
1996 .word 0x00008000, 0x40000000, 0x00108010, 0x40008010
1997 .word 0x40108000, 0x00008000, 0x00000000, 0x40000010
1998 .word 0x00000010, 0x40108010, 0x00108000, 0x40100000
1999 .word 0x40100010, 0x00100000, 0x00008010, 0x40008000
2000 .word 0x40008010, 0x00000010, 0x40100000, 0x00108000
2002 .word 0x04000001, 0x04040100, 0x00000100, 0x04000101
2003 .word 0x00040001, 0x04000000, 0x04000101, 0x00040100
2004 .word 0x04000100, 0x00040000, 0x04040000, 0x00000001
2005 .word 0x04040101, 0x00000101, 0x00000001, 0x04040001
2006 .word 0x00000000, 0x00040001, 0x04040100, 0x00000100
2007 .word 0x00000101, 0x04040101, 0x00040000, 0x04000001
2008 .word 0x04040001, 0x04000100, 0x00040101, 0x04040000
2009 .word 0x00040100, 0x00000000, 0x04000000, 0x00040101
2010 .word 0x04040100, 0x00000100, 0x00000001, 0x00040000
2011 .word 0x00000101, 0x00040001, 0x04040000, 0x04000101
2012 .word 0x00000000, 0x04040100, 0x00040100, 0x04040001
2013 .word 0x00040001, 0x04000000, 0x04040101, 0x00000001
2014 .word 0x00040101, 0x04000001, 0x04000000, 0x04040101
2015 .word 0x00040000, 0x04000100, 0x04000101, 0x00040100
2016 .word 0x04000100, 0x00000000, 0x04040001, 0x00000101
2017 .word 0x04000001, 0x00040101, 0x00000100, 0x04040000
2019 .word 0x00401008, 0x10001000, 0x00000008, 0x10401008
2020 .word 0x00000000, 0x10400000, 0x10001008, 0x00400008
2021 .word 0x10401000, 0x10000008, 0x10000000, 0x00001008
2022 .word 0x10000008, 0x00401008, 0x00400000, 0x10000000
2023 .word 0x10400008, 0x00401000, 0x00001000, 0x00000008
2024 .word 0x00401000, 0x10001008, 0x10400000, 0x00001000
2025 .word 0x00001008, 0x00000000, 0x00400008, 0x10401000
2026 .word 0x10001000, 0x10400008, 0x10401008, 0x00400000
2027 .word 0x10400008, 0x00001008, 0x00400000, 0x10000008
2028 .word 0x00401000, 0x10001000, 0x00000008, 0x10400000
2029 .word 0x10001008, 0x00000000, 0x00001000, 0x00400008
2030 .word 0x00000000, 0x10400008, 0x10401000, 0x00001000
2031 .word 0x10000000, 0x10401008, 0x00401008, 0x00400000
2032 .word 0x10401008, 0x00000008, 0x10001000, 0x00401008
2033 .word 0x00400008, 0x00401000, 0x10400000, 0x10001008
2034 .word 0x00001008, 0x10000000, 0x10000008, 0x10401000
2036 .word 0x08000000, 0x00010000, 0x00000400, 0x08010420
2037 .word 0x08010020, 0x08000400, 0x00010420, 0x08010000
2038 .word 0x00010000, 0x00000020, 0x08000020, 0x00010400
2039 .word 0x08000420, 0x08010020, 0x08010400, 0x00000000
2040 .word 0x00010400, 0x08000000, 0x00010020, 0x00000420
2041 .word 0x08000400, 0x00010420, 0x00000000, 0x08000020
2042 .word 0x00000020, 0x08000420, 0x08010420, 0x00010020
2043 .word 0x08010000, 0x00000400, 0x00000420, 0x08010400
2044 .word 0x08010400, 0x08000420, 0x00010020, 0x08010000
2045 .word 0x00010000, 0x00000020, 0x08000020, 0x08000400
2046 .word 0x08000000, 0x00010400, 0x08010420, 0x00000000
2047 .word 0x00010420, 0x08000000, 0x00000400, 0x00010020
2048 .word 0x08000420, 0x00000400, 0x00000000, 0x08010420
2049 .word 0x08010020, 0x08010400, 0x00000420, 0x00010000
2050 .word 0x00010400, 0x08010020, 0x08000400, 0x00000420
2051 .word 0x00000020, 0x00010420, 0x08010000, 0x08000020
2053 .word 0x80000040, 0x00200040, 0x00000000, 0x80202000
2054 .word 0x00200040, 0x00002000, 0x80002040, 0x00200000
2055 .word 0x00002040, 0x80202040, 0x00202000, 0x80000000
2056 .word 0x80002000, 0x80000040, 0x80200000, 0x00202040
2057 .word 0x00200000, 0x80002040, 0x80200040, 0x00000000
2058 .word 0x00002000, 0x00000040, 0x80202000, 0x80200040
2059 .word 0x80202040, 0x80200000, 0x80000000, 0x00002040
2060 .word 0x00000040, 0x00202000, 0x00202040, 0x80002000
2061 .word 0x00002040, 0x80000000, 0x80002000, 0x00202040
2062 .word 0x80202000, 0x00200040, 0x00000000, 0x80002000
2063 .word 0x80000000, 0x00002000, 0x80200040, 0x00200000
2064 .word 0x00200040, 0x80202040, 0x00202000, 0x00000040
2065 .word 0x80202040, 0x00202000, 0x00200000, 0x80002040
2066 .word 0x80000040, 0x80200000, 0x00202040, 0x00000000
2067 .word 0x00002000, 0x80000040, 0x80002040, 0x80202000
2068 .word 0x80200000, 0x00002040, 0x00000040, 0x80200040
2070 .word 0x00004000, 0x00000200, 0x01000200, 0x01000004
2071 .word 0x01004204, 0x00004004, 0x00004200, 0x00000000
2072 .word 0x01000000, 0x01000204, 0x00000204, 0x01004000
2073 .word 0x00000004, 0x01004200, 0x01004000, 0x00000204
2074 .word 0x01000204, 0x00004000, 0x00004004, 0x01004204
2075 .word 0x00000000, 0x01000200, 0x01000004, 0x00004200
2076 .word 0x01004004, 0x00004204, 0x01004200, 0x00000004
2077 .word 0x00004204, 0x01004004, 0x00000200, 0x01000000
2078 .word 0x00004204, 0x01004000, 0x01004004, 0x00000204
2079 .word 0x00004000, 0x00000200, 0x01000000, 0x01004004
2080 .word 0x01000204, 0x00004204, 0x00004200, 0x00000000
2081 .word 0x00000200, 0x01000004, 0x00000004, 0x01000200
2082 .word 0x00000000, 0x01000204, 0x01000200, 0x00004200
2083 .word 0x00000204, 0x00004000, 0x01004204, 0x01000000
2084 .word 0x01004200, 0x00000004, 0x00004004, 0x01004204
2085 .word 0x01000004, 0x01004200, 0x01004000, 0x00004004
2087 .word 0x20800080, 0x20820000, 0x00020080, 0x00000000
2088 .word 0x20020000, 0x00800080, 0x20800000, 0x20820080
2089 .word 0x00000080, 0x20000000, 0x00820000, 0x00020080
2090 .word 0x00820080, 0x20020080, 0x20000080, 0x20800000
2091 .word 0x00020000, 0x00820080, 0x00800080, 0x20020000
2092 .word 0x20820080, 0x20000080, 0x00000000, 0x00820000
2093 .word 0x20000000, 0x00800000, 0x20020080, 0x20800080
2094 .word 0x00800000, 0x00020000, 0x20820000, 0x00000080
2095 .word 0x00800000, 0x00020000, 0x20000080, 0x20820080
2096 .word 0x00020080, 0x20000000, 0x00000000, 0x00820000
2097 .word 0x20800080, 0x20020080, 0x20020000, 0x00800080
2098 .word 0x20820000, 0x00000080, 0x00800080, 0x20020000
2099 .word 0x20820080, 0x00800000, 0x20800000, 0x20000080
2100 .word 0x00820000, 0x00020080, 0x20020080, 0x20800000
2101 .word 0x00000080, 0x20820000, 0x00820080, 0x00000000
2102 .word 0x20000000, 0x20800080, 0x00020000, 0x00820080