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 #if defined(__SUNPRO_C) && defined(__sparcv9)
50 # define ABI64 /* They've said -xarch=v9 at command line */
51 #elif defined(__GNUC__) && defined(__arch64__)
52 # define ABI64 /* They've said -m64 at command line */
56 .register %g2,#scratch
57 .register %g3,#scratch
64 # ifndef OPENSSL_SYSNAME_ULTRASPARC
65 # define OPENSSL_SYSNAME_ULTRASPARC
122 ! The logic used in initial and final permutations is the same as in
123 ! the C code. The permutations are done with a clever shift, xor, and
126 ! The macro also loads address sbox 1 to 5 to global 1 to 5, address
127 ! sbox 6 to local6, and addres sbox 8 to out3.
129 ! Rotates the halfs 3 left to bring the sbox bits in convenient positions.
131 ! Loads key first round from address in parameter 5 to out0, out1.
133 ! After the the original LibDES initial permutation, the resulting left
134 ! is in the variable initially used for right and vice versa. The macro
135 ! implements the possibility to keep the halfs in the original registers.
139 ! parameter 3 result left (modify in first round)
140 ! parameter 4 result right (use in first round)
141 ! parameter 5 key address
142 ! parameter 6 1/2 for include encryption/decryption
143 ! parameter 7 1 for move in1 to in3
144 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
145 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
150 ! $1 $2 $4 $3 $5 $6 $7 $8 $9
152 ld [out2+256], local1
155 xor local4, $1, local4
156 ifelse($7,1,{mov in1, in3},{nop})
158 ld [out2+260], local2
159 and local4, local1, local4
160 ifelse($8,1,{mov in3, in4},{})
161 ifelse($8,2,{mov in4, in3},{})
163 ld [out2+280], out4 ! loop counter
164 sll local4, 4, local1
167 ld [out2+264], local3
171 ifelse($9,1,{LDPTR KS3, in4},{})
172 xor local4, $2, local4
173 nop !sethi %hi(DES_SPtrans), global1 ! sbox addr
175 ifelse($9,1,{LDPTR KS2, in3},{})
176 and local4, local2, local4
177 nop !or global1, %lo(DES_SPtrans), global1 ! sbox addr
179 sll local4, 16, local1
185 sethi %hi(16711680), local5
186 xor local4, $1, local4
188 and local4, local3, local4
189 or local5, 255, local5
191 sll local4, 2, local2
197 xor local4, $2, local4
198 add global1, 768, global4
200 and local4, local5, local4
201 add global1, 1024, global5
203 ld [out2+272], local7
204 sll local4, 8, local1
210 ld [$5], out0 ! key 7531
211 xor local4, $1, local4
212 add global1, 256, global2
214 ld [$5+4], out1 ! key 8642
215 and local4, local7, local4
216 add global1, 512, global3
218 sll local4, 1, local1
225 add global1, 1280, local6 ! address sbox 8
228 add global1, 1792, out3 ! address sbox 8
231 or local4, local3, $4
233 or local2, local1, $3
237 ld [out2+284], local5 ! 0x0000FC00 used in the rounds
238 or local2, local1, $3
242 and local1, 252, local1
248 ld [out2+284], local5 ! 0x0000FC00 used in the rounds
249 or local2, local1, $3
253 and local1, 252, local1
261 ! The logic used in the DES rounds is the same as in the C code,
262 ! except that calculations for sbox 1 and sbox 5 begin before
263 ! the previous round is finished.
265 ! In each round one half (work) is modified based on key and the
268 ! In this version we do two rounds in a loop repeated 7 times
269 ! and two rounds seperately.
271 ! One half has the bits for the sboxes in the following positions:
273 ! 777777xx555555xx333333xx111111xx
275 ! 88xx666666xx444444xx222222xx8888
277 ! The bits for each sbox are xor-ed with the key bits for that box.
278 ! The above xx bits are cleared, and the result used for lookup in
279 ! the sbox table. Each sbox entry contains the 4 output bits permuted
280 ! into 32 bits according to the P permutation.
282 ! In the description of DES, left and right are switched after
283 ! each round, except after last round. In this code the original
284 ! left and right are kept in the same register in all rounds, meaning
285 ! that after the 16 rounds the result for right is in the register
286 ! originally used for left.
288 ! parameter 1 first work (left in first round)
289 ! parameter 2 first use (right in first round)
290 ! parameter 3 enc/dec 1/-1
291 ! parameter 4 loop label
292 ! parameter 5 key address register
293 ! parameter 6 optional address for key next encryption/decryption
294 ! parameter 7 not empty for include retl
296 ! also compares in2 to 8
298 define(rounds_macro, {
301 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
305 ld [out2+284], local5 ! 0x0000FC00
307 and local1, 252, local1
312 ! local6 is address sbox 6
313 ! out3 is address sbox 8
314 ! out4 is loop counter
316 ld [global1+local1], local1
317 xor $2, out1, out1 ! 8642
318 xor $2, out0, out0 ! 7531
319 ! fmovs %f0, %f0 ! fxor used for alignment
321 srl out1, 4, local0 ! rotate 4 right
322 and out0, local5, local3 ! 3
325 ld [$5+$3*8], local7 ! key 7531 next round
326 srl local3, 8, local3 ! 3
327 and local0, 252, local2 ! 2
330 ld [global3+local3],local3 ! 3
331 sll out1, 28, out1 ! rotate
332 xor $1, local1, $1 ! 1 finished, local1 now sbox 7
334 ld [global2+local2], local2 ! 2
335 srl out0, 24, local1 ! 7
336 or out1, local0, out1 ! rotate
338 ldub [out2+local1], local1 ! 7 (and 0xFC)
339 srl out1, 24, local0 ! 8
340 and out1, local5, local4 ! 4
342 ldub [out2+local0], local0 ! 8 (and 0xFC)
343 srl local4, 8, local4 ! 4
344 xor $1, local2, $1 ! 2 finished local2 now sbox 6
346 ld [global4+local4],local4 ! 4
347 srl out1, 16, local2 ! 6
348 xor $1, local3, $1 ! 3 finished local3 now sbox 5
350 ld [out3+local0],local0 ! 8
351 and local2, 252, local2 ! 6
352 add global1, 1536, local5 ! address sbox 7
354 ld [local6+local2], local2 ! 6
355 srl out0, 16, local3 ! 5
356 xor $1, local4, $1 ! 4 finished
358 ld [local5+local1],local1 ! 7
359 and local3, 252, local3 ! 5
360 xor $1, local0, $1 ! 8 finished
362 ld [global5+local3],local3 ! 5
363 xor $1, local2, $1 ! 6 finished
366 ld [$5+$3*8+4], out0 ! key 8642 next round
367 xor $1, local7, local2 ! sbox 5 next round
368 xor $1, local1, $1 ! 7 finished
370 srl local2, 16, local2 ! sbox 5 next round
371 xor $1, local3, $1 ! 5 finished
373 ld [$5+$3*16+4], out1 ! key 8642 next round again
374 and local2, 252, local2 ! sbox5 next round
376 xor $1, local7, local7 ! 7531
378 ld [global5+local2], local2 ! 5
379 srl local7, 24, local3 ! 7
380 xor $1, out0, out0 ! 8642
382 ldub [out2+local3], local3 ! 7 (and 0xFC)
383 srl out0, 4, local0 ! rotate 4 right
384 and local7, 252, local1 ! 1
386 sll out0, 28, out0 ! rotate
387 xor $2, local2, $2 ! 5 finished local2 used
389 srl local0, 8, local4 ! 4
390 and local0, 252, local2 ! 2
391 ld [local5+local3], local3 ! 7
393 srl local0, 16, local5 ! 6
394 or out0, local0, out0 ! rotate
395 ld [global2+local2], local2 ! 2
398 ld [$5+$3*16], out0 ! key 7531 next round
399 and local4, 252, local4 ! 4
401 and local5, 252, local5 ! 6
402 ld [global4+local4], local4 ! 4
403 xor $2, local3, $2 ! 7 finished local3 used
405 and local0, 252, local0 ! 8
406 ld [local6+local5], local5 ! 6
407 xor $2, local2, $2 ! 2 finished local2 now sbox 3
409 srl local7, 8, local2 ! 3 start
410 ld [out3+local0], local0 ! 8
411 xor $2, local4, $2 ! 4 finished
413 and local2, 252, local2 ! 3
414 ld [global1+local1], local1 ! 1
415 xor $2, local5, $2 ! 6 finished local5 used
417 ld [global3+local2], local2 ! 3
418 xor $2, local0, $2 ! 8 finished
419 add $5, $3*16, $5 ! enc add 8, dec add -8 to key pointer
421 ld [out2+284], local5 ! 0x0000FC00
422 xor $2, out0, local4 ! sbox 1 next round
423 xor $2, local1, $2 ! 1 finished
425 xor $2, local2, $2 ! 3 finished
426 #ifdef OPENSSL_SYSNAME_ULTRASPARC
431 and local4, 252, local1 ! sbox 1 next round
435 ld [global1+local1], local1
439 srl out1, 4, local0 ! rotate
440 and out0, local5, local3
442 ld [$5+$3*8], local7 ! key 7531
443 srl local3, 8, local3
444 and local0, 252, local2
446 ld [global3+local3],local3
447 sll out1, 28, out1 ! rotate
448 xor $1, local1, $1 ! 1 finished, local1 now sbox 7
450 ld [global2+local2], local2
452 or out1, local0, out1 ! rotate
454 ldub [out2+local1], local1
456 and out1, local5, local4
458 ldub [out2+local0], local0
459 srl local4, 8, local4
460 xor $1, local2, $1 ! 2 finished local2 now sbox 6
462 ld [global4+local4],local4
464 xor $1, local3, $1 ! 3 finished local3 now sbox 5
466 ld [out3+local0],local0
467 and local2, 252, local2
468 add global1, 1536, local5 ! address sbox 7
470 ld [local6+local2], local2
472 xor $1, local4, $1 ! 4 finished
474 ld [local5+local1],local1
475 and local3, 252, local3
478 ld [global5+local3],local3
479 xor $1, local2, $1 ! 6 finished
482 ifelse($6,{}, {}, {ld [out2+280], out4}) ! loop counter
483 xor $1, local7, local2 ! sbox 5 next round
484 xor $1, local1, $1 ! 7 finished
487 srl local2, 16, local2 ! sbox 5 next round
488 xor $1, local3, $1 ! 5 finished
490 and local2, 252, local2
491 ! next round (two rounds more)
492 xor $1, local7, local7 ! 7531
494 ld [global5+local2], local2
495 srl local7, 24, local3
496 xor $1, out0, out0 ! 8642
498 ldub [out2+local3], local3
499 srl out0, 4, local0 ! rotate
500 and local7, 252, local1
502 sll out0, 28, out0 ! rotate
503 xor $2, local2, $2 ! 5 finished local2 used
505 srl local0, 8, local4
506 and local0, 252, local2
507 ld [local5+local3], local3
509 srl local0, 16, local5
510 or out0, local0, out0 ! rotate
511 ld [global2+local2], local2
514 ifelse($6,{}, {}, {ld [$6], out0}) ! key next encryption/decryption
515 and local4, 252, local4
517 and local5, 252, local5
518 ld [global4+local4], local4
519 xor $2, local3, $2 ! 7 finished local3 used
521 and local0, 252, local0
522 ld [local6+local5], local5
523 xor $2, local2, $2 ! 2 finished local2 now sbox 3
525 srl local7, 8, local2 ! 3 start
526 ld [out3+local0], local0
529 and local2, 252, local2
530 ld [global1+local1], local1
531 xor $2, local5, $2 ! 6 finished local5 used
533 ld [global3+local2], local2
537 ifelse($6,{}, {}, {ld [$6+4], out1}) ! key next encryption/decryption
541 ifelse($7,{}, {}, {retl})
548 ! parameter 1 right (original left)
549 ! parameter 2 left (original right)
550 ! parameter 3 1 for optional store to [in0]
551 ! parameter 4 1 for load input/output address to local5/7
553 ! The final permutation logic switches the halfes, meaning that
554 ! left and right ends up the the registers originally used.
559 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
561 ! initially undo the rotate 3 left done after initial permutation
562 ! original left is received shifted 3 right and 29 left in local3/4
565 or local3, local4, $1
568 sethi %hi(0x55555555), local2
571 or local2, %lo(0x55555555), local2
574 sethi %hi(0x00ff00ff), local1
575 xor local3, $1, local3
576 or local1, %lo(0x00ff00ff), local1
577 and local3, local2, local3
578 sethi %hi(0x33333333), local4
579 sll local3, 1, local2
585 xor local3, $2, local3
586 or local4, %lo(0x33333333), local4
587 and local3, local1, local3
588 sethi %hi(0x0000ffff), local1
589 sll local3, 8, local2
595 xor local3, $1, local3
596 or local1, %lo(0x0000ffff), local1
597 and local3, local4, local3
598 sethi %hi(0x0f0f0f0f), local4
599 sll local3, 2, local2
601 ifelse($4,1, {LDPTR INPUT, local5})
604 ifelse($4,1, {LDPTR OUTPUT, local7})
607 xor local3, $2, local3
608 or local4, %lo(0x0f0f0f0f), local4
609 and local3, local1, local3
610 sll local3, 16, local2
612 xor $2, local3, local1
614 srl local1, 4, local3
616 xor local3, $1, local3
617 and local3, local4, local3
618 sll local3, 4, local2
624 ifelse($3,1, {st $1, [in0]})
626 xor local1, local2, $2
628 ifelse($3,1, {st $2, [in0+4]})
635 ! Does initial permutation for next block mixed with
636 ! final permutation for current block.
638 ! parameter 1 original left
639 ! parameter 2 original right
640 ! parameter 3 left ip
641 ! parameter 4 right ip
642 ! parameter 5 1: load ks1/ks2 to in3/in4, add 120 to in4
645 ! also adds -8 to length in2 and loads loop counter to out4
647 define(fp_ip_macro, {
650 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
652 define({temp1},{out4})
653 define({temp2},{local3})
655 define({ip1},{local1})
656 define({ip2},{local2})
657 define({ip4},{local4})
658 define({ip5},{local5})
660 ! $1 in local3, local4
664 or local3, local4, $1
667 ifelse($5,2,{mov in4, in3})
676 and temp1, ip5, temp1
677 xor local0, $3, local0
682 and local0, ip1, local0
685 sll local0, 4, local7
695 xor local0, $4, local0
696 and temp1, ip4, temp1
697 and local0, ip2, local0
700 sll local0, 16, local7
706 ld [out2+264], temp2 ! ip3
710 xor local0, $3, local0
711 and temp1, temp2, temp1
712 and local0, temp2, local0
715 sll local0, 2, local7
723 xor local0, $4, local0
724 and temp1, ip2, temp1
725 and local0, ip4, local0
727 xor $2, temp1, local4
728 sll local0, 8, local7
735 xor local0, $3, local0
738 and local0, ip5, local0
740 sll local0, 1, local7
747 and temp1, ip1, temp1
752 ifelse($5,1,{LDPTR KS2, in4})
754 xor local4, temp2, $2
756 ! reload since used as temporar:
758 ld [out2+280], out4 ! loop counter
761 ifelse($5,1,{add in4, 120, in4})
763 ifelse($5,1,{LDPTR KS1, in3})
766 or local0, local5, $4
767 or local2, local7, $3
773 ! {load_little_endian}
775 ! parameter 1 address
776 ! parameter 2 destination left
777 ! parameter 3 destination right
778 ! parameter 4 temporar
781 define(load_little_endian, {
783 ! {load_little_endian}
784 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
786 ! first in memory to rightmost in register
788 #ifdef OPENSSL_SYSNAME_ULTRASPARC
834 ! {load_little_endian_inc}
836 ! parameter 1 address
837 ! parameter 2 destination left
838 ! parameter 3 destination right
839 ! parameter 4 temporar
844 define(load_little_endian_inc, {
846 ! {load_little_endian_inc}
847 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
849 ! first in memory to rightmost in register
851 #ifdef OPENSSL_SYSNAME_ULTRASPARC
900 ! Loads 1 to 7 bytes little endian
901 ! Remaining bytes are zeroed.
903 ! parameter 1 address
905 ! parameter 3 destination register left
906 ! parameter 4 destination register right
910 ! parameter 8 return label
912 define(load_n_bytes, {
915 ! $1 $2 $5 $6 $7 $8 $7 $8 $9
920 add %o7,$7.jmp.table-$7.0,$5
972 ! {store_little_endian}
974 ! parameter 1 address
975 ! parameter 2 source left
976 ! parameter 3 source right
977 ! parameter 4 temporar
979 define(store_little_endian, {
981 ! {store_little_endian}
982 ! $1 $2 $3 $4 $5 $6 $7 $8 $9
984 ! rightmost in register to first in memory
986 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1035 ! Stores 1 to 7 bytes little endian
1037 ! parameter 1 address
1038 ! parameter 2 length
1039 ! parameter 3 source register left
1040 ! parameter 4 source register right
1044 ! parameter 8 return label
1046 define(store_n_bytes, {
1049 ! $1 $2 $5 $6 $7 $8 $7 $8 $9
1054 add %o7,$7.jmp.table-$7.0,$5
1107 define(testvalue,{1})
1109 define(register_init, {
1111 ! For test purposes:
1113 sethi %hi(testvalue), local0
1114 or local0, %lo(testvalue), local0
1116 ifelse($1,{},{}, {mov local0, $1})
1117 ifelse($2,{},{}, {mov local0, $2})
1118 ifelse($3,{},{}, {mov local0, $3})
1119 ifelse($4,{},{}, {mov local0, $4})
1120 ifelse($5,{},{}, {mov local0, $5})
1121 ifelse($6,{},{}, {mov local0, $6})
1122 ifelse($7,{},{}, {mov local0, $7})
1123 ifelse($8,{},{}, {mov local0, $8})
1153 ! loads key next encryption/decryption first round from [in4]
1155 rounds_macro(in5, out5, 1, .des_enc.1, in3, in4, retl)
1162 ! implemented with out5 as first parameter to avoid
1163 ! register exchange in ede modes
1166 ! loads key next encryption/decryption first round from [in3]
1168 rounds_macro(out5, in5, -1, .des_dec.1, in4, in3, retl)
1172 ! void DES_encrypt1(data, ks, enc)
1173 ! *******************************
1176 .global DES_encrypt1
1177 .type DES_encrypt1,#function
1181 save %sp, FRAME, %sp
1183 sethi %hi(.PIC.DES_SPtrans-1f),global1
1184 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1186 add %o7,global1,global1
1187 sub global1,.PIC.DES_SPtrans-.des_and,out2
1189 ld [in0], in5 ! left
1192 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1193 be,pn %icc, .encrypt.dec ! enc/dec
1197 ld [in0+4], out5 ! right
1199 ! parameter 6 1/2 for include encryption/decryption
1200 ! parameter 7 1 for move in1 to in3
1201 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1203 ip_macro(in5, out5, in5, out5, in3, 0, 1, 1)
1205 rounds_macro(in5, out5, 1, .des_encrypt1.1, in3, in4) ! in4 not used
1207 fp_macro(in5, out5, 1) ! 1 for store to [in0]
1214 add in1, 120, in3 ! use last subkey for first round
1216 ! parameter 6 1/2 for include encryption/decryption
1217 ! parameter 7 1 for move in1 to in3
1218 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1220 ip_macro(in5, out5, out5, in5, in4, 2, 0, 1) ! include dec, ks in4
1222 fp_macro(out5, in5, 1) ! 1 for store to [in0]
1228 .size DES_encrypt1,.DES_encrypt1.end-DES_encrypt1
1231 ! void DES_encrypt2(data, ks, enc)
1232 !*********************************
1234 ! encrypts/decrypts without initial/final permutation
1237 .global DES_encrypt2
1238 .type DES_encrypt2,#function
1242 save %sp, FRAME, %sp
1244 sethi %hi(.PIC.DES_SPtrans-1f),global1
1245 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1247 add %o7,global1,global1
1248 sub global1,.PIC.DES_SPtrans-.des_and,out2
1250 ! Set sbox address 1 to 6 and rotate halfs 3 left
1251 ! Errors caught by destest? Yes. Still? *NO*
1253 !sethi %hi(DES_SPtrans), global1 ! address sbox 1
1255 !or global1, %lo(DES_SPtrans), global1 ! sbox 1
1257 add global1, 256, global2 ! sbox 2
1258 add global1, 512, global3 ! sbox 3
1260 ld [in0], out5 ! right
1261 add global1, 768, global4 ! sbox 4
1262 add global1, 1024, global5 ! sbox 5
1264 ld [in0+4], in5 ! left
1265 add global1, 1280, local6 ! sbox 6
1266 add global1, 1792, out3 ! sbox 8
1271 mov in1, in3 ! key address to in3
1277 add in5, local5, in5
1279 add out5, local7, out5
1282 ! we use our own stackframe
1284 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1285 be,pn %icc, .encrypt2.dec ! decryption
1289 STPTR in0, [%sp+BIAS+ARG0+0*ARGSZ]
1291 ld [in3], out0 ! key 7531 first round
1292 mov LOOPS, out4 ! loop counter
1294 ld [in3+4], out1 ! key 8642 first round
1295 sethi %hi(0x0000FC00), local5
1306 LDPTR [%sp+BIAS+ARG0+0*ARGSZ], in0
1319 ld [in4], out0 ! key 7531 first round
1320 mov LOOPS, out4 ! loop counter
1322 ld [in4+4], out1 ! key 8642 first round
1323 sethi %hi(0x0000FC00), local5
1325 mov in5, local1 ! left expected in out5
1339 LDPTR [%sp+BIAS+ARG0+0*ARGSZ], in0
1348 .size DES_encrypt2, .DES_encrypt2.end-DES_encrypt2
1351 ! void DES_encrypt3(data, ks1, ks2, ks3)
1352 ! **************************************
1355 .global DES_encrypt3
1356 .type DES_encrypt3,#function
1360 save %sp, FRAME, %sp
1362 sethi %hi(.PIC.DES_SPtrans-1f),global1
1363 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1365 add %o7,global1,global1
1366 sub global1,.PIC.DES_SPtrans-.des_and,out2
1368 ld [in0], in5 ! left
1369 add in2, 120, in4 ! ks2
1371 ld [in0+4], out5 ! right
1372 mov in3, in2 ! save ks3
1374 ! parameter 6 1/2 for include encryption/decryption
1375 ! parameter 7 1 for mov in1 to in3
1376 ! parameter 8 1 for mov in3 to in4
1377 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1379 ip_macro(in5, out5, in5, out5, in3, 1, 1, 0, 0)
1382 mov in2, in3 ! preload ks3
1387 fp_macro(in5, out5, 1)
1393 .size DES_encrypt3,.DES_encrypt3.end-DES_encrypt3
1396 ! void DES_decrypt3(data, ks1, ks2, ks3)
1397 ! **************************************
1400 .global DES_decrypt3
1401 .type DES_decrypt3,#function
1405 save %sp, FRAME, %sp
1407 sethi %hi(.PIC.DES_SPtrans-1f),global1
1408 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1410 add %o7,global1,global1
1411 sub global1,.PIC.DES_SPtrans-.des_and,out2
1413 ld [in0], in5 ! left
1414 add in3, 120, in4 ! ks3
1416 ld [in0+4], out5 ! right
1419 ! parameter 6 1/2 for include encryption/decryption
1420 ! parameter 7 1 for mov in1 to in3
1421 ! parameter 8 1 for mov in3 to in4
1422 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1424 ip_macro(in5, out5, out5, in5, in4, 2, 0, 0, 0)
1427 add in1, 120, in4 ! preload ks1
1432 fp_macro(out5, in5, 1)
1438 .size DES_decrypt3,.DES_decrypt3.end-DES_decrypt3
1440 ! void DES_ncbc_encrypt(input, output, length, schedule, ivec, enc)
1441 ! *****************************************************************
1445 .global DES_ncbc_encrypt
1446 .type DES_ncbc_encrypt,#function
1450 save %sp, FRAME, %sp
1452 define({INPUT}, { [%sp+BIAS+ARG0+0*ARGSZ] })
1453 define({OUTPUT}, { [%sp+BIAS+ARG0+1*ARGSZ] })
1454 define({IVEC}, { [%sp+BIAS+ARG0+4*ARGSZ] })
1456 sethi %hi(.PIC.DES_SPtrans-1f),global1
1457 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1459 add %o7,global1,global1
1460 sub global1,.PIC.DES_SPtrans-.des_and,out2
1464 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1465 be,pn %icc, .ncbc.dec
1471 ! addr left right temp label
1472 load_little_endian(in4, in5, out5, local3, .LLE1) ! iv
1474 addcc in2, -8, in2 ! bytes missing when first block done
1476 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1477 bl,pn %icc, .ncbc.enc.seven.or.less
1479 bl .ncbc.enc.seven.or.less
1481 mov in3, in4 ! schedule
1483 .ncbc.enc.next.block:
1485 load_little_endian(in0, out4, global4, local3, .LLE2) ! block
1487 .ncbc.enc.next.block_1:
1489 xor in5, out4, in5 ! iv xor
1490 xor out5, global4, out5 ! iv xor
1492 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1493 ip_macro(in5, out5, in5, out5, in3, 0, 0, 2)
1495 .ncbc.enc.next.block_2:
1497 !// call .des_enc ! compares in2 to 8
1498 ! rounds inlined for alignment purposes
1500 add global1, 768, global4 ! address sbox 4 since register used below
1502 rounds_macro(in5, out5, 1, .ncbc.enc.1, in3, in4) ! include encryption ks in3
1504 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1505 bl,pn %icc, .ncbc.enc.next.block_fp
1507 bl .ncbc.enc.next.block_fp
1509 add in0, 8, in0 ! input address
1511 ! If 8 or more bytes are to be encrypted after this block,
1512 ! we combine final permutation for this block with initial
1513 ! permutation for next block. Load next block:
1515 load_little_endian(in0, global3, global4, local5, .LLE12)
1517 ! parameter 1 original left
1518 ! parameter 2 original right
1519 ! parameter 3 left ip
1520 ! parameter 4 right ip
1521 ! parameter 5 1: load ks1/ks2 to in3/in4, add 120 to in4
1524 ! also adds -8 to length in2 and loads loop counter to out4
1526 fp_ip_macro(out0, out1, global3, global4, 2)
1528 store_little_endian(in1, out0, out1, local3, .SLE10) ! block
1530 ld [in3], out0 ! key 7531 first round next block
1532 xor global3, out5, in5 ! iv xor next block
1534 ld [in3+4], out1 ! key 8642
1535 add global1, 512, global3 ! address sbox 3 since register used
1536 xor global4, local1, out5 ! iv xor next block
1538 ba .ncbc.enc.next.block_2
1539 add in1, 8, in1 ! output adress
1541 .ncbc.enc.next.block_fp:
1545 store_little_endian(in1, in5, out5, local3, .SLE1) ! block
1547 addcc in2, -8, in2 ! bytes missing when next block done
1549 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1550 bpos,pt %icc, .ncbc.enc.next.block ! also jumps if 0
1552 bpos .ncbc.enc.next.block
1556 .ncbc.enc.seven.or.less:
1560 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1561 ble,pt %icc, .ncbc.enc.finish
1563 ble .ncbc.enc.finish
1567 add in2, 8, local1 ! bytes to load
1569 ! addr, length, dest left, dest right, temp, temp2, label, ret label
1570 load_n_bytes(in0, local1, global4, out4, local2, local3, .LNB1, .ncbc.enc.next.block_1)
1572 ! Loads 1 to 7 bytes little endian to global4, out4
1578 store_little_endian(local4, in5, out5, local5, .SLE2) ! ivec
1590 LDPTR IVEC, local7 ! ivec
1591 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1592 ble,pn %icc, .ncbc.dec.finish
1594 ble .ncbc.dec.finish
1596 mov in3, in4 ! schedule
1599 mov in0, local5 ! input
1601 load_little_endian(local7, in0, in1, local3, .LLE3) ! ivec
1603 .ncbc.dec.next.block:
1605 load_little_endian(local5, in5, out5, local3, .LLE4) ! block
1607 ! parameter 6 1/2 for include encryption/decryption
1608 ! parameter 7 1 for mov in1 to in3
1609 ! parameter 8 1 for mov in3 to in4
1611 ip_macro(in5, out5, out5, in5, in4, 2, 0, 1) ! include decryprion ks in4
1613 fp_macro(out5, in5, 0, 1) ! 1 for input and output address to local5/7
1615 ! in2 is bytes left to be stored
1616 ! in2 is compared to 8 in the rounds
1618 xor out5, in0, out4 ! iv xor
1619 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1620 bl,pn %icc, .ncbc.dec.seven.or.less
1622 bl .ncbc.dec.seven.or.less
1624 xor in5, in1, global4 ! iv xor
1626 ! Load ivec next block now, since input and output address might be the same.
1628 load_little_endian_inc(local5, in0, in1, local3, .LLE5) ! iv
1630 store_little_endian(local7, out4, global4, local3, .SLE3)
1633 add local7, 8, local7
1636 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1637 bg,pt %icc, .ncbc.dec.next.block
1639 bg .ncbc.dec.next.block
1641 STPTR local7, OUTPUT
1646 LDPTR IVEC, local4 ! ivec
1647 store_little_endian(local4, in0, in1, local5, .SLE4)
1654 .ncbc.dec.seven.or.less:
1656 load_little_endian_inc(local5, in0, in1, local3, .LLE13) ! ivec
1658 store_n_bytes(local7, in2, global4, out4, local3, local4, .SNB1, .ncbc.dec.store.iv)
1661 .DES_ncbc_encrypt.end:
1662 .size DES_ncbc_encrypt, .DES_ncbc_encrypt.end-DES_ncbc_encrypt
1665 ! void DES_ede3_cbc_encrypt(input, output, lenght, ks1, ks2, ks3, ivec, enc)
1666 ! **************************************************************************
1670 .global DES_ede3_cbc_encrypt
1671 .type DES_ede3_cbc_encrypt,#function
1673 DES_ede3_cbc_encrypt:
1675 save %sp, FRAME, %sp
1677 define({KS1}, { [%sp+BIAS+ARG0+3*ARGSZ] })
1678 define({KS2}, { [%sp+BIAS+ARG0+4*ARGSZ] })
1679 define({KS3}, { [%sp+BIAS+ARG0+5*ARGSZ] })
1681 sethi %hi(.PIC.DES_SPtrans-1f),global1
1682 or global1,%lo(.PIC.DES_SPtrans-1f),global1
1684 add %o7,global1,global1
1685 sub global1,.PIC.DES_SPtrans-.des_and,out2
1687 LDPTR [%fp+BIAS+ARG0+7*ARGSZ], local3 ! enc
1688 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1691 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1692 be,pn %icc, .ede3.dec
1700 load_little_endian(local4, in5, out5, local3, .LLE6) ! ivec
1702 addcc in2, -8, in2 ! bytes missing after next block
1704 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1705 bl,pn %icc, .ede3.enc.seven.or.less
1707 bl .ede3.enc.seven.or.less
1711 .ede3.enc.next.block:
1713 load_little_endian(in0, out4, global4, local3, .LLE7)
1715 .ede3.enc.next.block_1:
1718 xor in5, out4, in5 ! iv xor
1719 xor out5, global4, out5 ! iv xor
1722 add in4, 120, in4 ! for decryption we use last subkey first
1725 ip_macro(in5, out5, in5, out5, in3)
1727 .ede3.enc.next.block_2:
1729 call .des_enc ! ks1 in3
1732 call .des_dec ! ks2 in4
1735 call .des_enc ! ks3 in3 compares in2 to 8
1738 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1739 bl,pn %icc, .ede3.enc.next.block_fp
1741 bl .ede3.enc.next.block_fp
1745 ! If 8 or more bytes are to be encrypted after this block,
1746 ! we combine final permutation for this block with initial
1747 ! permutation for next block. Load next block:
1749 load_little_endian(in0, global3, global4, local5, .LLE11)
1751 ! parameter 1 original left
1752 ! parameter 2 original right
1753 ! parameter 3 left ip
1754 ! parameter 4 right ip
1755 ! parameter 5 1: load ks1/ks2 to in3/in4, add 120 to in4
1758 ! also adds -8 to length in2 and loads loop counter to out4
1760 fp_ip_macro(out0, out1, global3, global4, 1)
1762 store_little_endian(in1, out0, out1, local3, .SLE9) ! block
1765 xor global3, out5, in5 ! iv xor next block
1767 ld [in3], out0 ! key 7531
1768 add global1, 512, global3 ! address sbox 3
1769 xor global4, local1, out5 ! iv xor next block
1771 ld [in3+4], out1 ! key 8642
1772 add global1, 768, global4 ! address sbox 4
1773 ba .ede3.enc.next.block_2
1776 .ede3.enc.next.block_fp:
1780 store_little_endian(in1, in5, out5, local3, .SLE5) ! block
1782 addcc in2, -8, in2 ! bytes missing when next block done
1784 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1785 bpos,pt %icc, .ede3.enc.next.block
1787 bpos .ede3.enc.next.block
1791 .ede3.enc.seven.or.less:
1795 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1796 ble,pt %icc, .ede3.enc.finish
1798 ble .ede3.enc.finish
1802 add in2, 8, local1 ! bytes to load
1804 ! addr, length, dest left, dest right, temp, temp2, label, ret label
1805 load_n_bytes(in0, local1, global4, out4, local2, local3, .LNB2, .ede3.enc.next.block_1)
1809 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1810 store_little_endian(local4, in5, out5, local5, .SLE6) ! ivec
1827 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1828 ble %icc, .ede3.dec.finish
1830 ble .ede3.dec.finish
1834 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local7 ! iv
1835 load_little_endian(local7, in0, in1, local3, .LLE8)
1837 .ede3.dec.next.block:
1839 load_little_endian(local5, in5, out5, local3, .LLE9)
1841 ! parameter 6 1/2 for include encryption/decryption
1842 ! parameter 7 1 for mov in1 to in3
1843 ! parameter 8 1 for mov in3 to in4
1844 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1846 ip_macro(in5, out5, out5, in5, in4, 2, 0, 0, 1) ! inc .des_dec ks3 in4
1848 call .des_enc ! ks2 in3
1851 call .des_dec ! ks1 in4
1854 fp_macro(out5, in5, 0, 1) ! 1 for input and output address local5/7
1856 ! in2 is bytes left to be stored
1857 ! in2 is compared to 8 in the rounds
1860 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1861 bl,pn %icc, .ede3.dec.seven.or.less
1863 bl .ede3.dec.seven.or.less
1865 xor in5, in1, global4
1867 load_little_endian_inc(local5, in0, in1, local3, .LLE10) ! iv next block
1869 store_little_endian(local7, out4, global4, local3, .SLE7) ! block
1873 add local7, 8, local7
1875 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1876 bg,pt %icc, .ede3.dec.next.block
1878 bg .ede3.dec.next.block
1880 STPTR local7, OUTPUT
1884 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1885 store_little_endian(local4, in0, in1, local5, .SLE8) ! ivec
1892 .ede3.dec.seven.or.less:
1894 load_little_endian_inc(local5, in0, in1, local3, .LLE14) ! iv
1896 store_n_bytes(local7, in2, global4, out4, local3, local4, .SNB2, .ede3.dec.store.iv)
1899 .DES_ede3_cbc_encrypt.end:
1900 .size DES_ede3_cbc_encrypt,.DES_ede3_cbc_encrypt.end-DES_ede3_cbc_encrypt
1903 .type .des_and,#object
1908 ! This table is used for AND 0xFC when it is known that register
1909 ! bits 8-31 are zero. Makes it possible to do three arithmetic
1910 ! operations in one cycle.
1912 .byte 0, 0, 0, 0, 4, 4, 4, 4
1913 .byte 8, 8, 8, 8, 12, 12, 12, 12
1914 .byte 16, 16, 16, 16, 20, 20, 20, 20
1915 .byte 24, 24, 24, 24, 28, 28, 28, 28
1916 .byte 32, 32, 32, 32, 36, 36, 36, 36
1917 .byte 40, 40, 40, 40, 44, 44, 44, 44
1918 .byte 48, 48, 48, 48, 52, 52, 52, 52
1919 .byte 56, 56, 56, 56, 60, 60, 60, 60
1920 .byte 64, 64, 64, 64, 68, 68, 68, 68
1921 .byte 72, 72, 72, 72, 76, 76, 76, 76
1922 .byte 80, 80, 80, 80, 84, 84, 84, 84
1923 .byte 88, 88, 88, 88, 92, 92, 92, 92
1924 .byte 96, 96, 96, 96, 100, 100, 100, 100
1925 .byte 104, 104, 104, 104, 108, 108, 108, 108
1926 .byte 112, 112, 112, 112, 116, 116, 116, 116
1927 .byte 120, 120, 120, 120, 124, 124, 124, 124
1928 .byte 128, 128, 128, 128, 132, 132, 132, 132
1929 .byte 136, 136, 136, 136, 140, 140, 140, 140
1930 .byte 144, 144, 144, 144, 148, 148, 148, 148
1931 .byte 152, 152, 152, 152, 156, 156, 156, 156
1932 .byte 160, 160, 160, 160, 164, 164, 164, 164
1933 .byte 168, 168, 168, 168, 172, 172, 172, 172
1934 .byte 176, 176, 176, 176, 180, 180, 180, 180
1935 .byte 184, 184, 184, 184, 188, 188, 188, 188
1936 .byte 192, 192, 192, 192, 196, 196, 196, 196
1937 .byte 200, 200, 200, 200, 204, 204, 204, 204
1938 .byte 208, 208, 208, 208, 212, 212, 212, 212
1939 .byte 216, 216, 216, 216, 220, 220, 220, 220
1940 .byte 224, 224, 224, 224, 228, 228, 228, 228
1941 .byte 232, 232, 232, 232, 236, 236, 236, 236
1942 .byte 240, 240, 240, 240, 244, 244, 244, 244
1943 .byte 248, 248, 248, 248, 252, 252, 252, 252
1945 ! 5 numbers for initil/final permutation
1947 .word 0x0f0f0f0f ! offset 256
1948 .word 0x0000ffff ! 260
1949 .word 0x33333333 ! 264
1950 .word 0x00ff00ff ! 268
1951 .word 0x55555555 ! 272
1955 .word 0x0000FC00 ! 284
1958 .type DES_SPtrans,#object
1959 .size DES_SPtrans,2048
1964 .word 0x02080800, 0x00080000, 0x02000002, 0x02080802
1965 .word 0x02000000, 0x00080802, 0x00080002, 0x02000002
1966 .word 0x00080802, 0x02080800, 0x02080000, 0x00000802
1967 .word 0x02000802, 0x02000000, 0x00000000, 0x00080002
1968 .word 0x00080000, 0x00000002, 0x02000800, 0x00080800
1969 .word 0x02080802, 0x02080000, 0x00000802, 0x02000800
1970 .word 0x00000002, 0x00000800, 0x00080800, 0x02080002
1971 .word 0x00000800, 0x02000802, 0x02080002, 0x00000000
1972 .word 0x00000000, 0x02080802, 0x02000800, 0x00080002
1973 .word 0x02080800, 0x00080000, 0x00000802, 0x02000800
1974 .word 0x02080002, 0x00000800, 0x00080800, 0x02000002
1975 .word 0x00080802, 0x00000002, 0x02000002, 0x02080000
1976 .word 0x02080802, 0x00080800, 0x02080000, 0x02000802
1977 .word 0x02000000, 0x00000802, 0x00080002, 0x00000000
1978 .word 0x00080000, 0x02000000, 0x02000802, 0x02080800
1979 .word 0x00000002, 0x02080002, 0x00000800, 0x00080802
1981 .word 0x40108010, 0x00000000, 0x00108000, 0x40100000
1982 .word 0x40000010, 0x00008010, 0x40008000, 0x00108000
1983 .word 0x00008000, 0x40100010, 0x00000010, 0x40008000
1984 .word 0x00100010, 0x40108000, 0x40100000, 0x00000010
1985 .word 0x00100000, 0x40008010, 0x40100010, 0x00008000
1986 .word 0x00108010, 0x40000000, 0x00000000, 0x00100010
1987 .word 0x40008010, 0x00108010, 0x40108000, 0x40000010
1988 .word 0x40000000, 0x00100000, 0x00008010, 0x40108010
1989 .word 0x00100010, 0x40108000, 0x40008000, 0x00108010
1990 .word 0x40108010, 0x00100010, 0x40000010, 0x00000000
1991 .word 0x40000000, 0x00008010, 0x00100000, 0x40100010
1992 .word 0x00008000, 0x40000000, 0x00108010, 0x40008010
1993 .word 0x40108000, 0x00008000, 0x00000000, 0x40000010
1994 .word 0x00000010, 0x40108010, 0x00108000, 0x40100000
1995 .word 0x40100010, 0x00100000, 0x00008010, 0x40008000
1996 .word 0x40008010, 0x00000010, 0x40100000, 0x00108000
1998 .word 0x04000001, 0x04040100, 0x00000100, 0x04000101
1999 .word 0x00040001, 0x04000000, 0x04000101, 0x00040100
2000 .word 0x04000100, 0x00040000, 0x04040000, 0x00000001
2001 .word 0x04040101, 0x00000101, 0x00000001, 0x04040001
2002 .word 0x00000000, 0x00040001, 0x04040100, 0x00000100
2003 .word 0x00000101, 0x04040101, 0x00040000, 0x04000001
2004 .word 0x04040001, 0x04000100, 0x00040101, 0x04040000
2005 .word 0x00040100, 0x00000000, 0x04000000, 0x00040101
2006 .word 0x04040100, 0x00000100, 0x00000001, 0x00040000
2007 .word 0x00000101, 0x00040001, 0x04040000, 0x04000101
2008 .word 0x00000000, 0x04040100, 0x00040100, 0x04040001
2009 .word 0x00040001, 0x04000000, 0x04040101, 0x00000001
2010 .word 0x00040101, 0x04000001, 0x04000000, 0x04040101
2011 .word 0x00040000, 0x04000100, 0x04000101, 0x00040100
2012 .word 0x04000100, 0x00000000, 0x04040001, 0x00000101
2013 .word 0x04000001, 0x00040101, 0x00000100, 0x04040000
2015 .word 0x00401008, 0x10001000, 0x00000008, 0x10401008
2016 .word 0x00000000, 0x10400000, 0x10001008, 0x00400008
2017 .word 0x10401000, 0x10000008, 0x10000000, 0x00001008
2018 .word 0x10000008, 0x00401008, 0x00400000, 0x10000000
2019 .word 0x10400008, 0x00401000, 0x00001000, 0x00000008
2020 .word 0x00401000, 0x10001008, 0x10400000, 0x00001000
2021 .word 0x00001008, 0x00000000, 0x00400008, 0x10401000
2022 .word 0x10001000, 0x10400008, 0x10401008, 0x00400000
2023 .word 0x10400008, 0x00001008, 0x00400000, 0x10000008
2024 .word 0x00401000, 0x10001000, 0x00000008, 0x10400000
2025 .word 0x10001008, 0x00000000, 0x00001000, 0x00400008
2026 .word 0x00000000, 0x10400008, 0x10401000, 0x00001000
2027 .word 0x10000000, 0x10401008, 0x00401008, 0x00400000
2028 .word 0x10401008, 0x00000008, 0x10001000, 0x00401008
2029 .word 0x00400008, 0x00401000, 0x10400000, 0x10001008
2030 .word 0x00001008, 0x10000000, 0x10000008, 0x10401000
2032 .word 0x08000000, 0x00010000, 0x00000400, 0x08010420
2033 .word 0x08010020, 0x08000400, 0x00010420, 0x08010000
2034 .word 0x00010000, 0x00000020, 0x08000020, 0x00010400
2035 .word 0x08000420, 0x08010020, 0x08010400, 0x00000000
2036 .word 0x00010400, 0x08000000, 0x00010020, 0x00000420
2037 .word 0x08000400, 0x00010420, 0x00000000, 0x08000020
2038 .word 0x00000020, 0x08000420, 0x08010420, 0x00010020
2039 .word 0x08010000, 0x00000400, 0x00000420, 0x08010400
2040 .word 0x08010400, 0x08000420, 0x00010020, 0x08010000
2041 .word 0x00010000, 0x00000020, 0x08000020, 0x08000400
2042 .word 0x08000000, 0x00010400, 0x08010420, 0x00000000
2043 .word 0x00010420, 0x08000000, 0x00000400, 0x00010020
2044 .word 0x08000420, 0x00000400, 0x00000000, 0x08010420
2045 .word 0x08010020, 0x08010400, 0x00000420, 0x00010000
2046 .word 0x00010400, 0x08010020, 0x08000400, 0x00000420
2047 .word 0x00000020, 0x00010420, 0x08010000, 0x08000020
2049 .word 0x80000040, 0x00200040, 0x00000000, 0x80202000
2050 .word 0x00200040, 0x00002000, 0x80002040, 0x00200000
2051 .word 0x00002040, 0x80202040, 0x00202000, 0x80000000
2052 .word 0x80002000, 0x80000040, 0x80200000, 0x00202040
2053 .word 0x00200000, 0x80002040, 0x80200040, 0x00000000
2054 .word 0x00002000, 0x00000040, 0x80202000, 0x80200040
2055 .word 0x80202040, 0x80200000, 0x80000000, 0x00002040
2056 .word 0x00000040, 0x00202000, 0x00202040, 0x80002000
2057 .word 0x00002040, 0x80000000, 0x80002000, 0x00202040
2058 .word 0x80202000, 0x00200040, 0x00000000, 0x80002000
2059 .word 0x80000000, 0x00002000, 0x80200040, 0x00200000
2060 .word 0x00200040, 0x80202040, 0x00202000, 0x00000040
2061 .word 0x80202040, 0x00202000, 0x00200000, 0x80002040
2062 .word 0x80000040, 0x80200000, 0x00202040, 0x00000000
2063 .word 0x00002000, 0x80000040, 0x80002040, 0x80202000
2064 .word 0x80200000, 0x00002040, 0x00000040, 0x80200040
2066 .word 0x00004000, 0x00000200, 0x01000200, 0x01000004
2067 .word 0x01004204, 0x00004004, 0x00004200, 0x00000000
2068 .word 0x01000000, 0x01000204, 0x00000204, 0x01004000
2069 .word 0x00000004, 0x01004200, 0x01004000, 0x00000204
2070 .word 0x01000204, 0x00004000, 0x00004004, 0x01004204
2071 .word 0x00000000, 0x01000200, 0x01000004, 0x00004200
2072 .word 0x01004004, 0x00004204, 0x01004200, 0x00000004
2073 .word 0x00004204, 0x01004004, 0x00000200, 0x01000000
2074 .word 0x00004204, 0x01004000, 0x01004004, 0x00000204
2075 .word 0x00004000, 0x00000200, 0x01000000, 0x01004004
2076 .word 0x01000204, 0x00004204, 0x00004200, 0x00000000
2077 .word 0x00000200, 0x01000004, 0x00000004, 0x01000200
2078 .word 0x00000000, 0x01000204, 0x01000200, 0x00004200
2079 .word 0x00000204, 0x00004000, 0x01004204, 0x01000000
2080 .word 0x01004200, 0x00000004, 0x00004004, 0x01004204
2081 .word 0x01000004, 0x01004200, 0x01004000, 0x00004004
2083 .word 0x20800080, 0x20820000, 0x00020080, 0x00000000
2084 .word 0x20020000, 0x00800080, 0x20800000, 0x20820080
2085 .word 0x00000080, 0x20000000, 0x00820000, 0x00020080
2086 .word 0x00820080, 0x20020080, 0x20000080, 0x20800000
2087 .word 0x00020000, 0x00820080, 0x00800080, 0x20020000
2088 .word 0x20820080, 0x20000080, 0x00000000, 0x00820000
2089 .word 0x20000000, 0x00800000, 0x20020080, 0x20800080
2090 .word 0x00800000, 0x00020000, 0x20820000, 0x00000080
2091 .word 0x00800000, 0x00020000, 0x20000080, 0x20820080
2092 .word 0x00020080, 0x20000000, 0x00000000, 0x00820000
2093 .word 0x20800080, 0x20020080, 0x20020000, 0x00800080
2094 .word 0x20820000, 0x00000080, 0x00800080, 0x20020000
2095 .word 0x20820080, 0x00800000, 0x20800000, 0x20000080
2096 .word 0x00820000, 0x00020080, 0x20020080, 0x20800000
2097 .word 0x00000080, 0x20820000, 0x00820080, 0x00000000
2098 .word 0x20000000, 0x20800080, 0x00020000, 0x00820080