1; This file is generated from a similarly-named Perl script in the BoringSSL 2; source tree. Do not edit by hand. 3 4%ifidn __OUTPUT_FORMAT__, win64 5default rel 6%define XMMWORD 7%define YMMWORD 8%define ZMMWORD 9 10%ifdef BORINGSSL_PREFIX 11%include "boringssl_prefix_symbols_nasm.inc" 12%endif 13section .text code align=64 14 15 16 17 18 19 20 21global gcm_gmult_ssse3 22ALIGN 16 23gcm_gmult_ssse3: 24 25$L$SEH_begin_gcm_gmult_ssse3_1: 26 sub rsp,40 27$L$SEH_prolog_gcm_gmult_ssse3_2: 28 movdqa XMMWORD[rsp],xmm6 29$L$SEH_prolog_gcm_gmult_ssse3_3: 30 movdqa XMMWORD[16+rsp],xmm10 31$L$SEH_prolog_gcm_gmult_ssse3_4: 32 movdqu xmm0,XMMWORD[rcx] 33 movdqa xmm10,XMMWORD[$L$reverse_bytes] 34 movdqa xmm2,XMMWORD[$L$low4_mask] 35 36 37DB 102,65,15,56,0,194 38 39 40 movdqa xmm1,xmm2 41 pandn xmm1,xmm0 42 psrld xmm1,4 43 pand xmm0,xmm2 44 45 46 47 48 pxor xmm2,xmm2 49 pxor xmm3,xmm3 50 mov rax,5 51$L$oop_row_1: 52 movdqa xmm4,XMMWORD[rdx] 53 lea rdx,[16+rdx] 54 55 56 movdqa xmm6,xmm2 57DB 102,15,58,15,243,1 58 movdqa xmm3,xmm6 59 psrldq xmm2,1 60 61 62 63 64 movdqa xmm5,xmm4 65DB 102,15,56,0,224 66DB 102,15,56,0,233 67 68 69 pxor xmm2,xmm5 70 71 72 73 movdqa xmm5,xmm4 74 psllq xmm5,60 75 movdqa xmm6,xmm5 76 pslldq xmm6,8 77 pxor xmm3,xmm6 78 79 80 psrldq xmm5,8 81 pxor xmm2,xmm5 82 psrlq xmm4,4 83 pxor xmm2,xmm4 84 85 sub rax,1 86 jnz NEAR $L$oop_row_1 87 88 89 90 pxor xmm2,xmm3 91 psrlq xmm3,1 92 pxor xmm2,xmm3 93 psrlq xmm3,1 94 pxor xmm2,xmm3 95 psrlq xmm3,5 96 pxor xmm2,xmm3 97 pxor xmm3,xmm3 98 mov rax,5 99$L$oop_row_2: 100 movdqa xmm4,XMMWORD[rdx] 101 lea rdx,[16+rdx] 102 103 104 movdqa xmm6,xmm2 105DB 102,15,58,15,243,1 106 movdqa xmm3,xmm6 107 psrldq xmm2,1 108 109 110 111 112 movdqa xmm5,xmm4 113DB 102,15,56,0,224 114DB 102,15,56,0,233 115 116 117 pxor xmm2,xmm5 118 119 120 121 movdqa xmm5,xmm4 122 psllq xmm5,60 123 movdqa xmm6,xmm5 124 pslldq xmm6,8 125 pxor xmm3,xmm6 126 127 128 psrldq xmm5,8 129 pxor xmm2,xmm5 130 psrlq xmm4,4 131 pxor xmm2,xmm4 132 133 sub rax,1 134 jnz NEAR $L$oop_row_2 135 136 137 138 pxor xmm2,xmm3 139 psrlq xmm3,1 140 pxor xmm2,xmm3 141 psrlq xmm3,1 142 pxor xmm2,xmm3 143 psrlq xmm3,5 144 pxor xmm2,xmm3 145 pxor xmm3,xmm3 146 mov rax,6 147$L$oop_row_3: 148 movdqa xmm4,XMMWORD[rdx] 149 lea rdx,[16+rdx] 150 151 152 movdqa xmm6,xmm2 153DB 102,15,58,15,243,1 154 movdqa xmm3,xmm6 155 psrldq xmm2,1 156 157 158 159 160 movdqa xmm5,xmm4 161DB 102,15,56,0,224 162DB 102,15,56,0,233 163 164 165 pxor xmm2,xmm5 166 167 168 169 movdqa xmm5,xmm4 170 psllq xmm5,60 171 movdqa xmm6,xmm5 172 pslldq xmm6,8 173 pxor xmm3,xmm6 174 175 176 psrldq xmm5,8 177 pxor xmm2,xmm5 178 psrlq xmm4,4 179 pxor xmm2,xmm4 180 181 sub rax,1 182 jnz NEAR $L$oop_row_3 183 184 185 186 pxor xmm2,xmm3 187 psrlq xmm3,1 188 pxor xmm2,xmm3 189 psrlq xmm3,1 190 pxor xmm2,xmm3 191 psrlq xmm3,5 192 pxor xmm2,xmm3 193 pxor xmm3,xmm3 194 195DB 102,65,15,56,0,210 196 movdqu XMMWORD[rcx],xmm2 197 198 199 pxor xmm0,xmm0 200 pxor xmm1,xmm1 201 pxor xmm2,xmm2 202 pxor xmm3,xmm3 203 pxor xmm4,xmm4 204 pxor xmm5,xmm5 205 pxor xmm6,xmm6 206 movdqa xmm6,XMMWORD[rsp] 207 movdqa xmm10,XMMWORD[16+rsp] 208 add rsp,40 209 DB 0F3h,0C3h ;repret 210 211$L$SEH_end_gcm_gmult_ssse3_5: 212 213 214 215 216 217 218 219global gcm_ghash_ssse3 220ALIGN 16 221gcm_ghash_ssse3: 222 223$L$SEH_begin_gcm_ghash_ssse3_1: 224 sub rsp,56 225$L$SEH_prolog_gcm_ghash_ssse3_2: 226 movdqa XMMWORD[rsp],xmm6 227$L$SEH_prolog_gcm_ghash_ssse3_3: 228 movdqa XMMWORD[16+rsp],xmm10 229$L$SEH_prolog_gcm_ghash_ssse3_4: 230 movdqa XMMWORD[32+rsp],xmm11 231$L$SEH_prolog_gcm_ghash_ssse3_5: 232 movdqu xmm0,XMMWORD[rcx] 233 movdqa xmm10,XMMWORD[$L$reverse_bytes] 234 movdqa xmm11,XMMWORD[$L$low4_mask] 235 236 237 and r9,-16 238 239 240 241DB 102,65,15,56,0,194 242 243 244 pxor xmm3,xmm3 245$L$oop_ghash: 246 247 movdqu xmm1,XMMWORD[r8] 248DB 102,65,15,56,0,202 249 pxor xmm0,xmm1 250 251 252 movdqa xmm1,xmm11 253 pandn xmm1,xmm0 254 psrld xmm1,4 255 pand xmm0,xmm11 256 257 258 259 260 pxor xmm2,xmm2 261 262 mov rax,5 263$L$oop_row_4: 264 movdqa xmm4,XMMWORD[rdx] 265 lea rdx,[16+rdx] 266 267 268 movdqa xmm6,xmm2 269DB 102,15,58,15,243,1 270 movdqa xmm3,xmm6 271 psrldq xmm2,1 272 273 274 275 276 movdqa xmm5,xmm4 277DB 102,15,56,0,224 278DB 102,15,56,0,233 279 280 281 pxor xmm2,xmm5 282 283 284 285 movdqa xmm5,xmm4 286 psllq xmm5,60 287 movdqa xmm6,xmm5 288 pslldq xmm6,8 289 pxor xmm3,xmm6 290 291 292 psrldq xmm5,8 293 pxor xmm2,xmm5 294 psrlq xmm4,4 295 pxor xmm2,xmm4 296 297 sub rax,1 298 jnz NEAR $L$oop_row_4 299 300 301 302 pxor xmm2,xmm3 303 psrlq xmm3,1 304 pxor xmm2,xmm3 305 psrlq xmm3,1 306 pxor xmm2,xmm3 307 psrlq xmm3,5 308 pxor xmm2,xmm3 309 pxor xmm3,xmm3 310 mov rax,5 311$L$oop_row_5: 312 movdqa xmm4,XMMWORD[rdx] 313 lea rdx,[16+rdx] 314 315 316 movdqa xmm6,xmm2 317DB 102,15,58,15,243,1 318 movdqa xmm3,xmm6 319 psrldq xmm2,1 320 321 322 323 324 movdqa xmm5,xmm4 325DB 102,15,56,0,224 326DB 102,15,56,0,233 327 328 329 pxor xmm2,xmm5 330 331 332 333 movdqa xmm5,xmm4 334 psllq xmm5,60 335 movdqa xmm6,xmm5 336 pslldq xmm6,8 337 pxor xmm3,xmm6 338 339 340 psrldq xmm5,8 341 pxor xmm2,xmm5 342 psrlq xmm4,4 343 pxor xmm2,xmm4 344 345 sub rax,1 346 jnz NEAR $L$oop_row_5 347 348 349 350 pxor xmm2,xmm3 351 psrlq xmm3,1 352 pxor xmm2,xmm3 353 psrlq xmm3,1 354 pxor xmm2,xmm3 355 psrlq xmm3,5 356 pxor xmm2,xmm3 357 pxor xmm3,xmm3 358 mov rax,6 359$L$oop_row_6: 360 movdqa xmm4,XMMWORD[rdx] 361 lea rdx,[16+rdx] 362 363 364 movdqa xmm6,xmm2 365DB 102,15,58,15,243,1 366 movdqa xmm3,xmm6 367 psrldq xmm2,1 368 369 370 371 372 movdqa xmm5,xmm4 373DB 102,15,56,0,224 374DB 102,15,56,0,233 375 376 377 pxor xmm2,xmm5 378 379 380 381 movdqa xmm5,xmm4 382 psllq xmm5,60 383 movdqa xmm6,xmm5 384 pslldq xmm6,8 385 pxor xmm3,xmm6 386 387 388 psrldq xmm5,8 389 pxor xmm2,xmm5 390 psrlq xmm4,4 391 pxor xmm2,xmm4 392 393 sub rax,1 394 jnz NEAR $L$oop_row_6 395 396 397 398 pxor xmm2,xmm3 399 psrlq xmm3,1 400 pxor xmm2,xmm3 401 psrlq xmm3,1 402 pxor xmm2,xmm3 403 psrlq xmm3,5 404 pxor xmm2,xmm3 405 pxor xmm3,xmm3 406 movdqa xmm0,xmm2 407 408 409 lea rdx,[((-256))+rdx] 410 411 412 lea r8,[16+r8] 413 sub r9,16 414 jnz NEAR $L$oop_ghash 415 416 417DB 102,65,15,56,0,194 418 movdqu XMMWORD[rcx],xmm0 419 420 421 pxor xmm0,xmm0 422 pxor xmm1,xmm1 423 pxor xmm2,xmm2 424 pxor xmm3,xmm3 425 pxor xmm4,xmm4 426 pxor xmm5,xmm5 427 pxor xmm6,xmm6 428 movdqa xmm6,XMMWORD[rsp] 429 movdqa xmm10,XMMWORD[16+rsp] 430 movdqa xmm11,XMMWORD[32+rsp] 431 add rsp,56 432 DB 0F3h,0C3h ;repret 433 434$L$SEH_end_gcm_ghash_ssse3_6: 435 436 437section .rdata rdata align=8 438ALIGN 16 439 440 441$L$reverse_bytes: 442 DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 443 444$L$low4_mask: 445 DQ 0x0f0f0f0f0f0f0f0f,0x0f0f0f0f0f0f0f0f 446section .text 447 448section .pdata rdata align=4 449ALIGN 4 450 DD $L$SEH_begin_gcm_gmult_ssse3_1 wrt ..imagebase 451 DD $L$SEH_end_gcm_gmult_ssse3_5 wrt ..imagebase 452 DD $L$SEH_info_gcm_gmult_ssse3_0 wrt ..imagebase 453 454 DD $L$SEH_begin_gcm_ghash_ssse3_1 wrt ..imagebase 455 DD $L$SEH_end_gcm_ghash_ssse3_6 wrt ..imagebase 456 DD $L$SEH_info_gcm_ghash_ssse3_0 wrt ..imagebase 457 458 459section .xdata rdata align=8 460ALIGN 4 461$L$SEH_info_gcm_gmult_ssse3_0: 462 DB 1 463 DB $L$SEH_prolog_gcm_gmult_ssse3_4-$L$SEH_begin_gcm_gmult_ssse3_1 464 DB 5 465 DB 0 466 DB $L$SEH_prolog_gcm_gmult_ssse3_4-$L$SEH_begin_gcm_gmult_ssse3_1 467 DB 168 468 DW 1 469 DB $L$SEH_prolog_gcm_gmult_ssse3_3-$L$SEH_begin_gcm_gmult_ssse3_1 470 DB 104 471 DW 0 472 DB $L$SEH_prolog_gcm_gmult_ssse3_2-$L$SEH_begin_gcm_gmult_ssse3_1 473 DB 66 474 475$L$SEH_info_gcm_ghash_ssse3_0: 476 DB 1 477 DB $L$SEH_prolog_gcm_ghash_ssse3_5-$L$SEH_begin_gcm_ghash_ssse3_1 478 DB 7 479 DB 0 480 DB $L$SEH_prolog_gcm_ghash_ssse3_5-$L$SEH_begin_gcm_ghash_ssse3_1 481 DB 184 482 DW 2 483 DB $L$SEH_prolog_gcm_ghash_ssse3_4-$L$SEH_begin_gcm_ghash_ssse3_1 484 DB 168 485 DW 1 486 DB $L$SEH_prolog_gcm_ghash_ssse3_3-$L$SEH_begin_gcm_ghash_ssse3_1 487 DB 104 488 DW 0 489 DB $L$SEH_prolog_gcm_ghash_ssse3_2-$L$SEH_begin_gcm_ghash_ssse3_1 490 DB 98 491%else 492; Work around https://bugzilla.nasm.us/show_bug.cgi?id=3392738 493ret 494%endif 495