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
1184 mov .PIC.me.up-(.-4),out0
1186 ld [in0], in5 ! left
1189 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1190 be,pn %icc, .encrypt.dec ! enc/dec
1194 ld [in0+4], out5 ! right
1196 ! parameter 6 1/2 for include encryption/decryption
1197 ! parameter 7 1 for move in1 to in3
1198 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1200 ip_macro(in5, out5, in5, out5, in3, 0, 1, 1)
1202 rounds_macro(in5, out5, 1, .des_encrypt1.1, in3, in4) ! in4 not used
1204 fp_macro(in5, out5, 1) ! 1 for store to [in0]
1211 add in1, 120, in3 ! use last subkey for first round
1213 ! parameter 6 1/2 for include encryption/decryption
1214 ! parameter 7 1 for move in1 to in3
1215 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1217 ip_macro(in5, out5, out5, in5, in4, 2, 0, 1) ! include dec, ks in4
1219 fp_macro(out5, in5, 1) ! 1 for store to [in0]
1225 .size DES_encrypt1,.DES_encrypt1.end-DES_encrypt1
1228 ! void DES_encrypt2(data, ks, enc)
1229 !*********************************
1231 ! encrypts/decrypts without initial/final permutation
1234 .global DES_encrypt2
1235 .type DES_encrypt2,#function
1239 save %sp, FRAME, %sp
1242 mov .PIC.me.up-(.-4),out0
1244 ! Set sbox address 1 to 6 and rotate halfs 3 left
1245 ! Errors caught by destest? Yes. Still? *NO*
1247 !sethi %hi(DES_SPtrans), global1 ! address sbox 1
1249 !or global1, %lo(DES_SPtrans), global1 ! sbox 1
1251 add global1, 256, global2 ! sbox 2
1252 add global1, 512, global3 ! sbox 3
1254 ld [in0], out5 ! right
1255 add global1, 768, global4 ! sbox 4
1256 add global1, 1024, global5 ! sbox 5
1258 ld [in0+4], in5 ! left
1259 add global1, 1280, local6 ! sbox 6
1260 add global1, 1792, out3 ! sbox 8
1265 mov in1, in3 ! key address to in3
1271 add in5, local5, in5
1273 add out5, local7, out5
1276 ! we use our own stackframe
1278 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1279 be,pn %icc, .encrypt2.dec ! decryption
1283 STPTR in0, [%sp+BIAS+ARG0+0*ARGSZ]
1285 ld [in3], out0 ! key 7531 first round
1286 mov LOOPS, out4 ! loop counter
1288 ld [in3+4], out1 ! key 8642 first round
1289 sethi %hi(0x0000FC00), local5
1300 LDPTR [%sp+BIAS+ARG0+0*ARGSZ], in0
1313 ld [in4], out0 ! key 7531 first round
1314 mov LOOPS, out4 ! loop counter
1316 ld [in4+4], out1 ! key 8642 first round
1317 sethi %hi(0x0000FC00), local5
1319 mov in5, local1 ! left expected in out5
1333 LDPTR [%sp+BIAS+ARG0+0*ARGSZ], in0
1342 .size DES_encrypt2, .DES_encrypt2.end-DES_encrypt2
1345 ! void DES_encrypt3(data, ks1, ks2, ks3)
1346 ! **************************************
1349 .global DES_encrypt3
1350 .type DES_encrypt3,#function
1354 save %sp, FRAME, %sp
1357 mov .PIC.me.up-(.-4),out0
1359 ld [in0], in5 ! left
1360 add in2, 120, in4 ! ks2
1362 ld [in0+4], out5 ! right
1363 mov in3, in2 ! save ks3
1365 ! parameter 6 1/2 for include encryption/decryption
1366 ! parameter 7 1 for mov in1 to in3
1367 ! parameter 8 1 for mov in3 to in4
1368 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1370 ip_macro(in5, out5, in5, out5, in3, 1, 1, 0, 0)
1373 mov in2, in3 ! preload ks3
1378 fp_macro(in5, out5, 1)
1384 .size DES_encrypt3,.DES_encrypt3.end-DES_encrypt3
1387 ! void DES_decrypt3(data, ks1, ks2, ks3)
1388 ! **************************************
1391 .global DES_decrypt3
1392 .type DES_decrypt3,#function
1396 save %sp, FRAME, %sp
1399 mov .PIC.me.up-(.-4),out0
1401 ld [in0], in5 ! left
1402 add in3, 120, in4 ! ks3
1404 ld [in0+4], out5 ! right
1407 ! parameter 6 1/2 for include encryption/decryption
1408 ! parameter 7 1 for mov in1 to in3
1409 ! parameter 8 1 for mov in3 to in4
1410 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1412 ip_macro(in5, out5, out5, in5, in4, 2, 0, 0, 0)
1415 add in1, 120, in4 ! preload ks1
1420 fp_macro(out5, in5, 1)
1426 .size DES_decrypt3,.DES_decrypt3.end-DES_decrypt3
1428 ! input: out0 offset between .PIC.me.up and caller
1429 ! output: out0 pointer to .PIC.me.up
1430 ! out2 pointer to .des_and
1431 ! global1 pointer to DES_SPtrans
1434 add out0,%o7,out0 ! pointer to .PIC.me.up
1435 sethi %hi(.des_and-.PIC.me.up),out2
1436 or out2,%lo(.des_and-.PIC.me.up),out2
1439 add out2,.PIC.DES_SPtrans-.des_and,global1
1441 ! void DES_ncbc_encrypt(input, output, length, schedule, ivec, enc)
1442 ! *****************************************************************
1446 .global DES_ncbc_encrypt
1447 .type DES_ncbc_encrypt,#function
1451 save %sp, FRAME, %sp
1453 define({INPUT}, { [%sp+BIAS+ARG0+0*ARGSZ] })
1454 define({OUTPUT}, { [%sp+BIAS+ARG0+1*ARGSZ] })
1455 define({IVEC}, { [%sp+BIAS+ARG0+4*ARGSZ] })
1458 mov .PIC.me.up-(.-4),out0
1462 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1463 be,pn %icc, .ncbc.dec
1469 ! addr left right temp label
1470 load_little_endian(in4, in5, out5, local3, .LLE1) ! iv
1472 addcc in2, -8, in2 ! bytes missing when first block done
1474 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1475 bl,pn %icc, .ncbc.enc.seven.or.less
1477 bl .ncbc.enc.seven.or.less
1479 mov in3, in4 ! schedule
1481 .ncbc.enc.next.block:
1483 load_little_endian(in0, out4, global4, local3, .LLE2) ! block
1485 .ncbc.enc.next.block_1:
1487 xor in5, out4, in5 ! iv xor
1488 xor out5, global4, out5 ! iv xor
1490 ! parameter 8 1 for move in3 to in4, 2 for move in4 to in3
1491 ip_macro(in5, out5, in5, out5, in3, 0, 0, 2)
1493 .ncbc.enc.next.block_2:
1495 !// call .des_enc ! compares in2 to 8
1496 ! rounds inlined for alignment purposes
1498 add global1, 768, global4 ! address sbox 4 since register used below
1500 rounds_macro(in5, out5, 1, .ncbc.enc.1, in3, in4) ! include encryption ks in3
1502 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1503 bl,pn %icc, .ncbc.enc.next.block_fp
1505 bl .ncbc.enc.next.block_fp
1507 add in0, 8, in0 ! input address
1509 ! If 8 or more bytes are to be encrypted after this block,
1510 ! we combine final permutation for this block with initial
1511 ! permutation for next block. Load next block:
1513 load_little_endian(in0, global3, global4, local5, .LLE12)
1515 ! parameter 1 original left
1516 ! parameter 2 original right
1517 ! parameter 3 left ip
1518 ! parameter 4 right ip
1519 ! parameter 5 1: load ks1/ks2 to in3/in4, add 120 to in4
1522 ! also adds -8 to length in2 and loads loop counter to out4
1524 fp_ip_macro(out0, out1, global3, global4, 2)
1526 store_little_endian(in1, out0, out1, local3, .SLE10) ! block
1528 ld [in3], out0 ! key 7531 first round next block
1530 xor global3, out5, in5 ! iv xor next block
1532 ld [in3+4], out1 ! key 8642
1533 add global1, 512, global3 ! address sbox 3 since register used
1534 xor global4, local1, out5 ! iv xor next block
1536 ba .ncbc.enc.next.block_2
1537 add in1, 8, in1 ! output adress
1539 .ncbc.enc.next.block_fp:
1543 store_little_endian(in1, in5, out5, local3, .SLE1) ! block
1545 addcc in2, -8, in2 ! bytes missing when next block done
1547 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1548 bpos,pt %icc, .ncbc.enc.next.block ! also jumps if 0
1550 bpos .ncbc.enc.next.block
1554 .ncbc.enc.seven.or.less:
1558 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1559 ble,pt %icc, .ncbc.enc.finish
1561 ble .ncbc.enc.finish
1565 add in2, 8, local1 ! bytes to load
1567 ! addr, length, dest left, dest right, temp, temp2, label, ret label
1568 load_n_bytes(in0, local1, global4, out4, local2, local3, .LNB1, .ncbc.enc.next.block_1)
1570 ! Loads 1 to 7 bytes little endian to global4, out4
1576 store_little_endian(local4, in5, out5, local5, .SLE2) ! ivec
1588 LDPTR IVEC, local7 ! ivec
1589 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1590 ble,pn %icc, .ncbc.dec.finish
1592 ble .ncbc.dec.finish
1594 mov in3, in4 ! schedule
1597 mov in0, local5 ! input
1599 load_little_endian(local7, in0, in1, local3, .LLE3) ! ivec
1601 .ncbc.dec.next.block:
1603 load_little_endian(local5, in5, out5, local3, .LLE4) ! block
1605 ! parameter 6 1/2 for include encryption/decryption
1606 ! parameter 7 1 for mov in1 to in3
1607 ! parameter 8 1 for mov in3 to in4
1609 ip_macro(in5, out5, out5, in5, in4, 2, 0, 1) ! include decryprion ks in4
1611 fp_macro(out5, in5, 0, 1) ! 1 for input and output address to local5/7
1613 ! in2 is bytes left to be stored
1614 ! in2 is compared to 8 in the rounds
1616 xor out5, in0, out4 ! iv xor
1617 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1618 bl,pn %icc, .ncbc.dec.seven.or.less
1620 bl .ncbc.dec.seven.or.less
1622 xor in5, in1, global4 ! iv xor
1624 ! Load ivec next block now, since input and output address might be the same.
1626 load_little_endian_inc(local5, in0, in1, local3, .LLE5) ! iv
1628 store_little_endian(local7, out4, global4, local3, .SLE3)
1631 add local7, 8, local7
1634 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1635 bg,pt %icc, .ncbc.dec.next.block
1637 bg .ncbc.dec.next.block
1639 STPTR local7, OUTPUT
1644 LDPTR IVEC, local4 ! ivec
1645 store_little_endian(local4, in0, in1, local5, .SLE4)
1652 .ncbc.dec.seven.or.less:
1654 load_little_endian_inc(local5, in0, in1, local3, .LLE13) ! ivec
1656 store_n_bytes(local7, in2, global4, out4, local3, local4, .SNB1, .ncbc.dec.store.iv)
1659 .DES_ncbc_encrypt.end:
1660 .size DES_ncbc_encrypt, .DES_ncbc_encrypt.end-DES_ncbc_encrypt
1663 ! void DES_ede3_cbc_encrypt(input, output, lenght, ks1, ks2, ks3, ivec, enc)
1664 ! **************************************************************************
1668 .global DES_ede3_cbc_encrypt
1669 .type DES_ede3_cbc_encrypt,#function
1671 DES_ede3_cbc_encrypt:
1673 save %sp, FRAME, %sp
1675 define({KS1}, { [%sp+BIAS+ARG0+3*ARGSZ] })
1676 define({KS2}, { [%sp+BIAS+ARG0+4*ARGSZ] })
1677 define({KS3}, { [%sp+BIAS+ARG0+5*ARGSZ] })
1680 mov .PIC.me.up-(.-4),out0
1682 LDPTR [%fp+BIAS+ARG0+7*ARGSZ], local3 ! enc
1683 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1686 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1687 be,pn %icc, .ede3.dec
1695 load_little_endian(local4, in5, out5, local3, .LLE6) ! ivec
1697 addcc in2, -8, in2 ! bytes missing after next block
1699 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1700 bl,pn %icc, .ede3.enc.seven.or.less
1702 bl .ede3.enc.seven.or.less
1706 .ede3.enc.next.block:
1708 load_little_endian(in0, out4, global4, local3, .LLE7)
1710 .ede3.enc.next.block_1:
1713 xor in5, out4, in5 ! iv xor
1714 xor out5, global4, out5 ! iv xor
1717 add in4, 120, in4 ! for decryption we use last subkey first
1720 ip_macro(in5, out5, in5, out5, in3)
1722 .ede3.enc.next.block_2:
1724 call .des_enc ! ks1 in3
1727 call .des_dec ! ks2 in4
1730 call .des_enc ! ks3 in3 compares in2 to 8
1733 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1734 bl,pn %icc, .ede3.enc.next.block_fp
1736 bl .ede3.enc.next.block_fp
1740 ! If 8 or more bytes are to be encrypted after this block,
1741 ! we combine final permutation for this block with initial
1742 ! permutation for next block. Load next block:
1744 load_little_endian(in0, global3, global4, local5, .LLE11)
1746 ! parameter 1 original left
1747 ! parameter 2 original right
1748 ! parameter 3 left ip
1749 ! parameter 4 right ip
1750 ! parameter 5 1: load ks1/ks2 to in3/in4, add 120 to in4
1753 ! also adds -8 to length in2 and loads loop counter to out4
1755 fp_ip_macro(out0, out1, global3, global4, 1)
1757 store_little_endian(in1, out0, out1, local3, .SLE9) ! block
1760 xor global3, out5, in5 ! iv xor next block
1762 ld [in3], out0 ! key 7531
1763 add global1, 512, global3 ! address sbox 3
1764 xor global4, local1, out5 ! iv xor next block
1766 ld [in3+4], out1 ! key 8642
1767 add global1, 768, global4 ! address sbox 4
1768 ba .ede3.enc.next.block_2
1771 .ede3.enc.next.block_fp:
1775 store_little_endian(in1, in5, out5, local3, .SLE5) ! block
1777 addcc in2, -8, in2 ! bytes missing when next block done
1779 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1780 bpos,pt %icc, .ede3.enc.next.block
1782 bpos .ede3.enc.next.block
1786 .ede3.enc.seven.or.less:
1790 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1791 ble,pt %icc, .ede3.enc.finish
1793 ble .ede3.enc.finish
1797 add in2, 8, local1 ! bytes to load
1799 ! addr, length, dest left, dest right, temp, temp2, label, ret label
1800 load_n_bytes(in0, local1, global4, out4, local2, local3, .LNB2, .ede3.enc.next.block_1)
1804 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1805 store_little_endian(local4, in5, out5, local5, .SLE6) ! ivec
1822 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1823 ble %icc, .ede3.dec.finish
1825 ble .ede3.dec.finish
1829 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local7 ! iv
1830 load_little_endian(local7, in0, in1, local3, .LLE8)
1832 .ede3.dec.next.block:
1834 load_little_endian(local5, in5, out5, local3, .LLE9)
1836 ! parameter 6 1/2 for include encryption/decryption
1837 ! parameter 7 1 for mov in1 to in3
1838 ! parameter 8 1 for mov in3 to in4
1839 ! parameter 9 1 for load ks3 and ks2 to in4 and in3
1841 ip_macro(in5, out5, out5, in5, in4, 2, 0, 0, 1) ! inc .des_dec ks3 in4
1843 call .des_enc ! ks2 in3
1846 call .des_dec ! ks1 in4
1849 fp_macro(out5, in5, 0, 1) ! 1 for input and output address local5/7
1851 ! in2 is bytes left to be stored
1852 ! in2 is compared to 8 in the rounds
1855 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1856 bl,pn %icc, .ede3.dec.seven.or.less
1858 bl .ede3.dec.seven.or.less
1860 xor in5, in1, global4
1862 load_little_endian_inc(local5, in0, in1, local3, .LLE10) ! iv next block
1864 store_little_endian(local7, out4, global4, local3, .SLE7) ! block
1868 add local7, 8, local7
1870 #ifdef OPENSSL_SYSNAME_ULTRASPARC
1871 bg,pt %icc, .ede3.dec.next.block
1873 bg .ede3.dec.next.block
1875 STPTR local7, OUTPUT
1879 LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
1880 store_little_endian(local4, in0, in1, local5, .SLE8) ! ivec
1887 .ede3.dec.seven.or.less:
1889 load_little_endian_inc(local5, in0, in1, local3, .LLE14) ! iv
1891 store_n_bytes(local7, in2, global4, out4, local3, local4, .SNB2, .ede3.dec.store.iv)
1894 .DES_ede3_cbc_encrypt.end:
1895 .size DES_ede3_cbc_encrypt,.DES_ede3_cbc_encrypt.end-DES_ede3_cbc_encrypt
1898 .type .des_and,#object
1903 ! This table is used for AND 0xFC when it is known that register
1904 ! bits 8-31 are zero. Makes it possible to do three arithmetic
1905 ! operations in one cycle.
1907 .byte 0, 0, 0, 0, 4, 4, 4, 4
1908 .byte 8, 8, 8, 8, 12, 12, 12, 12
1909 .byte 16, 16, 16, 16, 20, 20, 20, 20
1910 .byte 24, 24, 24, 24, 28, 28, 28, 28
1911 .byte 32, 32, 32, 32, 36, 36, 36, 36
1912 .byte 40, 40, 40, 40, 44, 44, 44, 44
1913 .byte 48, 48, 48, 48, 52, 52, 52, 52
1914 .byte 56, 56, 56, 56, 60, 60, 60, 60
1915 .byte 64, 64, 64, 64, 68, 68, 68, 68
1916 .byte 72, 72, 72, 72, 76, 76, 76, 76
1917 .byte 80, 80, 80, 80, 84, 84, 84, 84
1918 .byte 88, 88, 88, 88, 92, 92, 92, 92
1919 .byte 96, 96, 96, 96, 100, 100, 100, 100
1920 .byte 104, 104, 104, 104, 108, 108, 108, 108
1921 .byte 112, 112, 112, 112, 116, 116, 116, 116
1922 .byte 120, 120, 120, 120, 124, 124, 124, 124
1923 .byte 128, 128, 128, 128, 132, 132, 132, 132
1924 .byte 136, 136, 136, 136, 140, 140, 140, 140
1925 .byte 144, 144, 144, 144, 148, 148, 148, 148
1926 .byte 152, 152, 152, 152, 156, 156, 156, 156
1927 .byte 160, 160, 160, 160, 164, 164, 164, 164
1928 .byte 168, 168, 168, 168, 172, 172, 172, 172
1929 .byte 176, 176, 176, 176, 180, 180, 180, 180
1930 .byte 184, 184, 184, 184, 188, 188, 188, 188
1931 .byte 192, 192, 192, 192, 196, 196, 196, 196
1932 .byte 200, 200, 200, 200, 204, 204, 204, 204
1933 .byte 208, 208, 208, 208, 212, 212, 212, 212
1934 .byte 216, 216, 216, 216, 220, 220, 220, 220
1935 .byte 224, 224, 224, 224, 228, 228, 228, 228
1936 .byte 232, 232, 232, 232, 236, 236, 236, 236
1937 .byte 240, 240, 240, 240, 244, 244, 244, 244
1938 .byte 248, 248, 248, 248, 252, 252, 252, 252
1940 ! 5 numbers for initil/final permutation
1942 .word 0x0f0f0f0f ! offset 256
1943 .word 0x0000ffff ! 260
1944 .word 0x33333333 ! 264
1945 .word 0x00ff00ff ! 268
1946 .word 0x55555555 ! 272
1950 .word 0x0000FC00 ! 284
1953 .type DES_SPtrans,#object
1954 .size DES_SPtrans,2048
1959 .word 0x02080800, 0x00080000, 0x02000002, 0x02080802
1960 .word 0x02000000, 0x00080802, 0x00080002, 0x02000002
1961 .word 0x00080802, 0x02080800, 0x02080000, 0x00000802
1962 .word 0x02000802, 0x02000000, 0x00000000, 0x00080002
1963 .word 0x00080000, 0x00000002, 0x02000800, 0x00080800
1964 .word 0x02080802, 0x02080000, 0x00000802, 0x02000800
1965 .word 0x00000002, 0x00000800, 0x00080800, 0x02080002
1966 .word 0x00000800, 0x02000802, 0x02080002, 0x00000000
1967 .word 0x00000000, 0x02080802, 0x02000800, 0x00080002
1968 .word 0x02080800, 0x00080000, 0x00000802, 0x02000800
1969 .word 0x02080002, 0x00000800, 0x00080800, 0x02000002
1970 .word 0x00080802, 0x00000002, 0x02000002, 0x02080000
1971 .word 0x02080802, 0x00080800, 0x02080000, 0x02000802
1972 .word 0x02000000, 0x00000802, 0x00080002, 0x00000000
1973 .word 0x00080000, 0x02000000, 0x02000802, 0x02080800
1974 .word 0x00000002, 0x02080002, 0x00000800, 0x00080802
1976 .word 0x40108010, 0x00000000, 0x00108000, 0x40100000
1977 .word 0x40000010, 0x00008010, 0x40008000, 0x00108000
1978 .word 0x00008000, 0x40100010, 0x00000010, 0x40008000
1979 .word 0x00100010, 0x40108000, 0x40100000, 0x00000010
1980 .word 0x00100000, 0x40008010, 0x40100010, 0x00008000
1981 .word 0x00108010, 0x40000000, 0x00000000, 0x00100010
1982 .word 0x40008010, 0x00108010, 0x40108000, 0x40000010
1983 .word 0x40000000, 0x00100000, 0x00008010, 0x40108010
1984 .word 0x00100010, 0x40108000, 0x40008000, 0x00108010
1985 .word 0x40108010, 0x00100010, 0x40000010, 0x00000000
1986 .word 0x40000000, 0x00008010, 0x00100000, 0x40100010
1987 .word 0x00008000, 0x40000000, 0x00108010, 0x40008010
1988 .word 0x40108000, 0x00008000, 0x00000000, 0x40000010
1989 .word 0x00000010, 0x40108010, 0x00108000, 0x40100000
1990 .word 0x40100010, 0x00100000, 0x00008010, 0x40008000
1991 .word 0x40008010, 0x00000010, 0x40100000, 0x00108000
1993 .word 0x04000001, 0x04040100, 0x00000100, 0x04000101
1994 .word 0x00040001, 0x04000000, 0x04000101, 0x00040100
1995 .word 0x04000100, 0x00040000, 0x04040000, 0x00000001
1996 .word 0x04040101, 0x00000101, 0x00000001, 0x04040001
1997 .word 0x00000000, 0x00040001, 0x04040100, 0x00000100
1998 .word 0x00000101, 0x04040101, 0x00040000, 0x04000001
1999 .word 0x04040001, 0x04000100, 0x00040101, 0x04040000
2000 .word 0x00040100, 0x00000000, 0x04000000, 0x00040101
2001 .word 0x04040100, 0x00000100, 0x00000001, 0x00040000
2002 .word 0x00000101, 0x00040001, 0x04040000, 0x04000101
2003 .word 0x00000000, 0x04040100, 0x00040100, 0x04040001
2004 .word 0x00040001, 0x04000000, 0x04040101, 0x00000001
2005 .word 0x00040101, 0x04000001, 0x04000000, 0x04040101
2006 .word 0x00040000, 0x04000100, 0x04000101, 0x00040100
2007 .word 0x04000100, 0x00000000, 0x04040001, 0x00000101
2008 .word 0x04000001, 0x00040101, 0x00000100, 0x04040000
2010 .word 0x00401008, 0x10001000, 0x00000008, 0x10401008
2011 .word 0x00000000, 0x10400000, 0x10001008, 0x00400008
2012 .word 0x10401000, 0x10000008, 0x10000000, 0x00001008
2013 .word 0x10000008, 0x00401008, 0x00400000, 0x10000000
2014 .word 0x10400008, 0x00401000, 0x00001000, 0x00000008
2015 .word 0x00401000, 0x10001008, 0x10400000, 0x00001000
2016 .word 0x00001008, 0x00000000, 0x00400008, 0x10401000
2017 .word 0x10001000, 0x10400008, 0x10401008, 0x00400000
2018 .word 0x10400008, 0x00001008, 0x00400000, 0x10000008
2019 .word 0x00401000, 0x10001000, 0x00000008, 0x10400000
2020 .word 0x10001008, 0x00000000, 0x00001000, 0x00400008
2021 .word 0x00000000, 0x10400008, 0x10401000, 0x00001000
2022 .word 0x10000000, 0x10401008, 0x00401008, 0x00400000
2023 .word 0x10401008, 0x00000008, 0x10001000, 0x00401008
2024 .word 0x00400008, 0x00401000, 0x10400000, 0x10001008
2025 .word 0x00001008, 0x10000000, 0x10000008, 0x10401000
2027 .word 0x08000000, 0x00010000, 0x00000400, 0x08010420
2028 .word 0x08010020, 0x08000400, 0x00010420, 0x08010000
2029 .word 0x00010000, 0x00000020, 0x08000020, 0x00010400
2030 .word 0x08000420, 0x08010020, 0x08010400, 0x00000000
2031 .word 0x00010400, 0x08000000, 0x00010020, 0x00000420
2032 .word 0x08000400, 0x00010420, 0x00000000, 0x08000020
2033 .word 0x00000020, 0x08000420, 0x08010420, 0x00010020
2034 .word 0x08010000, 0x00000400, 0x00000420, 0x08010400
2035 .word 0x08010400, 0x08000420, 0x00010020, 0x08010000
2036 .word 0x00010000, 0x00000020, 0x08000020, 0x08000400
2037 .word 0x08000000, 0x00010400, 0x08010420, 0x00000000
2038 .word 0x00010420, 0x08000000, 0x00000400, 0x00010020
2039 .word 0x08000420, 0x00000400, 0x00000000, 0x08010420
2040 .word 0x08010020, 0x08010400, 0x00000420, 0x00010000
2041 .word 0x00010400, 0x08010020, 0x08000400, 0x00000420
2042 .word 0x00000020, 0x00010420, 0x08010000, 0x08000020
2044 .word 0x80000040, 0x00200040, 0x00000000, 0x80202000
2045 .word 0x00200040, 0x00002000, 0x80002040, 0x00200000
2046 .word 0x00002040, 0x80202040, 0x00202000, 0x80000000
2047 .word 0x80002000, 0x80000040, 0x80200000, 0x00202040
2048 .word 0x00200000, 0x80002040, 0x80200040, 0x00000000
2049 .word 0x00002000, 0x00000040, 0x80202000, 0x80200040
2050 .word 0x80202040, 0x80200000, 0x80000000, 0x00002040
2051 .word 0x00000040, 0x00202000, 0x00202040, 0x80002000
2052 .word 0x00002040, 0x80000000, 0x80002000, 0x00202040
2053 .word 0x80202000, 0x00200040, 0x00000000, 0x80002000
2054 .word 0x80000000, 0x00002000, 0x80200040, 0x00200000
2055 .word 0x00200040, 0x80202040, 0x00202000, 0x00000040
2056 .word 0x80202040, 0x00202000, 0x00200000, 0x80002040
2057 .word 0x80000040, 0x80200000, 0x00202040, 0x00000000
2058 .word 0x00002000, 0x80000040, 0x80002040, 0x80202000
2059 .word 0x80200000, 0x00002040, 0x00000040, 0x80200040
2061 .word 0x00004000, 0x00000200, 0x01000200, 0x01000004
2062 .word 0x01004204, 0x00004004, 0x00004200, 0x00000000
2063 .word 0x01000000, 0x01000204, 0x00000204, 0x01004000
2064 .word 0x00000004, 0x01004200, 0x01004000, 0x00000204
2065 .word 0x01000204, 0x00004000, 0x00004004, 0x01004204
2066 .word 0x00000000, 0x01000200, 0x01000004, 0x00004200
2067 .word 0x01004004, 0x00004204, 0x01004200, 0x00000004
2068 .word 0x00004204, 0x01004004, 0x00000200, 0x01000000
2069 .word 0x00004204, 0x01004000, 0x01004004, 0x00000204
2070 .word 0x00004000, 0x00000200, 0x01000000, 0x01004004
2071 .word 0x01000204, 0x00004204, 0x00004200, 0x00000000
2072 .word 0x00000200, 0x01000004, 0x00000004, 0x01000200
2073 .word 0x00000000, 0x01000204, 0x01000200, 0x00004200
2074 .word 0x00000204, 0x00004000, 0x01004204, 0x01000000
2075 .word 0x01004200, 0x00000004, 0x00004004, 0x01004204
2076 .word 0x01000004, 0x01004200, 0x01004000, 0x00004004
2078 .word 0x20800080, 0x20820000, 0x00020080, 0x00000000
2079 .word 0x20020000, 0x00800080, 0x20800000, 0x20820080
2080 .word 0x00000080, 0x20000000, 0x00820000, 0x00020080
2081 .word 0x00820080, 0x20020080, 0x20000080, 0x20800000
2082 .word 0x00020000, 0x00820080, 0x00800080, 0x20020000
2083 .word 0x20820080, 0x20000080, 0x00000000, 0x00820000
2084 .word 0x20000000, 0x00800000, 0x20020080, 0x20800080
2085 .word 0x00800000, 0x00020000, 0x20820000, 0x00000080
2086 .word 0x00800000, 0x00020000, 0x20000080, 0x20820080
2087 .word 0x00020080, 0x20000000, 0x00000000, 0x00820000
2088 .word 0x20800080, 0x20020080, 0x20020000, 0x00800080
2089 .word 0x20820000, 0x00000080, 0x00800080, 0x20020000
2090 .word 0x20820080, 0x00800000, 0x20800000, 0x20000080
2091 .word 0x00820000, 0x00020080, 0x20020080, 0x20800000
2092 .word 0x00000080, 0x20820000, 0x00820080, 0x00000000
2093 .word 0x20000000, 0x20800080, 0x00020000, 0x00820080