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