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