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 #include <openssl/opensslconf.h>
51 #ifdef OPENSSL_FIPSCANISTER
52 #include <openssl/fipssyms.h>
55 #if defined(__SUNPRO_C) && defined(__sparcv9)
56 # define ABI64 /* They've said -xarch=v9 at command line */
57 #elif defined(__GNUC__) && defined(__arch64__)
58 # define ABI64 /* They've said -m64 at command line */
62 .register %g2,#scratch
63 .register %g3,#scratch
70 # ifndef OPENSSL_SYS_ULTRASPARC
71 # define OPENSSL_SYS_ULTRASPARC
128 ! The logic used in initial and final permutations is the same as in
129 ! the C code. The permutations are done with a clever shift, xor, and
132 ! The macro also loads address sbox 1 to 5 to global 1 to 5, address
133 ! sbox 6 to local6, and addres sbox 8 to out3.
135 ! Rotates the halfs 3 left to bring the sbox bits in convenient positions.
137 ! Loads key first round from address in parameter 5 to out0, out1.
139 ! After the the original LibDES initial permutation, the resulting left
140 ! is in the variable initially used for right and vice versa. The macro
141 ! implements the possibility to keep the halfs in the original registers.
145 ! parameter 3 result left (modify in first round)
146 ! parameter 4 result right (use in first round)
147 ! parameter 5 key address
148 ! parameter 6 1/2 for include encryption/decryption
149 ! parameter 7 1 for move in1 to in3
150 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
151 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
156 ! $1 $2 $4 $3 $5 $6 $7 $8 $9
158 ld [out2+256], local1
161 xor local4, $1, local4
162 ifelse($7,1,{mov in1, in3},{nop})
164 ld [out2+260], local2
165 and local4, local1, local4
166 ifelse($8,1,{mov in3, in4},{})
167 ifelse($8,2,{mov in4, in3},{})
169 ld [out2+280], out4 ! loop counter
170 sll local4, 4, local1
173 ld [out2+264], local3
177 ifelse($9,1,{LDPTR KS3, in4},{})
178 xor local4, $2, local4
179 nop !sethi %hi(DES_SPtrans), global1 ! sbox addr
181 ifelse($9,1,{LDPTR KS2, in3},{})
182 and local4, local2, local4
183 nop !or global1, %lo(DES_SPtrans), global1 ! sbox addr
185 sll local4, 16, local1
191 sethi %hi(16711680), local5
192 xor local4, $1, local4
194 and local4, local3, local4
195 or local5, 255, local5
197 sll local4, 2, local2
203 xor local4, $2, local4
204 add global1, 768, global4
206 and local4, local5, local4
207 add global1, 1024, global5
209 ld [out2+272], local7
210 sll local4, 8, local1
216 ld [$5], out0 ! key 7531
217 xor local4, $1, local4
218 add global1, 256, global2
220 ld [$5+4], out1 ! key 8642
221 and local4, local7, local4
222 add global1, 512, global3
224 sll local4, 1, local1
231 add global1, 1280, local6 ! address sbox 8
234 add global1, 1792, out3 ! address sbox 8
237 or local4, local3, $4
239 or local2, local1, $3
243 ld [out2+284], local5 ! 0x0000FC00 used in the rounds
244 or local2, local1, $3
248 and local1, 252, local1
254 ld [out2+284], local5 ! 0x0000FC00 used in the rounds
255 or local2, local1, $3
259 and local1, 252, local1
267 ! The logic used in the DES rounds is the same as in the C code,
268 ! except that calculations for sbox 1 and sbox 5 begin before
269 ! the previous round is finished.
271 ! In each round one half (work) is modified based on key and the
274 ! In this version we do two rounds in a loop repeated 7 times
275 ! and two rounds separately.
277 ! One half has the bits for the sboxes in the following positions:
279 ! 777777xx555555xx333333xx111111xx
281 ! 88xx666666xx444444xx222222xx8888
283 ! The bits for each sbox are xor-ed with the key bits for that box.
284 ! The above xx bits are cleared, and the result used for lookup in
285 ! the sbox table. Each sbox entry contains the 4 output bits permuted
286 ! into 32 bits according to the P permutation.
288 ! In the description of DES, left and right are switched after
289 ! each round, except after last round. In this code the original
290 ! left and right are kept in the same register in all rounds, meaning
291 ! that after the 16 rounds the result for right is in the register
292 ! originally used for left.
294 ! parameter 1 first work (left in first round)
295 ! parameter 2 first use (right in first round)
296 ! parameter 3 enc/dec 1/-1
297 ! parameter 4 loop label
298 ! parameter 5 key address register
299 ! parameter 6 optional address for key next encryption/decryption
300 ! parameter 7 not empty for include retl
302 ! also compares in2 to 8
304 define(rounds_macro, {
307 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
311 ld [out2+284], local5 ! 0x0000FC00
313 and local1, 252, local1
318 ! local6 is address sbox 6
319 ! out3 is address sbox 8
320 ! out4 is loop counter
322 ld [global1+local1], local1
323 xor $2, out1, out1 ! 8642
324 xor $2, out0, out0 ! 7531
325 ! fmovs %f0, %f0 ! fxor used for alignment
327 srl out1, 4, local0 ! rotate 4 right
328 and out0, local5, local3 ! 3
331 ld [$5+$3*8], local7 ! key 7531 next round
332 srl local3, 8, local3 ! 3
333 and local0, 252, local2 ! 2
336 ld [global3+local3],local3 ! 3
337 sll out1, 28, out1 ! rotate
338 xor $1, local1, $1 ! 1 finished, local1 now sbox 7
340 ld [global2+local2], local2 ! 2
341 srl out0, 24, local1 ! 7
342 or out1, local0, out1 ! rotate
344 ldub [out2+local1], local1 ! 7 (and 0xFC)
345 srl out1, 24, local0 ! 8
346 and out1, local5, local4 ! 4
348 ldub [out2+local0], local0 ! 8 (and 0xFC)
349 srl local4, 8, local4 ! 4
350 xor $1, local2, $1 ! 2 finished local2 now sbox 6
352 ld [global4+local4],local4 ! 4
353 srl out1, 16, local2 ! 6
354 xor $1, local3, $1 ! 3 finished local3 now sbox 5
356 ld [out3+local0],local0 ! 8
357 and local2, 252, local2 ! 6
358 add global1, 1536, local5 ! address sbox 7
360 ld [local6+local2], local2 ! 6
361 srl out0, 16, local3 ! 5
362 xor $1, local4, $1 ! 4 finished
364 ld [local5+local1],local1 ! 7
365 and local3, 252, local3 ! 5
366 xor $1, local0, $1 ! 8 finished
368 ld [global5+local3],local3 ! 5
369 xor $1, local2, $1 ! 6 finished
372 ld [$5+$3*8+4], out0 ! key 8642 next round
373 xor $1, local7, local2 ! sbox 5 next round
374 xor $1, local1, $1 ! 7 finished
376 srl local2, 16, local2 ! sbox 5 next round
377 xor $1, local3, $1 ! 5 finished
379 ld [$5+$3*16+4], out1 ! key 8642 next round again
380 and local2, 252, local2 ! sbox5 next round
382 xor $1, local7, local7 ! 7531
384 ld [global5+local2], local2 ! 5
385 srl local7, 24, local3 ! 7
386 xor $1, out0, out0 ! 8642
388 ldub [out2+local3], local3 ! 7 (and 0xFC)
389 srl out0, 4, local0 ! rotate 4 right
390 and local7, 252, local1 ! 1
392 sll out0, 28, out0 ! rotate
393 xor $2, local2, $2 ! 5 finished local2 used
395 srl local0, 8, local4 ! 4
396 and local0, 252, local2 ! 2
397 ld [local5+local3], local3 ! 7
399 srl local0, 16, local5 ! 6
400 or out0, local0, out0 ! rotate
401 ld [global2+local2], local2 ! 2
404 ld [$5+$3*16], out0 ! key 7531 next round
405 and local4, 252, local4 ! 4
407 and local5, 252, local5 ! 6
408 ld [global4+local4], local4 ! 4
409 xor $2, local3, $2 ! 7 finished local3 used
411 and local0, 252, local0 ! 8
412 ld [local6+local5], local5 ! 6
413 xor $2, local2, $2 ! 2 finished local2 now sbox 3
415 srl local7, 8, local2 ! 3 start
416 ld [out3+local0], local0 ! 8
417 xor $2, local4, $2 ! 4 finished
419 and local2, 252, local2 ! 3
420 ld [global1+local1], local1 ! 1
421 xor $2, local5, $2 ! 6 finished local5 used
423 ld [global3+local2], local2 ! 3
424 xor $2, local0, $2 ! 8 finished
425 add $5, $3*16, $5 ! enc add 8, dec add -8 to key pointer
427 ld [out2+284], local5 ! 0x0000FC00
428 xor $2, out0, local4 ! sbox 1 next round
429 xor $2, local1, $2 ! 1 finished
431 xor $2, local2, $2 ! 3 finished
432 #ifdef OPENSSL_SYS_ULTRASPARC
437 and local4, 252, local1 ! sbox 1 next round
441 ld [global1+local1], local1
445 srl out1, 4, local0 ! rotate
446 and out0, local5, local3
448 ld [$5+$3*8], local7 ! key 7531
449 srl local3, 8, local3
450 and local0, 252, local2
452 ld [global3+local3],local3
453 sll out1, 28, out1 ! rotate
454 xor $1, local1, $1 ! 1 finished, local1 now sbox 7
456 ld [global2+local2], local2
458 or out1, local0, out1 ! rotate
460 ldub [out2+local1], local1
462 and out1, local5, local4
464 ldub [out2+local0], local0
465 srl local4, 8, local4
466 xor $1, local2, $1 ! 2 finished local2 now sbox 6
468 ld [global4+local4],local4
470 xor $1, local3, $1 ! 3 finished local3 now sbox 5
472 ld [out3+local0],local0
473 and local2, 252, local2
474 add global1, 1536, local5 ! address sbox 7
476 ld [local6+local2], local2
478 xor $1, local4, $1 ! 4 finished
480 ld [local5+local1],local1
481 and local3, 252, local3
484 ld [global5+local3],local3
485 xor $1, local2, $1 ! 6 finished
488 ifelse($6,{}, {}, {ld [out2+280], out4}) ! loop counter
489 xor $1, local7, local2 ! sbox 5 next round
490 xor $1, local1, $1 ! 7 finished
493 srl local2, 16, local2 ! sbox 5 next round
494 xor $1, local3, $1 ! 5 finished
496 and local2, 252, local2
497 ! next round (two rounds more)
498 xor $1, local7, local7 ! 7531
500 ld [global5+local2], local2
501 srl local7, 24, local3
502 xor $1, out0, out0 ! 8642
504 ldub [out2+local3], local3
505 srl out0, 4, local0 ! rotate
506 and local7, 252, local1
508 sll out0, 28, out0 ! rotate
509 xor $2, local2, $2 ! 5 finished local2 used
511 srl local0, 8, local4
512 and local0, 252, local2
513 ld [local5+local3], local3
515 srl local0, 16, local5
516 or out0, local0, out0 ! rotate
517 ld [global2+local2], local2
520 ifelse($6,{}, {}, {ld [$6], out0}) ! key next encryption/decryption
521 and local4, 252, local4
523 and local5, 252, local5
524 ld [global4+local4], local4
525 xor $2, local3, $2 ! 7 finished local3 used
527 and local0, 252, local0
528 ld [local6+local5], local5
529 xor $2, local2, $2 ! 2 finished local2 now sbox 3
531 srl local7, 8, local2 ! 3 start
532 ld [out3+local0], local0
535 and local2, 252, local2
536 ld [global1+local1], local1
537 xor $2, local5, $2 ! 6 finished local5 used
539 ld [global3+local2], local2
543 ifelse($6,{}, {}, {ld [$6+4], out1}) ! key next encryption/decryption
547 ifelse($7,{}, {}, {retl})
554 ! parameter 1 right (original left)
555 ! parameter 2 left (original right)
556 ! parameter 3 1 for optional store to [in0]
557 ! parameter 4 1 for load input/output address to local5/7
559 ! The final permutation logic switches the halfes, meaning that
560 ! left and right ends up the the registers originally used.
565 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
567 ! initially undo the rotate 3 left done after initial permutation
568 ! original left is received shifted 3 right and 29 left in local3/4
571 or local3, local4, $1
574 sethi %hi(0x55555555), local2
577 or local2, %lo(0x55555555), local2
580 sethi %hi(0x00ff00ff), local1
581 xor local3, $1, local3
582 or local1, %lo(0x00ff00ff), local1
583 and local3, local2, local3
584 sethi %hi(0x33333333), local4
585 sll local3, 1, local2
591 xor local3, $2, local3
592 or local4, %lo(0x33333333), local4
593 and local3, local1, local3
594 sethi %hi(0x0000ffff), local1
595 sll local3, 8, local2
601 xor local3, $1, local3
602 or local1, %lo(0x0000ffff), local1
603 and local3, local4, local3
604 sethi %hi(0x0f0f0f0f), local4
605 sll local3, 2, local2
607 ifelse($4,1, {LDPTR INPUT, local5})
610 ifelse($4,1, {LDPTR OUTPUT, local7})
613 xor local3, $2, local3
614 or local4, %lo(0x0f0f0f0f), local4
615 and local3, local1, local3
616 sll local3, 16, local2
618 xor $2, local3, local1
620 srl local1, 4, local3
622 xor local3, $1, local3
623 and local3, local4, local3
624 sll local3, 4, local2
630 ifelse($3,1, {st $1, [in0]})
632 xor local1, local2, $2
634 ifelse($3,1, {st $2, [in0+4]})
641 ! Does initial permutation for next block mixed with
642 ! final permutation for current block.
644 ! parameter 1 original left
645 ! parameter 2 original right
646 ! parameter 3 left ip
647 ! parameter 4 right ip
648 ! parameter 5 1: load ks1/ks2 to in3/in4, add 120 to in4
651 ! also adds -8 to length in2 and loads loop counter to out4
653 define(fp_ip_macro, {
656 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
658 define({temp1},{out4})
659 define({temp2},{local3})
661 define({ip1},{local1})
662 define({ip2},{local2})
663 define({ip4},{local4})
664 define({ip5},{local5})
666 ! $1 in local3, local4
670 or local3, local4, $1
673 ifelse($5,2,{mov in4, in3})
682 and temp1, ip5, temp1
683 xor local0, $3, local0
688 and local0, ip1, local0
691 sll local0, 4, local7
701 xor local0, $4, local0
702 and temp1, ip4, temp1
703 and local0, ip2, local0
706 sll local0, 16, local7
712 ld [out2+264], temp2 ! ip3
716 xor local0, $3, local0
717 and temp1, temp2, temp1
718 and local0, temp2, local0
721 sll local0, 2, local7
729 xor local0, $4, local0
730 and temp1, ip2, temp1
731 and local0, ip4, local0
733 xor $2, temp1, local4
734 sll local0, 8, local7
741 xor local0, $3, local0
744 and local0, ip5, local0
746 sll local0, 1, local7
753 and temp1, ip1, temp1
758 ifelse($5,1,{LDPTR KS2, in4})
760 xor local4, temp2, $2
762 ! reload since used as temporar:
764 ld [out2+280], out4 ! loop counter
767 ifelse($5,1,{add in4, 120, in4})
769 ifelse($5,1,{LDPTR KS1, in3})
772 or local0, local5, $4
773 or local2, local7, $3
779 ! {load_little_endian}
781 ! parameter 1 address
782 ! parameter 2 destination left
783 ! parameter 3 destination right
784 ! parameter 4 temporar
787 define(load_little_endian, {
789 ! {load_little_endian}
790 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
792 ! first in memory to rightmost in register
794 #ifdef OPENSSL_SYS_ULTRASPARC
840 ! {load_little_endian_inc}
842 ! parameter 1 address
843 ! parameter 2 destination left
844 ! parameter 3 destination right
845 ! parameter 4 temporar
850 define(load_little_endian_inc, {
852 ! {load_little_endian_inc}
853 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
855 ! first in memory to rightmost in register
857 #ifdef OPENSSL_SYS_ULTRASPARC
906 ! Loads 1 to 7 bytes little endian
907 ! Remaining bytes are zeroed.
909 ! parameter 1 address
911 ! parameter 3 destination register left
912 ! parameter 4 destination register right
916 ! parameter 8 return label
918 define(load_n_bytes, {
921 ! $1 $2 $5 $6 $7 $8 $7 $8 $9
926 add %o7,$7.jmp.table-$7.0,$5
978 ! {store_little_endian}
980 ! parameter 1 address
981 ! parameter 2 source left
982 ! parameter 3 source right
983 ! parameter 4 temporar
985 define(store_little_endian, {
987 ! {store_little_endian}
988 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
990 ! rightmost in register to first in memory
992 #ifdef OPENSSL_SYS_ULTRASPARC
1041 ! Stores 1 to 7 bytes little endian
1043 ! parameter 1 address
1044 ! parameter 2 length
1045 ! parameter 3 source register left
1046 ! parameter 4 source register right
1050 ! parameter 8 return label
1052 define(store_n_bytes, {
1055 ! $1 $2 $5 $6 $7 $8 $7 $8 $9
1060 add %o7,$7.jmp.table-$7.0,$5
1113 define(testvalue,{1})
1115 define(register_init, {
1117 ! For test purposes:
1119 sethi %hi(testvalue), local0
1120 or local0, %lo(testvalue), local0
1122 ifelse($1,{},{}, {mov local0, $1})
1123 ifelse($2,{},{}, {mov local0, $2})
1124 ifelse($3,{},{}, {mov local0, $3})
1125 ifelse($4,{},{}, {mov local0, $4})
1126 ifelse($5,{},{}, {mov local0, $5})
1127 ifelse($6,{},{}, {mov local0, $6})
1128 ifelse($7,{},{}, {mov local0, $7})
1129 ifelse($8,{},{}, {mov local0, $8})
1159 ! loads key next encryption/decryption first round from [in4]
1161 rounds_macro(in5, out5, 1, .des_enc.1, in3, in4, retl)
1168 ! implemented with out5 as first parameter to avoid
1169 ! register exchange in ede modes
1172 ! loads key next encryption/decryption first round from [in3]
1174 rounds_macro(out5, in5, -1, .des_dec.1, in4, in3, retl)
1178 ! void DES_encrypt1(data, ks, enc)
1179 ! *******************************
1182 .global DES_encrypt1
1183 .type DES_encrypt1,#function
1187 save %sp, FRAME, %sp
1189 sethi %hi(.PIC.DES_SPtrans-1f),global1
1190 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1192 add %o7,global1,global1
1193 sub global1,.PIC.DES_SPtrans-.des_and,out2
1195 ld [in0], in5 ! left
1198 #ifdef OPENSSL_SYS_ULTRASPARC
1199 be,pn %icc, .encrypt.dec ! enc/dec
1203 ld [in0+4], out5 ! right
1205 ! parameter 6 1/2 for include encryption/decryption
1206 ! parameter 7 1 for move in1 to in3
1207 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1209 ip_macro(in5, out5, in5, out5, in3, 0, 1, 1)
1211 rounds_macro(in5, out5, 1, .des_encrypt1.1, in3, in4) ! in4 not used
1213 fp_macro(in5, out5, 1) ! 1 for store to [in0]
1220 add in1, 120, in3 ! use last subkey for first round
1222 ! parameter 6 1/2 for include encryption/decryption
1223 ! parameter 7 1 for move in1 to in3
1224 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1226 ip_macro(in5, out5, out5, in5, in4, 2, 0, 1) ! include dec, ks in4
1228 fp_macro(out5, in5, 1) ! 1 for store to [in0]
1234 .size DES_encrypt1,.DES_encrypt1.end-DES_encrypt1
1237 ! void DES_encrypt2(data, ks, enc)
1238 !*********************************
1240 ! encrypts/decrypts without initial/final permutation
1243 .global DES_encrypt2
1244 .type DES_encrypt2,#function
1248 save %sp, FRAME, %sp
1250 sethi %hi(.PIC.DES_SPtrans-1f),global1
1251 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1253 add %o7,global1,global1
1254 sub global1,.PIC.DES_SPtrans-.des_and,out2
1256 ! Set sbox address 1 to 6 and rotate halfs 3 left
1257 ! Errors caught by destest? Yes. Still? *NO*
1259 !sethi %hi(DES_SPtrans), global1 ! address sbox 1
1261 !or global1, %lo(DES_SPtrans), global1 ! sbox 1
1263 add global1, 256, global2 ! sbox 2
1264 add global1, 512, global3 ! sbox 3
1266 ld [in0], out5 ! right
1267 add global1, 768, global4 ! sbox 4
1268 add global1, 1024, global5 ! sbox 5
1270 ld [in0+4], in5 ! left
1271 add global1, 1280, local6 ! sbox 6
1272 add global1, 1792, out3 ! sbox 8
1277 mov in1, in3 ! key address to in3
1283 add in5, local5, in5
1285 add out5, local7, out5
1288 ! we use our own stackframe
1290 #ifdef OPENSSL_SYS_ULTRASPARC
1291 be,pn %icc, .encrypt2.dec ! decryption
1295 STPTR in0, [%sp+BIAS+ARG0+0*ARGSZ]
1297 ld [in3], out0 ! key 7531 first round
1298 mov LOOPS, out4 ! loop counter
1300 ld [in3+4], out1 ! key 8642 first round
1301 sethi %hi(0x0000FC00), local5
1312 LDPTR [%sp+BIAS+ARG0+0*ARGSZ], in0
1325 ld [in4], out0 ! key 7531 first round
1326 mov LOOPS, out4 ! loop counter
1328 ld [in4+4], out1 ! key 8642 first round
1329 sethi %hi(0x0000FC00), local5
1331 mov in5, local1 ! left expected in out5
1345 LDPTR [%sp+BIAS+ARG0+0*ARGSZ], in0
1354 .size DES_encrypt2, .DES_encrypt2.end-DES_encrypt2
1357 ! void DES_encrypt3(data, ks1, ks2, ks3)
1358 ! **************************************
1361 .global DES_encrypt3
1362 .type DES_encrypt3,#function
1366 save %sp, FRAME, %sp
1368 sethi %hi(.PIC.DES_SPtrans-1f),global1
1369 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1371 add %o7,global1,global1
1372 sub global1,.PIC.DES_SPtrans-.des_and,out2
1374 ld [in0], in5 ! left
1375 add in2, 120, in4 ! ks2
1377 ld [in0+4], out5 ! right
1378 mov in3, in2 ! save ks3
1380 ! parameter 6 1/2 for include encryption/decryption
1381 ! parameter 7 1 for mov in1 to in3
1382 ! parameter 8 1 for mov in3 to in4
1383 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1385 ip_macro(in5, out5, in5, out5, in3, 1, 1, 0, 0)
1388 mov in2, in3 ! preload ks3
1393 fp_macro(in5, out5, 1)
1399 .size DES_encrypt3,.DES_encrypt3.end-DES_encrypt3
1402 ! void DES_decrypt3(data, ks1, ks2, ks3)
1403 ! **************************************
1406 .global DES_decrypt3
1407 .type DES_decrypt3,#function
1411 save %sp, FRAME, %sp
1413 sethi %hi(.PIC.DES_SPtrans-1f),global1
1414 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1416 add %o7,global1,global1
1417 sub global1,.PIC.DES_SPtrans-.des_and,out2
1419 ld [in0], in5 ! left
1420 add in3, 120, in4 ! ks3
1422 ld [in0+4], out5 ! right
1425 ! parameter 6 1/2 for include encryption/decryption
1426 ! parameter 7 1 for mov in1 to in3
1427 ! parameter 8 1 for mov in3 to in4
1428 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1430 ip_macro(in5, out5, out5, in5, in4, 2, 0, 0, 0)
1433 add in1, 120, in4 ! preload ks1
1438 fp_macro(out5, in5, 1)
1444 .size DES_decrypt3,.DES_decrypt3.end-DES_decrypt3
1446 ! void DES_ncbc_encrypt(input, output, length, schedule, ivec, enc)
1447 ! *****************************************************************
1451 .global DES_ncbc_encrypt
1452 .type DES_ncbc_encrypt,#function
1456 save %sp, FRAME, %sp
1458 define({INPUT}, { [%sp+BIAS+ARG0+0*ARGSZ] })
1459 define({OUTPUT}, { [%sp+BIAS+ARG0+1*ARGSZ] })
1460 define({IVEC}, { [%sp+BIAS+ARG0+4*ARGSZ] })
1462 sethi %hi(.PIC.DES_SPtrans-1f),global1
1463 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1465 add %o7,global1,global1
1466 sub global1,.PIC.DES_SPtrans-.des_and,out2
1470 #ifdef OPENSSL_SYS_ULTRASPARC
1471 be,pn %icc, .ncbc.dec
1477 ! addr left right temp label
1478 load_little_endian(in4, in5, out5, local3, .LLE1) ! iv
1480 addcc in2, -8, in2 ! bytes missing when first block done
1482 #ifdef OPENSSL_SYS_ULTRASPARC
1483 bl,pn %icc, .ncbc.enc.seven.or.less
1485 bl .ncbc.enc.seven.or.less
1487 mov in3, in4 ! schedule
1489 .ncbc.enc.next.block:
1491 load_little_endian(in0, out4, global4, local3, .LLE2) ! block
1493 .ncbc.enc.next.block_1:
1495 xor in5, out4, in5 ! iv xor
1496 xor out5, global4, out5 ! iv xor
1498 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1499 ip_macro(in5, out5, in5, out5, in3, 0, 0, 2)
1501 .ncbc.enc.next.block_2:
1503 !// call .des_enc ! compares in2 to 8
1504 ! rounds inlined for alignment purposes
1506 add global1, 768, global4 ! address sbox 4 since register used below
1508 rounds_macro(in5, out5, 1, .ncbc.enc.1, in3, in4) ! include encryption ks in3
1510 #ifdef OPENSSL_SYS_ULTRASPARC
1511 bl,pn %icc, .ncbc.enc.next.block_fp
1513 bl .ncbc.enc.next.block_fp
1515 add in0, 8, in0 ! input address
1517 ! If 8 or more bytes are to be encrypted after this block,
1518 ! we combine final permutation for this block with initial
1519 ! permutation for next block. Load next block:
1521 load_little_endian(in0, global3, global4, local5, .LLE12)
1523 ! parameter 1 original left
1524 ! parameter 2 original right
1525 ! parameter 3 left ip
1526 ! parameter 4 right ip
1527 ! parameter 5 1: load ks1/ks2 to in3/in4, add 120 to in4
1530 ! also adds -8 to length in2 and loads loop counter to out4
1532 fp_ip_macro(out0, out1, global3, global4, 2)
1534 store_little_endian(in1, out0, out1, local3, .SLE10) ! block
1536 ld [in3], out0 ! key 7531 first round next block
1538 xor global3, out5, in5 ! iv xor next block
1540 ld [in3+4], out1 ! key 8642
1541 add global1, 512, global3 ! address sbox 3 since register used
1542 xor global4, local1, out5 ! iv xor next block
1544 ba .ncbc.enc.next.block_2
1545 add in1, 8, in1 ! output address
1547 .ncbc.enc.next.block_fp:
1551 store_little_endian(in1, in5, out5, local3, .SLE1) ! block
1553 addcc in2, -8, in2 ! bytes missing when next block done
1555 #ifdef OPENSSL_SYS_ULTRASPARC
1556 bpos,pt %icc, .ncbc.enc.next.block ! also jumps if 0
1558 bpos .ncbc.enc.next.block
1562 .ncbc.enc.seven.or.less:
1566 #ifdef OPENSSL_SYS_ULTRASPARC
1567 ble,pt %icc, .ncbc.enc.finish
1569 ble .ncbc.enc.finish
1573 add in2, 8, local1 ! bytes to load
1575 ! addr, length, dest left, dest right, temp, temp2, label, ret label
1576 load_n_bytes(in0, local1, global4, out4, local2, local3, .LNB1, .ncbc.enc.next.block_1)
1578 ! Loads 1 to 7 bytes little endian to global4, out4
1584 store_little_endian(local4, in5, out5, local5, .SLE2) ! ivec
1596 LDPTR IVEC, local7 ! ivec
1597 #ifdef OPENSSL_SYS_ULTRASPARC
1598 ble,pn %icc, .ncbc.dec.finish
1600 ble .ncbc.dec.finish
1602 mov in3, in4 ! schedule
1605 mov in0, local5 ! input
1607 load_little_endian(local7, in0, in1, local3, .LLE3) ! ivec
1609 .ncbc.dec.next.block:
1611 load_little_endian(local5, in5, out5, local3, .LLE4) ! block
1613 ! parameter 6 1/2 for include encryption/decryption
1614 ! parameter 7 1 for mov in1 to in3
1615 ! parameter 8 1 for mov in3 to in4
1617 ip_macro(in5, out5, out5, in5, in4, 2, 0, 1) ! include decryprion ks in4
1619 fp_macro(out5, in5, 0, 1) ! 1 for input and output address to local5/7
1621 ! in2 is bytes left to be stored
1622 ! in2 is compared to 8 in the rounds
1624 xor out5, in0, out4 ! iv xor
1625 #ifdef OPENSSL_SYS_ULTRASPARC
1626 bl,pn %icc, .ncbc.dec.seven.or.less
1628 bl .ncbc.dec.seven.or.less
1630 xor in5, in1, global4 ! iv xor
1632 ! Load ivec next block now, since input and output address might be the same.
1634 load_little_endian_inc(local5, in0, in1, local3, .LLE5) ! iv
1636 store_little_endian(local7, out4, global4, local3, .SLE3)
1639 add local7, 8, local7
1642 #ifdef OPENSSL_SYS_ULTRASPARC
1643 bg,pt %icc, .ncbc.dec.next.block
1645 bg .ncbc.dec.next.block
1647 STPTR local7, OUTPUT
1652 LDPTR IVEC, local4 ! ivec
1653 store_little_endian(local4, in0, in1, local5, .SLE4)
1660 .ncbc.dec.seven.or.less:
1662 load_little_endian_inc(local5, in0, in1, local3, .LLE13) ! ivec
1664 store_n_bytes(local7, in2, global4, out4, local3, local4, .SNB1, .ncbc.dec.store.iv)
1667 .DES_ncbc_encrypt.end:
1668 .size DES_ncbc_encrypt, .DES_ncbc_encrypt.end-DES_ncbc_encrypt
1671 ! void DES_ede3_cbc_encrypt(input, output, lenght, ks1, ks2, ks3, ivec, enc)
1672 ! **************************************************************************
1676 .global DES_ede3_cbc_encrypt
1677 .type DES_ede3_cbc_encrypt,#function
1679 DES_ede3_cbc_encrypt:
1681 save %sp, FRAME, %sp
1683 define({KS1}, { [%sp+BIAS+ARG0+3*ARGSZ] })
1684 define({KS2}, { [%sp+BIAS+ARG0+4*ARGSZ] })
1685 define({KS3}, { [%sp+BIAS+ARG0+5*ARGSZ] })
1687 sethi %hi(.PIC.DES_SPtrans-1f),global1
1688 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1690 add %o7,global1,global1
1691 sub global1,.PIC.DES_SPtrans-.des_and,out2
1693 LDPTR [%fp+BIAS+ARG0+7*ARGSZ], local3 ! enc
1694 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1697 #ifdef OPENSSL_SYS_ULTRASPARC
1698 be,pn %icc, .ede3.dec
1706 load_little_endian(local4, in5, out5, local3, .LLE6) ! ivec
1708 addcc in2, -8, in2 ! bytes missing after next block
1710 #ifdef OPENSSL_SYS_ULTRASPARC
1711 bl,pn %icc, .ede3.enc.seven.or.less
1713 bl .ede3.enc.seven.or.less
1717 .ede3.enc.next.block:
1719 load_little_endian(in0, out4, global4, local3, .LLE7)
1721 .ede3.enc.next.block_1:
1724 xor in5, out4, in5 ! iv xor
1725 xor out5, global4, out5 ! iv xor
1728 add in4, 120, in4 ! for decryption we use last subkey first
1731 ip_macro(in5, out5, in5, out5, in3)
1733 .ede3.enc.next.block_2:
1735 call .des_enc ! ks1 in3
1738 call .des_dec ! ks2 in4
1741 call .des_enc ! ks3 in3 compares in2 to 8
1744 #ifdef OPENSSL_SYS_ULTRASPARC
1745 bl,pn %icc, .ede3.enc.next.block_fp
1747 bl .ede3.enc.next.block_fp
1751 ! If 8 or more bytes are to be encrypted after this block,
1752 ! we combine final permutation for this block with initial
1753 ! permutation for next block. Load next block:
1755 load_little_endian(in0, global3, global4, local5, .LLE11)
1757 ! parameter 1 original left
1758 ! parameter 2 original right
1759 ! parameter 3 left ip
1760 ! parameter 4 right ip
1761 ! parameter 5 1: load ks1/ks2 to in3/in4, add 120 to in4
1764 ! also adds -8 to length in2 and loads loop counter to out4
1766 fp_ip_macro(out0, out1, global3, global4, 1)
1768 store_little_endian(in1, out0, out1, local3, .SLE9) ! block
1771 xor global3, out5, in5 ! iv xor next block
1773 ld [in3], out0 ! key 7531
1774 add global1, 512, global3 ! address sbox 3
1775 xor global4, local1, out5 ! iv xor next block
1777 ld [in3+4], out1 ! key 8642
1778 add global1, 768, global4 ! address sbox 4
1779 ba .ede3.enc.next.block_2
1782 .ede3.enc.next.block_fp:
1786 store_little_endian(in1, in5, out5, local3, .SLE5) ! block
1788 addcc in2, -8, in2 ! bytes missing when next block done
1790 #ifdef OPENSSL_SYS_ULTRASPARC
1791 bpos,pt %icc, .ede3.enc.next.block
1793 bpos .ede3.enc.next.block
1797 .ede3.enc.seven.or.less:
1801 #ifdef OPENSSL_SYS_ULTRASPARC
1802 ble,pt %icc, .ede3.enc.finish
1804 ble .ede3.enc.finish
1808 add in2, 8, local1 ! bytes to load
1810 ! addr, length, dest left, dest right, temp, temp2, label, ret label
1811 load_n_bytes(in0, local1, global4, out4, local2, local3, .LNB2, .ede3.enc.next.block_1)
1815 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1816 store_little_endian(local4, in5, out5, local5, .SLE6) ! ivec
1833 #ifdef OPENSSL_SYS_ULTRASPARC
1834 ble %icc, .ede3.dec.finish
1836 ble .ede3.dec.finish
1840 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local7 ! iv
1841 load_little_endian(local7, in0, in1, local3, .LLE8)
1843 .ede3.dec.next.block:
1845 load_little_endian(local5, in5, out5, local3, .LLE9)
1847 ! parameter 6 1/2 for include encryption/decryption
1848 ! parameter 7 1 for mov in1 to in3
1849 ! parameter 8 1 for mov in3 to in4
1850 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1852 ip_macro(in5, out5, out5, in5, in4, 2, 0, 0, 1) ! inc .des_dec ks3 in4
1854 call .des_enc ! ks2 in3
1857 call .des_dec ! ks1 in4
1860 fp_macro(out5, in5, 0, 1) ! 1 for input and output address local5/7
1862 ! in2 is bytes left to be stored
1863 ! in2 is compared to 8 in the rounds
1866 #ifdef OPENSSL_SYS_ULTRASPARC
1867 bl,pn %icc, .ede3.dec.seven.or.less
1869 bl .ede3.dec.seven.or.less
1871 xor in5, in1, global4
1873 load_little_endian_inc(local5, in0, in1, local3, .LLE10) ! iv next block
1875 store_little_endian(local7, out4, global4, local3, .SLE7) ! block
1879 add local7, 8, local7
1881 #ifdef OPENSSL_SYS_ULTRASPARC
1882 bg,pt %icc, .ede3.dec.next.block
1884 bg .ede3.dec.next.block
1886 STPTR local7, OUTPUT
1890 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1891 store_little_endian(local4, in0, in1, local5, .SLE8) ! ivec
1898 .ede3.dec.seven.or.less:
1900 load_little_endian_inc(local5, in0, in1, local3, .LLE14) ! iv
1902 store_n_bytes(local7, in2, global4, out4, local3, local4, .SNB2, .ede3.dec.store.iv)
1905 .DES_ede3_cbc_encrypt.end:
1906 .size DES_ede3_cbc_encrypt,.DES_ede3_cbc_encrypt.end-DES_ede3_cbc_encrypt
1909 .type .des_and,#object
1914 ! This table is used for AND 0xFC when it is known that register
1915 ! bits 8-31 are zero. Makes it possible to do three arithmetic
1916 ! operations in one cycle.
1918 .byte 0, 0, 0, 0, 4, 4, 4, 4
1919 .byte 8, 8, 8, 8, 12, 12, 12, 12
1920 .byte 16, 16, 16, 16, 20, 20, 20, 20
1921 .byte 24, 24, 24, 24, 28, 28, 28, 28
1922 .byte 32, 32, 32, 32, 36, 36, 36, 36
1923 .byte 40, 40, 40, 40, 44, 44, 44, 44
1924 .byte 48, 48, 48, 48, 52, 52, 52, 52
1925 .byte 56, 56, 56, 56, 60, 60, 60, 60
1926 .byte 64, 64, 64, 64, 68, 68, 68, 68
1927 .byte 72, 72, 72, 72, 76, 76, 76, 76
1928 .byte 80, 80, 80, 80, 84, 84, 84, 84
1929 .byte 88, 88, 88, 88, 92, 92, 92, 92
1930 .byte 96, 96, 96, 96, 100, 100, 100, 100
1931 .byte 104, 104, 104, 104, 108, 108, 108, 108
1932 .byte 112, 112, 112, 112, 116, 116, 116, 116
1933 .byte 120, 120, 120, 120, 124, 124, 124, 124
1934 .byte 128, 128, 128, 128, 132, 132, 132, 132
1935 .byte 136, 136, 136, 136, 140, 140, 140, 140
1936 .byte 144, 144, 144, 144, 148, 148, 148, 148
1937 .byte 152, 152, 152, 152, 156, 156, 156, 156
1938 .byte 160, 160, 160, 160, 164, 164, 164, 164
1939 .byte 168, 168, 168, 168, 172, 172, 172, 172
1940 .byte 176, 176, 176, 176, 180, 180, 180, 180
1941 .byte 184, 184, 184, 184, 188, 188, 188, 188
1942 .byte 192, 192, 192, 192, 196, 196, 196, 196
1943 .byte 200, 200, 200, 200, 204, 204, 204, 204
1944 .byte 208, 208, 208, 208, 212, 212, 212, 212
1945 .byte 216, 216, 216, 216, 220, 220, 220, 220
1946 .byte 224, 224, 224, 224, 228, 228, 228, 228
1947 .byte 232, 232, 232, 232, 236, 236, 236, 236
1948 .byte 240, 240, 240, 240, 244, 244, 244, 244
1949 .byte 248, 248, 248, 248, 252, 252, 252, 252
1951 ! 5 numbers for initil/final permutation
1953 .word 0x0f0f0f0f ! offset 256
1954 .word 0x0000ffff ! 260
1955 .word 0x33333333 ! 264
1956 .word 0x00ff00ff ! 268
1957 .word 0x55555555 ! 272
1961 .word 0x0000FC00 ! 284
1964 .type DES_SPtrans,#object
1965 .size DES_SPtrans,2048
1970 .word 0x02080800, 0x00080000, 0x02000002, 0x02080802
1971 .word 0x02000000, 0x00080802, 0x00080002, 0x02000002
1972 .word 0x00080802, 0x02080800, 0x02080000, 0x00000802
1973 .word 0x02000802, 0x02000000, 0x00000000, 0x00080002
1974 .word 0x00080000, 0x00000002, 0x02000800, 0x00080800
1975 .word 0x02080802, 0x02080000, 0x00000802, 0x02000800
1976 .word 0x00000002, 0x00000800, 0x00080800, 0x02080002
1977 .word 0x00000800, 0x02000802, 0x02080002, 0x00000000
1978 .word 0x00000000, 0x02080802, 0x02000800, 0x00080002
1979 .word 0x02080800, 0x00080000, 0x00000802, 0x02000800
1980 .word 0x02080002, 0x00000800, 0x00080800, 0x02000002
1981 .word 0x00080802, 0x00000002, 0x02000002, 0x02080000
1982 .word 0x02080802, 0x00080800, 0x02080000, 0x02000802
1983 .word 0x02000000, 0x00000802, 0x00080002, 0x00000000
1984 .word 0x00080000, 0x02000000, 0x02000802, 0x02080800
1985 .word 0x00000002, 0x02080002, 0x00000800, 0x00080802
1987 .word 0x40108010, 0x00000000, 0x00108000, 0x40100000
1988 .word 0x40000010, 0x00008010, 0x40008000, 0x00108000
1989 .word 0x00008000, 0x40100010, 0x00000010, 0x40008000
1990 .word 0x00100010, 0x40108000, 0x40100000, 0x00000010
1991 .word 0x00100000, 0x40008010, 0x40100010, 0x00008000
1992 .word 0x00108010, 0x40000000, 0x00000000, 0x00100010
1993 .word 0x40008010, 0x00108010, 0x40108000, 0x40000010
1994 .word 0x40000000, 0x00100000, 0x00008010, 0x40108010
1995 .word 0x00100010, 0x40108000, 0x40008000, 0x00108010
1996 .word 0x40108010, 0x00100010, 0x40000010, 0x00000000
1997 .word 0x40000000, 0x00008010, 0x00100000, 0x40100010
1998 .word 0x00008000, 0x40000000, 0x00108010, 0x40008010
1999 .word 0x40108000, 0x00008000, 0x00000000, 0x40000010
2000 .word 0x00000010, 0x40108010, 0x00108000, 0x40100000
2001 .word 0x40100010, 0x00100000, 0x00008010, 0x40008000
2002 .word 0x40008010, 0x00000010, 0x40100000, 0x00108000
2004 .word 0x04000001, 0x04040100, 0x00000100, 0x04000101
2005 .word 0x00040001, 0x04000000, 0x04000101, 0x00040100
2006 .word 0x04000100, 0x00040000, 0x04040000, 0x00000001
2007 .word 0x04040101, 0x00000101, 0x00000001, 0x04040001
2008 .word 0x00000000, 0x00040001, 0x04040100, 0x00000100
2009 .word 0x00000101, 0x04040101, 0x00040000, 0x04000001
2010 .word 0x04040001, 0x04000100, 0x00040101, 0x04040000
2011 .word 0x00040100, 0x00000000, 0x04000000, 0x00040101
2012 .word 0x04040100, 0x00000100, 0x00000001, 0x00040000
2013 .word 0x00000101, 0x00040001, 0x04040000, 0x04000101
2014 .word 0x00000000, 0x04040100, 0x00040100, 0x04040001
2015 .word 0x00040001, 0x04000000, 0x04040101, 0x00000001
2016 .word 0x00040101, 0x04000001, 0x04000000, 0x04040101
2017 .word 0x00040000, 0x04000100, 0x04000101, 0x00040100
2018 .word 0x04000100, 0x00000000, 0x04040001, 0x00000101
2019 .word 0x04000001, 0x00040101, 0x00000100, 0x04040000
2021 .word 0x00401008, 0x10001000, 0x00000008, 0x10401008
2022 .word 0x00000000, 0x10400000, 0x10001008, 0x00400008
2023 .word 0x10401000, 0x10000008, 0x10000000, 0x00001008
2024 .word 0x10000008, 0x00401008, 0x00400000, 0x10000000
2025 .word 0x10400008, 0x00401000, 0x00001000, 0x00000008
2026 .word 0x00401000, 0x10001008, 0x10400000, 0x00001000
2027 .word 0x00001008, 0x00000000, 0x00400008, 0x10401000
2028 .word 0x10001000, 0x10400008, 0x10401008, 0x00400000
2029 .word 0x10400008, 0x00001008, 0x00400000, 0x10000008
2030 .word 0x00401000, 0x10001000, 0x00000008, 0x10400000
2031 .word 0x10001008, 0x00000000, 0x00001000, 0x00400008
2032 .word 0x00000000, 0x10400008, 0x10401000, 0x00001000
2033 .word 0x10000000, 0x10401008, 0x00401008, 0x00400000
2034 .word 0x10401008, 0x00000008, 0x10001000, 0x00401008
2035 .word 0x00400008, 0x00401000, 0x10400000, 0x10001008
2036 .word 0x00001008, 0x10000000, 0x10000008, 0x10401000
2038 .word 0x08000000, 0x00010000, 0x00000400, 0x08010420
2039 .word 0x08010020, 0x08000400, 0x00010420, 0x08010000
2040 .word 0x00010000, 0x00000020, 0x08000020, 0x00010400
2041 .word 0x08000420, 0x08010020, 0x08010400, 0x00000000
2042 .word 0x00010400, 0x08000000, 0x00010020, 0x00000420
2043 .word 0x08000400, 0x00010420, 0x00000000, 0x08000020
2044 .word 0x00000020, 0x08000420, 0x08010420, 0x00010020
2045 .word 0x08010000, 0x00000400, 0x00000420, 0x08010400
2046 .word 0x08010400, 0x08000420, 0x00010020, 0x08010000
2047 .word 0x00010000, 0x00000020, 0x08000020, 0x08000400
2048 .word 0x08000000, 0x00010400, 0x08010420, 0x00000000
2049 .word 0x00010420, 0x08000000, 0x00000400, 0x00010020
2050 .word 0x08000420, 0x00000400, 0x00000000, 0x08010420
2051 .word 0x08010020, 0x08010400, 0x00000420, 0x00010000
2052 .word 0x00010400, 0x08010020, 0x08000400, 0x00000420
2053 .word 0x00000020, 0x00010420, 0x08010000, 0x08000020
2055 .word 0x80000040, 0x00200040, 0x00000000, 0x80202000
2056 .word 0x00200040, 0x00002000, 0x80002040, 0x00200000
2057 .word 0x00002040, 0x80202040, 0x00202000, 0x80000000
2058 .word 0x80002000, 0x80000040, 0x80200000, 0x00202040
2059 .word 0x00200000, 0x80002040, 0x80200040, 0x00000000
2060 .word 0x00002000, 0x00000040, 0x80202000, 0x80200040
2061 .word 0x80202040, 0x80200000, 0x80000000, 0x00002040
2062 .word 0x00000040, 0x00202000, 0x00202040, 0x80002000
2063 .word 0x00002040, 0x80000000, 0x80002000, 0x00202040
2064 .word 0x80202000, 0x00200040, 0x00000000, 0x80002000
2065 .word 0x80000000, 0x00002000, 0x80200040, 0x00200000
2066 .word 0x00200040, 0x80202040, 0x00202000, 0x00000040
2067 .word 0x80202040, 0x00202000, 0x00200000, 0x80002040
2068 .word 0x80000040, 0x80200000, 0x00202040, 0x00000000
2069 .word 0x00002000, 0x80000040, 0x80002040, 0x80202000
2070 .word 0x80200000, 0x00002040, 0x00000040, 0x80200040
2072 .word 0x00004000, 0x00000200, 0x01000200, 0x01000004
2073 .word 0x01004204, 0x00004004, 0x00004200, 0x00000000
2074 .word 0x01000000, 0x01000204, 0x00000204, 0x01004000
2075 .word 0x00000004, 0x01004200, 0x01004000, 0x00000204
2076 .word 0x01000204, 0x00004000, 0x00004004, 0x01004204
2077 .word 0x00000000, 0x01000200, 0x01000004, 0x00004200
2078 .word 0x01004004, 0x00004204, 0x01004200, 0x00000004
2079 .word 0x00004204, 0x01004004, 0x00000200, 0x01000000
2080 .word 0x00004204, 0x01004000, 0x01004004, 0x00000204
2081 .word 0x00004000, 0x00000200, 0x01000000, 0x01004004
2082 .word 0x01000204, 0x00004204, 0x00004200, 0x00000000
2083 .word 0x00000200, 0x01000004, 0x00000004, 0x01000200
2084 .word 0x00000000, 0x01000204, 0x01000200, 0x00004200
2085 .word 0x00000204, 0x00004000, 0x01004204, 0x01000000
2086 .word 0x01004200, 0x00000004, 0x00004004, 0x01004204
2087 .word 0x01000004, 0x01004200, 0x01004000, 0x00004004
2089 .word 0x20800080, 0x20820000, 0x00020080, 0x00000000
2090 .word 0x20020000, 0x00800080, 0x20800000, 0x20820080
2091 .word 0x00000080, 0x20000000, 0x00820000, 0x00020080
2092 .word 0x00820080, 0x20020080, 0x20000080, 0x20800000
2093 .word 0x00020000, 0x00820080, 0x00800080, 0x20020000
2094 .word 0x20820080, 0x20000080, 0x00000000, 0x00820000
2095 .word 0x20000000, 0x00800000, 0x20020080, 0x20800080
2096 .word 0x00800000, 0x00020000, 0x20820000, 0x00000080
2097 .word 0x00800000, 0x00020000, 0x20000080, 0x20820080
2098 .word 0x00020080, 0x20000000, 0x00000000, 0x00820000
2099 .word 0x20800080, 0x20020080, 0x20020000, 0x00800080
2100 .word 0x20820000, 0x00000080, 0x00800080, 0x20020000
2101 .word 0x20820080, 0x00800000, 0x20800000, 0x20000080
2102 .word 0x00820000, 0x00020080, 0x20020080, 0x20800000
2103 .word 0x00000080, 0x20820000, 0x00820080, 0x00000000
2104 .word 0x20000000, 0x20800080, 0x00020000, 0x00820080