1.register %g2,#scratch 2.register %g3,#scratch 3.text 4.align 32 5.globl des_t4_key_expand 6.type des_t4_key_expand,#function 7des_t4_key_expand: 8 andcc %o0, 0x7, %g0 9 .word 0x91b20300 !alignaddr %o0,%g0,%o0 10 bz,pt %icc, 1f 11 ldd [%o0 + 0x00], %f0 12 ldd [%o0 + 0x08], %f2 13 .word 0x81b00902 !faligndata %f0,%f2,%f0 141: .word 0x81b026c0 !des_kexpand %f0,0,%f0, 15 .word 0x85b026c1 !des_kexpand %f0,1,%f2, 16 std %f0, [%o1 + 0x00] 17 .word 0x8db0a6c3 !des_kexpand %f2,3,%f6, 18 std %f2, [%o1 + 0x08] 19 .word 0x89b0a6c2 !des_kexpand %f2,2,%f4, 20 .word 0x95b1a6c3 !des_kexpand %f6,3,%f10, 21 std %f6, [%o1 + 0x18] 22 .word 0x91b1a6c2 !des_kexpand %f6,2,%f8, 23 std %f4, [%o1 + 0x10] 24 .word 0x9db2a6c3 !des_kexpand %f10,3,%f14, 25 std %f10, [%o1 + 0x28] 26 .word 0x99b2a6c2 !des_kexpand %f10,2,%f12, 27 std %f8, [%o1 + 0x20] 28 .word 0xa1b3a6c1 !des_kexpand %f14,1,%f16, 29 std %f14, [%o1 + 0x38] 30 .word 0xa9b426c3 !des_kexpand %f16,3,%f20, 31 std %f12, [%o1 + 0x30] 32 .word 0xa5b426c2 !des_kexpand %f16,2,%f18, 33 std %f16, [%o1 + 0x40] 34 .word 0xb1b526c3 !des_kexpand %f20,3,%f24, 35 std %f20, [%o1 + 0x50] 36 .word 0xadb526c2 !des_kexpand %f20,2,%f22, 37 std %f18, [%o1 + 0x48] 38 .word 0xb9b626c3 !des_kexpand %f24,3,%f28, 39 std %f24, [%o1 + 0x60] 40 .word 0xb5b626c2 !des_kexpand %f24,2,%f26, 41 std %f22, [%o1 + 0x58] 42 .word 0xbdb726c1 !des_kexpand %f28,1,%f30, 43 std %f28, [%o1 + 0x70] 44 std %f26, [%o1 + 0x68] 45 retl 46 std %f30, [%o1 + 0x78] 47.size des_t4_key_expand,.-des_t4_key_expand 48.globl des_t4_cbc_encrypt 49.align 32 50des_t4_cbc_encrypt: 51 cmp %o2, 0 52 be,pn %xcc, .Lcbc_abort 53 srln %o2, 0, %o2 ! needed on v8+, "nop" on v9 54 ld [%o4 + 0], %f0 ! load ivec 55 ld [%o4 + 4], %f1 56 57 and %o0, 7, %g1 58 andn %o0, 7, %o0 59 sll %g1, 3, %g1 60 mov 0xff, %g3 61 prefetch [%o0], 20 62 prefetch [%o0 + 63], 20 63 sub %g0, %g1, %g2 64 and %o1, 7, %g4 65 .word 0x93b24340 !alignaddrl %o1,%g0,%o1 66 srl %g3, %g4, %g3 67 srlx %o2, 3, %o2 68 movrz %g4, 0, %g3 69 prefetch [%o1], 22 70 71 ldd [%o3 + 0x00], %f4 ! load key schedule 72 ldd [%o3 + 0x08], %f6 73 ldd [%o3 + 0x10], %f8 74 ldd [%o3 + 0x18], %f10 75 ldd [%o3 + 0x20], %f12 76 ldd [%o3 + 0x28], %f14 77 ldd [%o3 + 0x30], %f16 78 ldd [%o3 + 0x38], %f18 79 ldd [%o3 + 0x40], %f20 80 ldd [%o3 + 0x48], %f22 81 ldd [%o3 + 0x50], %f24 82 ldd [%o3 + 0x58], %f26 83 ldd [%o3 + 0x60], %f28 84 ldd [%o3 + 0x68], %f30 85 ldd [%o3 + 0x70], %f32 86 ldd [%o3 + 0x78], %f34 87 88.Ldes_cbc_enc_loop: 89 ldx [%o0 + 0], %g4 90 brz,pt %g1, 4f 91 nop 92 93 ldx [%o0 + 8], %g5 94 sllx %g4, %g1, %g4 95 srlx %g5, %g2, %g5 96 or %g5, %g4, %g4 974: 98 .word 0x85b02304 !movxtod %g4,%f2 99 prefetch [%o0 + 8+63], 20 100 add %o0, 8, %o0 101 .word 0x81b08d80 !fxor %f2,%f0,%f0 ! ^= ivec 102 prefetch [%o1 + 63], 22 103 104 .word 0x81b02680 !des_ip %f0,%f0,, 105 .word 0x80c90126 !des_round %f4,%f6,%f0,%f0 106 .word 0x80ca012a !des_round %f8,%f10,%f0,%f0 107 .word 0x80cb012e !des_round %f12,%f14,%f0,%f0 108 .word 0x80cc0132 !des_round %f16,%f18,%f0,%f0 109 .word 0x80cd0136 !des_round %f20,%f22,%f0,%f0 110 .word 0x80ce013a !des_round %f24,%f26,%f0,%f0 111 .word 0x80cf013e !des_round %f28,%f30,%f0,%f0 112 .word 0x80c84123 !des_round %f32,%f34,%f0,%f0 113 .word 0x81b026a0 !des_iip %f0,%f0,, 114 115 brnz,pn %g3, 2f 116 sub %o2, 1, %o2 117 118 std %f0, [%o1 + 0] 119 brnz,pt %o2, .Ldes_cbc_enc_loop 120 add %o1, 8, %o1 121 122 st %f0, [%o4 + 0] ! write out ivec 123 retl 124 st %f1, [%o4 + 4] 125.Lcbc_abort: 126 retl 127 nop 128 129.align 16 1302: ldxa [%o0]0x82, %g4 ! avoid read-after-write hazard 131 ! and ~4x deterioration 132 ! in inp==out case 133 .word 0x85b00900 !faligndata %f0,%f0,%f2 ! handle unaligned output 134 135 stda %f2, [%o1 + %g3]0xc0 ! partial store 136 add %o1, 8, %o1 137 orn %g0, %g3, %g3 138 stda %f2, [%o1 + %g3]0xc0 ! partial store 139 140 brnz,pt %o2, .Ldes_cbc_enc_loop+4 141 orn %g0, %g3, %g3 142 143 st %f0, [%o4 + 0] ! write out ivec 144 retl 145 st %f1, [%o4 + 4] 146.type des_t4_cbc_encrypt,#function 147.size des_t4_cbc_encrypt,.-des_t4_cbc_encrypt 148 149.globl des_t4_cbc_decrypt 150.align 32 151des_t4_cbc_decrypt: 152 cmp %o2, 0 153 be,pn %xcc, .Lcbc_abort 154 srln %o2, 0, %o2 ! needed on v8+, "nop" on v9 155 ld [%o4 + 0], %f2 ! load ivec 156 ld [%o4 + 4], %f3 157 158 and %o0, 7, %g1 159 andn %o0, 7, %o0 160 sll %g1, 3, %g1 161 mov 0xff, %g3 162 prefetch [%o0], 20 163 prefetch [%o0 + 63], 20 164 sub %g0, %g1, %g2 165 and %o1, 7, %g4 166 .word 0x93b24340 !alignaddrl %o1,%g0,%o1 167 srl %g3, %g4, %g3 168 srlx %o2, 3, %o2 169 movrz %g4, 0, %g3 170 prefetch [%o1], 22 171 172 ldd [%o3 + 0x78], %f4 ! load key schedule 173 ldd [%o3 + 0x70], %f6 174 ldd [%o3 + 0x68], %f8 175 ldd [%o3 + 0x60], %f10 176 ldd [%o3 + 0x58], %f12 177 ldd [%o3 + 0x50], %f14 178 ldd [%o3 + 0x48], %f16 179 ldd [%o3 + 0x40], %f18 180 ldd [%o3 + 0x38], %f20 181 ldd [%o3 + 0x30], %f22 182 ldd [%o3 + 0x28], %f24 183 ldd [%o3 + 0x20], %f26 184 ldd [%o3 + 0x18], %f28 185 ldd [%o3 + 0x10], %f30 186 ldd [%o3 + 0x08], %f32 187 ldd [%o3 + 0x00], %f34 188 189.Ldes_cbc_dec_loop: 190 ldx [%o0 + 0], %g4 191 brz,pt %g1, 4f 192 nop 193 194 ldx [%o0 + 8], %g5 195 sllx %g4, %g1, %g4 196 srlx %g5, %g2, %g5 197 or %g5, %g4, %g4 1984: 199 .word 0x81b02304 !movxtod %g4,%f0 200 prefetch [%o0 + 8+63], 20 201 add %o0, 8, %o0 202 prefetch [%o1 + 63], 22 203 204 .word 0x81b02680 !des_ip %f0,%f0,, 205 .word 0x80c90126 !des_round %f4,%f6,%f0,%f0 206 .word 0x80ca012a !des_round %f8,%f10,%f0,%f0 207 .word 0x80cb012e !des_round %f12,%f14,%f0,%f0 208 .word 0x80cc0132 !des_round %f16,%f18,%f0,%f0 209 .word 0x80cd0136 !des_round %f20,%f22,%f0,%f0 210 .word 0x80ce013a !des_round %f24,%f26,%f0,%f0 211 .word 0x80cf013e !des_round %f28,%f30,%f0,%f0 212 .word 0x80c84123 !des_round %f32,%f34,%f0,%f0 213 .word 0x81b026a0 !des_iip %f0,%f0,, 214 215 .word 0x81b08d80 !fxor %f2,%f0,%f0 ! ^= ivec 216 .word 0x85b02304 !movxtod %g4,%f2 217 218 brnz,pn %g3, 2f 219 sub %o2, 1, %o2 220 221 std %f0, [%o1 + 0] 222 brnz,pt %o2, .Ldes_cbc_dec_loop 223 add %o1, 8, %o1 224 225 st %f2, [%o4 + 0] ! write out ivec 226 retl 227 st %f3, [%o4 + 4] 228 229.align 16 2302: ldxa [%o0]0x82, %g4 ! avoid read-after-write hazard 231 ! and ~4x deterioration 232 ! in inp==out case 233 .word 0x81b00900 !faligndata %f0,%f0,%f0 ! handle unaligned output 234 235 stda %f0, [%o1 + %g3]0xc0 ! partial store 236 add %o1, 8, %o1 237 orn %g0, %g3, %g3 238 stda %f0, [%o1 + %g3]0xc0 ! partial store 239 240 brnz,pt %o2, .Ldes_cbc_dec_loop+4 241 orn %g0, %g3, %g3 242 243 st %f2, [%o4 + 0] ! write out ivec 244 retl 245 st %f3, [%o4 + 4] 246.type des_t4_cbc_decrypt,#function 247.size des_t4_cbc_decrypt,.-des_t4_cbc_decrypt 248.globl des_t4_ede3_cbc_encrypt 249.align 32 250des_t4_ede3_cbc_encrypt: 251 cmp %o2, 0 252 be,pn %xcc, .Lcbc_abort 253 srln %o2, 0, %o2 ! needed on v8+, "nop" on v9 254 ld [%o4 + 0], %f0 ! load ivec 255 ld [%o4 + 4], %f1 256 257 and %o0, 7, %g1 258 andn %o0, 7, %o0 259 sll %g1, 3, %g1 260 mov 0xff, %g3 261 prefetch [%o0], 20 262 prefetch [%o0 + 63], 20 263 sub %g0, %g1, %g2 264 and %o1, 7, %g4 265 .word 0x93b24340 !alignaddrl %o1,%g0,%o1 266 srl %g3, %g4, %g3 267 srlx %o2, 3, %o2 268 movrz %g4, 0, %g3 269 prefetch [%o1], 22 270 271 ldd [%o3 + 0x00], %f4 ! load key schedule 272 ldd [%o3 + 0x08], %f6 273 ldd [%o3 + 0x10], %f8 274 ldd [%o3 + 0x18], %f10 275 ldd [%o3 + 0x20], %f12 276 ldd [%o3 + 0x28], %f14 277 ldd [%o3 + 0x30], %f16 278 ldd [%o3 + 0x38], %f18 279 ldd [%o3 + 0x40], %f20 280 ldd [%o3 + 0x48], %f22 281 ldd [%o3 + 0x50], %f24 282 ldd [%o3 + 0x58], %f26 283 ldd [%o3 + 0x60], %f28 284 ldd [%o3 + 0x68], %f30 285 ldd [%o3 + 0x70], %f32 286 ldd [%o3 + 0x78], %f34 287 288.Ldes_ede3_cbc_enc_loop: 289 ldx [%o0 + 0], %g4 290 brz,pt %g1, 4f 291 nop 292 293 ldx [%o0 + 8], %g5 294 sllx %g4, %g1, %g4 295 srlx %g5, %g2, %g5 296 or %g5, %g4, %g4 2974: 298 .word 0x85b02304 !movxtod %g4,%f2 299 prefetch [%o0 + 8+63], 20 300 add %o0, 8, %o0 301 .word 0x81b08d80 !fxor %f2,%f0,%f0 ! ^= ivec 302 prefetch [%o1 + 63], 22 303 304 .word 0x81b02680 !des_ip %f0,%f0,, 305 .word 0x80c90126 !des_round %f4,%f6,%f0,%f0 306 .word 0x80ca012a !des_round %f8,%f10,%f0,%f0 307 .word 0x80cb012e !des_round %f12,%f14,%f0,%f0 308 .word 0x80cc0132 !des_round %f16,%f18,%f0,%f0 309 ldd [%o3 + 0x100-0x08], %f36 310 ldd [%o3 + 0x100-0x10], %f38 311 .word 0x80cd0136 !des_round %f20,%f22,%f0,%f0 312 ldd [%o3 + 0x100-0x18], %f40 313 ldd [%o3 + 0x100-0x20], %f42 314 .word 0x80ce013a !des_round %f24,%f26,%f0,%f0 315 ldd [%o3 + 0x100-0x28], %f44 316 ldd [%o3 + 0x100-0x30], %f46 317 .word 0x80cf013e !des_round %f28,%f30,%f0,%f0 318 ldd [%o3 + 0x100-0x38], %f48 319 ldd [%o3 + 0x100-0x40], %f50 320 .word 0x80c84123 !des_round %f32,%f34,%f0,%f0 321 ldd [%o3 + 0x100-0x48], %f52 322 ldd [%o3 + 0x100-0x50], %f54 323 .word 0x81b026a0 !des_iip %f0,%f0,, 324 325 ldd [%o3 + 0x100-0x58], %f56 326 ldd [%o3 + 0x100-0x60], %f58 327 .word 0x81b02680 !des_ip %f0,%f0,, 328 ldd [%o3 + 0x100-0x68], %f60 329 ldd [%o3 + 0x100-0x70], %f62 330 .word 0x80c94127 !des_round %f36,%f38,%f0,%f0 331 ldd [%o3 + 0x100-0x78], %f36 332 ldd [%o3 + 0x100-0x80], %f38 333 .word 0x80ca412b !des_round %f40,%f42,%f0,%f0 334 .word 0x80cb412f !des_round %f44,%f46,%f0,%f0 335 .word 0x80cc4133 !des_round %f48,%f50,%f0,%f0 336 ldd [%o3 + 0x100+0x00], %f40 337 ldd [%o3 + 0x100+0x08], %f42 338 .word 0x80cd4137 !des_round %f52,%f54,%f0,%f0 339 ldd [%o3 + 0x100+0x10], %f44 340 ldd [%o3 + 0x100+0x18], %f46 341 .word 0x80ce413b !des_round %f56,%f58,%f0,%f0 342 ldd [%o3 + 0x100+0x20], %f48 343 ldd [%o3 + 0x100+0x28], %f50 344 .word 0x80cf413f !des_round %f60,%f62,%f0,%f0 345 ldd [%o3 + 0x100+0x30], %f52 346 ldd [%o3 + 0x100+0x38], %f54 347 .word 0x80c94127 !des_round %f36,%f38,%f0,%f0 348 ldd [%o3 + 0x100+0x40], %f56 349 ldd [%o3 + 0x100+0x48], %f58 350 .word 0x81b026a0 !des_iip %f0,%f0,, 351 352 ldd [%o3 + 0x100+0x50], %f60 353 ldd [%o3 + 0x100+0x58], %f62 354 .word 0x81b02680 !des_ip %f0,%f0,, 355 ldd [%o3 + 0x100+0x60], %f36 356 ldd [%o3 + 0x100+0x68], %f38 357 .word 0x80ca412b !des_round %f40,%f42,%f0,%f0 358 ldd [%o3 + 0x100+0x70], %f40 359 ldd [%o3 + 0x100+0x78], %f42 360 .word 0x80cb412f !des_round %f44,%f46,%f0,%f0 361 .word 0x80cc4133 !des_round %f48,%f50,%f0,%f0 362 .word 0x80cd4137 !des_round %f52,%f54,%f0,%f0 363 .word 0x80ce413b !des_round %f56,%f58,%f0,%f0 364 .word 0x80cf413f !des_round %f60,%f62,%f0,%f0 365 .word 0x80c94127 !des_round %f36,%f38,%f0,%f0 366 .word 0x80ca412b !des_round %f40,%f42,%f0,%f0 367 .word 0x81b026a0 !des_iip %f0,%f0,, 368 369 brnz,pn %g3, 2f 370 sub %o2, 1, %o2 371 372 std %f0, [%o1 + 0] 373 brnz,pt %o2, .Ldes_ede3_cbc_enc_loop 374 add %o1, 8, %o1 375 376 st %f0, [%o4 + 0] ! write out ivec 377 retl 378 st %f1, [%o4 + 4] 379 380.align 16 3812: ldxa [%o0]0x82, %g4 ! avoid read-after-write hazard 382 ! and ~2x deterioration 383 ! in inp==out case 384 .word 0x85b00900 !faligndata %f0,%f0,%f2 ! handle unaligned output 385 386 stda %f2, [%o1 + %g3]0xc0 ! partial store 387 add %o1, 8, %o1 388 orn %g0, %g3, %g3 389 stda %f2, [%o1 + %g3]0xc0 ! partial store 390 391 brnz,pt %o2, .Ldes_ede3_cbc_enc_loop+4 392 orn %g0, %g3, %g3 393 394 st %f0, [%o4 + 0] ! write out ivec 395 retl 396 st %f1, [%o4 + 4] 397.type des_t4_ede3_cbc_encrypt,#function 398.size des_t4_ede3_cbc_encrypt,.-des_t4_ede3_cbc_encrypt 399 400.globl des_t4_ede3_cbc_decrypt 401.align 32 402des_t4_ede3_cbc_decrypt: 403 cmp %o2, 0 404 be,pn %xcc, .Lcbc_abort 405 srln %o2, 0, %o2 ! needed on v8+, "nop" on v9 406 ld [%o4 + 0], %f2 ! load ivec 407 ld [%o4 + 4], %f3 408 409 and %o0, 7, %g1 410 andn %o0, 7, %o0 411 sll %g1, 3, %g1 412 mov 0xff, %g3 413 prefetch [%o0], 20 414 prefetch [%o0 + 63], 20 415 sub %g0, %g1, %g2 416 and %o1, 7, %g4 417 .word 0x93b24340 !alignaddrl %o1,%g0,%o1 418 srl %g3, %g4, %g3 419 srlx %o2, 3, %o2 420 movrz %g4, 0, %g3 421 prefetch [%o1], 22 422 423 ldd [%o3 + 0x100+0x78], %f4 ! load key schedule 424 ldd [%o3 + 0x100+0x70], %f6 425 ldd [%o3 + 0x100+0x68], %f8 426 ldd [%o3 + 0x100+0x60], %f10 427 ldd [%o3 + 0x100+0x58], %f12 428 ldd [%o3 + 0x100+0x50], %f14 429 ldd [%o3 + 0x100+0x48], %f16 430 ldd [%o3 + 0x100+0x40], %f18 431 ldd [%o3 + 0x100+0x38], %f20 432 ldd [%o3 + 0x100+0x30], %f22 433 ldd [%o3 + 0x100+0x28], %f24 434 ldd [%o3 + 0x100+0x20], %f26 435 ldd [%o3 + 0x100+0x18], %f28 436 ldd [%o3 + 0x100+0x10], %f30 437 ldd [%o3 + 0x100+0x08], %f32 438 ldd [%o3 + 0x100+0x00], %f34 439 440.Ldes_ede3_cbc_dec_loop: 441 ldx [%o0 + 0], %g4 442 brz,pt %g1, 4f 443 nop 444 445 ldx [%o0 + 8], %g5 446 sllx %g4, %g1, %g4 447 srlx %g5, %g2, %g5 448 or %g5, %g4, %g4 4494: 450 .word 0x81b02304 !movxtod %g4,%f0 451 prefetch [%o0 + 8+63], 20 452 add %o0, 8, %o0 453 prefetch [%o1 + 63], 22 454 455 .word 0x81b02680 !des_ip %f0,%f0,, 456 .word 0x80c90126 !des_round %f4,%f6,%f0,%f0 457 .word 0x80ca012a !des_round %f8,%f10,%f0,%f0 458 .word 0x80cb012e !des_round %f12,%f14,%f0,%f0 459 .word 0x80cc0132 !des_round %f16,%f18,%f0,%f0 460 ldd [%o3 + 0x80+0x00], %f36 461 ldd [%o3 + 0x80+0x08], %f38 462 .word 0x80cd0136 !des_round %f20,%f22,%f0,%f0 463 ldd [%o3 + 0x80+0x10], %f40 464 ldd [%o3 + 0x80+0x18], %f42 465 .word 0x80ce013a !des_round %f24,%f26,%f0,%f0 466 ldd [%o3 + 0x80+0x20], %f44 467 ldd [%o3 + 0x80+0x28], %f46 468 .word 0x80cf013e !des_round %f28,%f30,%f0,%f0 469 ldd [%o3 + 0x80+0x30], %f48 470 ldd [%o3 + 0x80+0x38], %f50 471 .word 0x80c84123 !des_round %f32,%f34,%f0,%f0 472 ldd [%o3 + 0x80+0x40], %f52 473 ldd [%o3 + 0x80+0x48], %f54 474 .word 0x81b026a0 !des_iip %f0,%f0,, 475 476 ldd [%o3 + 0x80+0x50], %f56 477 ldd [%o3 + 0x80+0x58], %f58 478 .word 0x81b02680 !des_ip %f0,%f0,, 479 ldd [%o3 + 0x80+0x60], %f60 480 ldd [%o3 + 0x80+0x68], %f62 481 .word 0x80c94127 !des_round %f36,%f38,%f0,%f0 482 ldd [%o3 + 0x80+0x70], %f36 483 ldd [%o3 + 0x80+0x78], %f38 484 .word 0x80ca412b !des_round %f40,%f42,%f0,%f0 485 .word 0x80cb412f !des_round %f44,%f46,%f0,%f0 486 .word 0x80cc4133 !des_round %f48,%f50,%f0,%f0 487 ldd [%o3 + 0x80-0x08], %f40 488 ldd [%o3 + 0x80-0x10], %f42 489 .word 0x80cd4137 !des_round %f52,%f54,%f0,%f0 490 ldd [%o3 + 0x80-0x18], %f44 491 ldd [%o3 + 0x80-0x20], %f46 492 .word 0x80ce413b !des_round %f56,%f58,%f0,%f0 493 ldd [%o3 + 0x80-0x28], %f48 494 ldd [%o3 + 0x80-0x30], %f50 495 .word 0x80cf413f !des_round %f60,%f62,%f0,%f0 496 ldd [%o3 + 0x80-0x38], %f52 497 ldd [%o3 + 0x80-0x40], %f54 498 .word 0x80c94127 !des_round %f36,%f38,%f0,%f0 499 ldd [%o3 + 0x80-0x48], %f56 500 ldd [%o3 + 0x80-0x50], %f58 501 .word 0x81b026a0 !des_iip %f0,%f0,, 502 503 ldd [%o3 + 0x80-0x58], %f60 504 ldd [%o3 + 0x80-0x60], %f62 505 .word 0x81b02680 !des_ip %f0,%f0,, 506 ldd [%o3 + 0x80-0x68], %f36 507 ldd [%o3 + 0x80-0x70], %f38 508 .word 0x80ca412b !des_round %f40,%f42,%f0,%f0 509 ldd [%o3 + 0x80-0x78], %f40 510 ldd [%o3 + 0x80-0x80], %f42 511 .word 0x80cb412f !des_round %f44,%f46,%f0,%f0 512 .word 0x80cc4133 !des_round %f48,%f50,%f0,%f0 513 .word 0x80cd4137 !des_round %f52,%f54,%f0,%f0 514 .word 0x80ce413b !des_round %f56,%f58,%f0,%f0 515 .word 0x80cf413f !des_round %f60,%f62,%f0,%f0 516 .word 0x80c94127 !des_round %f36,%f38,%f0,%f0 517 .word 0x80ca412b !des_round %f40,%f42,%f0,%f0 518 .word 0x81b026a0 !des_iip %f0,%f0,, 519 520 .word 0x81b08d80 !fxor %f2,%f0,%f0 ! ^= ivec 521 .word 0x85b02304 !movxtod %g4,%f2 522 523 brnz,pn %g3, 2f 524 sub %o2, 1, %o2 525 526 std %f0, [%o1 + 0] 527 brnz,pt %o2, .Ldes_ede3_cbc_dec_loop 528 add %o1, 8, %o1 529 530 st %f2, [%o4 + 0] ! write out ivec 531 retl 532 st %f3, [%o4 + 4] 533 534.align 16 5352: ldxa [%o0]0x82, %g4 ! avoid read-after-write hazard 536 ! and ~3x deterioration 537 ! in inp==out case 538 .word 0x81b00900 !faligndata %f0,%f0,%f0 ! handle unaligned output 539 540 stda %f0, [%o1 + %g3]0xc0 ! partial store 541 add %o1, 8, %o1 542 orn %g0, %g3, %g3 543 stda %f0, [%o1 + %g3]0xc0 ! partial store 544 545 brnz,pt %o2, .Ldes_ede3_cbc_dec_loop+4 546 orn %g0, %g3, %g3 547 548 st %f2, [%o4 + 0] ! write out ivec 549 retl 550 st %f3, [%o4 + 4] 551.type des_t4_ede3_cbc_decrypt,#function 552.size des_t4_ede3_cbc_decrypt,.-des_t4_ede3_cbc_decrypt 553.asciz "DES for SPARC T4, David S. Miller, Andy Polyakov" 554.align 4 555