1; 1 "crypto/bn/gf2m-masm-x86_64.S.tmp" 2; 1 "<built-in>" 1 3; 1 "<built-in>" 3 4; 340 "<built-in>" 3 5; 1 "<command line>" 1 6; 1 "<built-in>" 2 7; 1 "crypto/bn/gf2m-masm-x86_64.S.tmp" 2 8OPTION DOTNAME 9 10; 1 "./crypto/x86_arch.h" 1 11 12 13; 16 "./crypto/x86_arch.h" 14 15 16 17 18 19 20 21 22 23; 40 "./crypto/x86_arch.h" 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69; 3 "crypto/bn/gf2m-masm-x86_64.S.tmp" 2 70.text$ SEGMENT ALIGN(64) 'CODE' 71 72 73ALIGN 16 74_mul_1x1 PROC PRIVATE 75 sub rsp,128+8 76 mov r9,-1 77 lea rsi,QWORD PTR[rax*1+rax] 78 shr r9,3 79 lea rdi,QWORD PTR[rax*4] 80 and r9,rax 81 lea r12,QWORD PTR[rax*8] 82 sar rax,63 83 lea r10,QWORD PTR[r9*1+r9] 84 sar rsi,63 85 lea r11,QWORD PTR[r9*4] 86 and rax,rbp 87 sar rdi,63 88 mov rdx,rax 89 shl rax,63 90 and rsi,rbp 91 shr rdx,1 92 mov rcx,rsi 93 shl rsi,62 94 and rdi,rbp 95 shr rcx,2 96 xor rax,rsi 97 mov rbx,rdi 98 shl rdi,61 99 xor rdx,rcx 100 shr rbx,3 101 xor rax,rdi 102 xor rdx,rbx 103 104 mov r13,r9 105 mov QWORD PTR[rsp],0 106 xor r13,r10 107 mov QWORD PTR[8+rsp],r9 108 mov r14,r11 109 mov QWORD PTR[16+rsp],r10 110 xor r14,r12 111 mov QWORD PTR[24+rsp],r13 112 113 xor r9,r11 114 mov QWORD PTR[32+rsp],r11 115 xor r10,r11 116 mov QWORD PTR[40+rsp],r9 117 xor r13,r11 118 mov QWORD PTR[48+rsp],r10 119 xor r9,r14 120 mov QWORD PTR[56+rsp],r13 121 xor r10,r14 122 123 mov QWORD PTR[64+rsp],r12 124 xor r13,r14 125 mov QWORD PTR[72+rsp],r9 126 xor r9,r11 127 mov QWORD PTR[80+rsp],r10 128 xor r10,r11 129 mov QWORD PTR[88+rsp],r13 130 131 xor r13,r11 132 mov QWORD PTR[96+rsp],r14 133 mov rsi,r8 134 mov QWORD PTR[104+rsp],r9 135 and rsi,rbp 136 mov QWORD PTR[112+rsp],r10 137 shr rbp,4 138 mov QWORD PTR[120+rsp],r13 139 mov rdi,r8 140 and rdi,rbp 141 shr rbp,4 142 143 movq xmm0,QWORD PTR[rsi*8+rsp] 144 mov rsi,r8 145 and rsi,rbp 146 shr rbp,4 147 mov rcx,QWORD PTR[rdi*8+rsp] 148 mov rdi,r8 149 mov rbx,rcx 150 shl rcx,4 151 and rdi,rbp 152 movq xmm1,QWORD PTR[rsi*8+rsp] 153 shr rbx,60 154 xor rax,rcx 155 pslldq xmm1,1 156 mov rsi,r8 157 shr rbp,4 158 xor rdx,rbx 159 and rsi,rbp 160 shr rbp,4 161 pxor xmm0,xmm1 162 mov rcx,QWORD PTR[rdi*8+rsp] 163 mov rdi,r8 164 mov rbx,rcx 165 shl rcx,12 166 and rdi,rbp 167 movq xmm1,QWORD PTR[rsi*8+rsp] 168 shr rbx,52 169 xor rax,rcx 170 pslldq xmm1,2 171 mov rsi,r8 172 shr rbp,4 173 xor rdx,rbx 174 and rsi,rbp 175 shr rbp,4 176 pxor xmm0,xmm1 177 mov rcx,QWORD PTR[rdi*8+rsp] 178 mov rdi,r8 179 mov rbx,rcx 180 shl rcx,20 181 and rdi,rbp 182 movq xmm1,QWORD PTR[rsi*8+rsp] 183 shr rbx,44 184 xor rax,rcx 185 pslldq xmm1,3 186 mov rsi,r8 187 shr rbp,4 188 xor rdx,rbx 189 and rsi,rbp 190 shr rbp,4 191 pxor xmm0,xmm1 192 mov rcx,QWORD PTR[rdi*8+rsp] 193 mov rdi,r8 194 mov rbx,rcx 195 shl rcx,28 196 and rdi,rbp 197 movq xmm1,QWORD PTR[rsi*8+rsp] 198 shr rbx,36 199 xor rax,rcx 200 pslldq xmm1,4 201 mov rsi,r8 202 shr rbp,4 203 xor rdx,rbx 204 and rsi,rbp 205 shr rbp,4 206 pxor xmm0,xmm1 207 mov rcx,QWORD PTR[rdi*8+rsp] 208 mov rdi,r8 209 mov rbx,rcx 210 shl rcx,36 211 and rdi,rbp 212 movq xmm1,QWORD PTR[rsi*8+rsp] 213 shr rbx,28 214 xor rax,rcx 215 pslldq xmm1,5 216 mov rsi,r8 217 shr rbp,4 218 xor rdx,rbx 219 and rsi,rbp 220 shr rbp,4 221 pxor xmm0,xmm1 222 mov rcx,QWORD PTR[rdi*8+rsp] 223 mov rdi,r8 224 mov rbx,rcx 225 shl rcx,44 226 and rdi,rbp 227 movq xmm1,QWORD PTR[rsi*8+rsp] 228 shr rbx,20 229 xor rax,rcx 230 pslldq xmm1,6 231 mov rsi,r8 232 shr rbp,4 233 xor rdx,rbx 234 and rsi,rbp 235 shr rbp,4 236 pxor xmm0,xmm1 237 mov rcx,QWORD PTR[rdi*8+rsp] 238 mov rdi,r8 239 mov rbx,rcx 240 shl rcx,52 241 and rdi,rbp 242 movq xmm1,QWORD PTR[rsi*8+rsp] 243 shr rbx,12 244 xor rax,rcx 245 pslldq xmm1,7 246 mov rsi,r8 247 shr rbp,4 248 xor rdx,rbx 249 and rsi,rbp 250 shr rbp,4 251 pxor xmm0,xmm1 252 mov rcx,QWORD PTR[rdi*8+rsp] 253 mov rbx,rcx 254 shl rcx,60 255 movd rsi,xmm0 256 shr rbx,4 257 xor rax,rcx 258 psrldq xmm0,8 259 xor rdx,rbx 260 movd rdi,xmm0 261 xor rax,rsi 262 xor rdx,rdi 263 264 add rsp,128+8 265 DB 0F3h,0C3h ;repret 266$L$end_mul_1x1:: 267_mul_1x1 ENDP 268EXTERN OPENSSL_ia32cap_P:NEAR 269 270PUBLIC bn_GF2m_mul_2x2 271 272ALIGN 16 273bn_GF2m_mul_2x2 PROC PUBLIC 274 mov eax,DWORD PTR[((OPENSSL_ia32cap_P+4))] 275 bt eax,1 276 jnc $L$vanilla_mul_2x2 277 278 movd xmm0,rdx 279 movd xmm1,r9 280 movd xmm2,r8 281 movq xmm3,QWORD PTR[40+rsp] 282 movdqa xmm4,xmm0 283 movdqa xmm5,xmm1 284DB 102,15,58,68,193,0 285 pxor xmm4,xmm2 286 pxor xmm5,xmm3 287DB 102,15,58,68,211,0 288DB 102,15,58,68,229,0 289 xorps xmm4,xmm0 290 xorps xmm4,xmm2 291 movdqa xmm5,xmm4 292 pslldq xmm4,8 293 psrldq xmm5,8 294 pxor xmm2,xmm4 295 pxor xmm0,xmm5 296 movdqu XMMWORD PTR[rcx],xmm2 297 movdqu XMMWORD PTR[16+rcx],xmm0 298 DB 0F3h,0C3h ;repret 299 300ALIGN 16 301$L$vanilla_mul_2x2:: 302 lea rsp,QWORD PTR[((-136))+rsp] 303 mov r10,QWORD PTR[176+rsp] 304 mov QWORD PTR[120+rsp],rdi 305 mov QWORD PTR[128+rsp],rsi 306 mov QWORD PTR[80+rsp],r14 307 mov QWORD PTR[88+rsp],r13 308 mov QWORD PTR[96+rsp],r12 309 mov QWORD PTR[104+rsp],rbp 310 mov QWORD PTR[112+rsp],rbx 311$L$body_mul_2x2:: 312 mov QWORD PTR[32+rsp],rcx 313 mov QWORD PTR[40+rsp],rdx 314 mov QWORD PTR[48+rsp],r8 315 mov QWORD PTR[56+rsp],r9 316 mov QWORD PTR[64+rsp],r10 317 318 mov r8,0fh 319 mov rax,rdx 320 mov rbp,r9 321 call _mul_1x1 322 mov QWORD PTR[16+rsp],rax 323 mov QWORD PTR[24+rsp],rdx 324 325 mov rax,QWORD PTR[48+rsp] 326 mov rbp,QWORD PTR[64+rsp] 327 call _mul_1x1 328 mov QWORD PTR[rsp],rax 329 mov QWORD PTR[8+rsp],rdx 330 331 mov rax,QWORD PTR[40+rsp] 332 mov rbp,QWORD PTR[56+rsp] 333 xor rax,QWORD PTR[48+rsp] 334 xor rbp,QWORD PTR[64+rsp] 335 call _mul_1x1 336 mov rbx,QWORD PTR[rsp] 337 mov rcx,QWORD PTR[8+rsp] 338 mov rdi,QWORD PTR[16+rsp] 339 mov rsi,QWORD PTR[24+rsp] 340 mov rbp,QWORD PTR[32+rsp] 341 342 xor rax,rdx 343 xor rdx,rcx 344 xor rax,rbx 345 mov QWORD PTR[rbp],rbx 346 xor rdx,rdi 347 mov QWORD PTR[24+rbp],rsi 348 xor rax,rsi 349 xor rdx,rsi 350 xor rax,rdx 351 mov QWORD PTR[16+rbp],rdx 352 mov QWORD PTR[8+rbp],rax 353 354 mov r14,QWORD PTR[80+rsp] 355 mov r13,QWORD PTR[88+rsp] 356 mov r12,QWORD PTR[96+rsp] 357 mov rbp,QWORD PTR[104+rsp] 358 mov rbx,QWORD PTR[112+rsp] 359 mov rdi,QWORD PTR[120+rsp] 360 mov rsi,QWORD PTR[128+rsp] 361 lea rsp,QWORD PTR[136+rsp] 362 DB 0F3h,0C3h ;repret 363$L$end_mul_2x2:: 364bn_GF2m_mul_2x2 ENDP 365DB 71,70,40,50,94,109,41,32,77,117,108,116,105,112,108,105 366DB 99,97,116,105,111,110,32,102,111,114,32,120,56,54,95,54 367DB 52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121 368DB 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46 369DB 111,114,103,62,0 370ALIGN 16 371EXTERN __imp_RtlVirtualUnwind:NEAR 372 373 374ALIGN 16 375se_handler PROC PRIVATE 376 push rsi 377 push rdi 378 push rbx 379 push rbp 380 push r12 381 push r13 382 push r14 383 push r15 384 pushfq 385 sub rsp,64 386 387 mov rax,QWORD PTR[152+r8] 388 mov rbx,QWORD PTR[248+r8] 389 390 lea r10,QWORD PTR[$L$body_mul_2x2] 391 cmp rbx,r10 392 jb $L$in_prologue 393 394 mov r14,QWORD PTR[80+rax] 395 mov r13,QWORD PTR[88+rax] 396 mov r12,QWORD PTR[96+rax] 397 mov rbp,QWORD PTR[104+rax] 398 mov rbx,QWORD PTR[112+rax] 399 mov rdi,QWORD PTR[120+rax] 400 mov rsi,QWORD PTR[128+rax] 401 402 mov QWORD PTR[144+r8],rbx 403 mov QWORD PTR[160+r8],rbp 404 mov QWORD PTR[168+r8],rsi 405 mov QWORD PTR[176+r8],rdi 406 mov QWORD PTR[216+r8],r12 407 mov QWORD PTR[224+r8],r13 408 mov QWORD PTR[232+r8],r14 409 410$L$in_prologue:: 411 lea rax,QWORD PTR[136+rax] 412 mov QWORD PTR[152+r8],rax 413 414 mov rdi,QWORD PTR[40+r9] 415 mov rsi,r8 416 mov ecx,154 417 DD 0a548f3fch 418 419 mov rsi,r9 420 xor rcx,rcx 421 mov rdx,QWORD PTR[8+rsi] 422 mov r8,QWORD PTR[rsi] 423 mov r9,QWORD PTR[16+rsi] 424 mov r10,QWORD PTR[40+rsi] 425 lea r11,QWORD PTR[56+rsi] 426 lea r12,QWORD PTR[24+rsi] 427 mov QWORD PTR[32+rsp],r10 428 mov QWORD PTR[40+rsp],r11 429 mov QWORD PTR[48+rsp],r12 430 mov QWORD PTR[56+rsp],rcx 431 call QWORD PTR[__imp_RtlVirtualUnwind] 432 433 mov eax,1 434 add rsp,64 435 popfq 436 pop r15 437 pop r14 438 pop r13 439 pop r12 440 pop rbp 441 pop rbx 442 pop rdi 443 pop rsi 444 DB 0F3h,0C3h ;repret 445se_handler ENDP 446 447.text$ ENDS 448.pdata SEGMENT READONLY ALIGN(4) 449ALIGN 4 450 DD imagerel _mul_1x1 451 DD imagerel $L$end_mul_1x1 452 DD imagerel $L$SEH_info_1x1 453 454 DD imagerel $L$vanilla_mul_2x2 455 DD imagerel $L$end_mul_2x2 456 DD imagerel $L$SEH_info_2x2 457.pdata ENDS 458.xdata SEGMENT READONLY ALIGN(8) 459ALIGN 8 460$L$SEH_info_1x1:: 461DB 001h,007h,002h,000h 462DB 007h,001h,011h,000h 463$L$SEH_info_2x2:: 464DB 9,0,0,0 465 DD imagerel se_handler 466 467.xdata ENDS 468END 469 470