Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2015, Google Inc. |
| 2 | * |
| 3 | * Permission to use, copy, modify, and/or distribute this software for any |
| 4 | * purpose with or without fee is hereby granted, provided that the above |
| 5 | * copyright notice and this permission notice appear in all copies. |
| 6 | * |
| 7 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 8 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 9 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
| 10 | * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 11 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION |
| 12 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
| 13 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ |
| 14 | |
| 15 | /* This file is adapted from crypto_scalarmult/curve25519/amd64-51/ in |
| 16 | * SUPERCOP 20141124 (http://bench.cr.yp.to/supercop.html). That code is public |
| 17 | * domain licensed but the standard ISC license is included above to keep |
| 18 | * licensing simple. */ |
| 19 | |
David Benjamin | 4969cc9 | 2016-04-22 15:02:23 -0400 | [diff] [blame] | 20 | #if !defined(OPENSSL_NO_ASM) |
| 21 | #if defined(__x86_64__) |
| 22 | |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 23 | .data |
| 24 | .p2align 4 |
| 25 | |
| 26 | #if defined(__APPLE__) |
| 27 | /* OS X's C ABI prefixes functions with underscore. */ |
| 28 | #define C_ABI(x) _ ## x |
| 29 | #define HIDDEN .private_extern |
| 30 | #else |
| 31 | #define C_ABI(x) x |
| 32 | #define HIDDEN .hidden |
| 33 | #endif |
| 34 | |
| 35 | x25519_x86_64_REDMASK51: .quad 0x0007FFFFFFFFFFFF |
| 36 | x25519_x86_64_121666_213: .quad 996687872 |
| 37 | x25519_x86_64_2P0: .quad 0xFFFFFFFFFFFDA |
| 38 | x25519_x86_64_2P1234: .quad 0xFFFFFFFFFFFFE |
| 39 | x25519_x86_64_4P0: .quad 0x1FFFFFFFFFFFB4 |
| 40 | x25519_x86_64_4P1234: .quad 0x1FFFFFFFFFFFFC |
| 41 | x25519_x86_64_MU0: .quad 0xED9CE5A30A2C131B |
| 42 | x25519_x86_64_MU1: .quad 0x2106215D086329A7 |
| 43 | x25519_x86_64_MU2: .quad 0xFFFFFFFFFFFFFFEB |
| 44 | x25519_x86_64_MU3: .quad 0xFFFFFFFFFFFFFFFF |
| 45 | x25519_x86_64_MU4: .quad 0x000000000000000F |
| 46 | x25519_x86_64_ORDER0: .quad 0x5812631A5CF5D3ED |
| 47 | x25519_x86_64_ORDER1: .quad 0x14DEF9DEA2F79CD6 |
| 48 | x25519_x86_64_ORDER2: .quad 0x0000000000000000 |
| 49 | x25519_x86_64_ORDER3: .quad 0x1000000000000000 |
| 50 | x25519_x86_64_EC2D0: .quad 1859910466990425 |
| 51 | x25519_x86_64_EC2D1: .quad 932731440258426 |
| 52 | x25519_x86_64_EC2D2: .quad 1072319116312658 |
| 53 | x25519_x86_64_EC2D3: .quad 1815898335770999 |
| 54 | x25519_x86_64_EC2D4: .quad 633789495995903 |
| 55 | x25519_x86_64__38: .quad 38 |
| 56 | |
| 57 | .text |
| 58 | .p2align 5 |
| 59 | |
| 60 | .globl C_ABI(x25519_x86_64_freeze) |
| 61 | HIDDEN C_ABI(x25519_x86_64_freeze) |
| 62 | C_ABI(x25519_x86_64_freeze): |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 63 | .cfi_startproc |
| 64 | /* This is a leaf function and uses the redzone for saving registers. */ |
| 65 | movq %r12,-8(%rsp) |
| 66 | .cfi_rel_offset r12, -8 |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 67 | movq 0(%rdi),%rsi |
| 68 | movq 8(%rdi),%rdx |
| 69 | movq 16(%rdi),%rcx |
| 70 | movq 24(%rdi),%r8 |
| 71 | movq 32(%rdi),%r9 |
| 72 | movq x25519_x86_64_REDMASK51(%rip),%rax |
| 73 | mov %rax,%r10 |
| 74 | sub $18,%r10 |
| 75 | mov $3,%r11 |
| 76 | ._reduceloop: |
| 77 | mov %rsi,%r12 |
| 78 | shr $51,%r12 |
| 79 | and %rax,%rsi |
| 80 | add %r12,%rdx |
| 81 | mov %rdx,%r12 |
| 82 | shr $51,%r12 |
| 83 | and %rax,%rdx |
| 84 | add %r12,%rcx |
| 85 | mov %rcx,%r12 |
| 86 | shr $51,%r12 |
| 87 | and %rax,%rcx |
| 88 | add %r12,%r8 |
| 89 | mov %r8,%r12 |
| 90 | shr $51,%r12 |
| 91 | and %rax,%r8 |
| 92 | add %r12,%r9 |
| 93 | mov %r9,%r12 |
| 94 | shr $51,%r12 |
| 95 | and %rax,%r9 |
| 96 | imulq $19,%r12,%r12 |
| 97 | add %r12,%rsi |
| 98 | sub $1,%r11 |
| 99 | ja ._reduceloop |
| 100 | mov $1,%r12 |
| 101 | cmp %r10,%rsi |
| 102 | cmovl %r11,%r12 |
| 103 | cmp %rax,%rdx |
| 104 | cmovne %r11,%r12 |
| 105 | cmp %rax,%rcx |
| 106 | cmovne %r11,%r12 |
| 107 | cmp %rax,%r8 |
| 108 | cmovne %r11,%r12 |
| 109 | cmp %rax,%r9 |
| 110 | cmovne %r11,%r12 |
| 111 | neg %r12 |
| 112 | and %r12,%rax |
| 113 | and %r12,%r10 |
| 114 | sub %r10,%rsi |
| 115 | sub %rax,%rdx |
| 116 | sub %rax,%rcx |
| 117 | sub %rax,%r8 |
| 118 | sub %rax,%r9 |
| 119 | movq %rsi,0(%rdi) |
| 120 | movq %rdx,8(%rdi) |
| 121 | movq %rcx,16(%rdi) |
| 122 | movq %r8,24(%rdi) |
| 123 | movq %r9,32(%rdi) |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 124 | movq -8(%rsp),%r12 |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 125 | ret |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 126 | .cfi_endproc |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 127 | |
| 128 | .p2align 5 |
| 129 | .globl C_ABI(x25519_x86_64_mul) |
| 130 | HIDDEN C_ABI(x25519_x86_64_mul) |
| 131 | C_ABI(x25519_x86_64_mul): |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 132 | .cfi_startproc |
| 133 | /* This is a leaf function and uses the redzone for saving registers. */ |
| 134 | movq %r12,-8(%rsp) |
| 135 | .cfi_rel_offset r12, -8 |
| 136 | movq %r13,-16(%rsp) |
| 137 | .cfi_rel_offset r13, -16 |
| 138 | movq %r14,-24(%rsp) |
| 139 | .cfi_rel_offset r14, -24 |
| 140 | movq %r15,-32(%rsp) |
| 141 | .cfi_rel_offset r15, -32 |
| 142 | movq %rbx,-40(%rsp) |
| 143 | .cfi_rel_offset rbx, -40 |
| 144 | movq %rbp,-48(%rsp) |
| 145 | .cfi_rel_offset rbp, -48 |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 146 | mov %rdx,%rcx |
| 147 | movq 24(%rsi),%rdx |
| 148 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 149 | movq %rax,-64(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 150 | mulq 16(%rcx) |
| 151 | mov %rax,%r8 |
| 152 | mov %rdx,%r9 |
| 153 | movq 32(%rsi),%rdx |
| 154 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 155 | movq %rax,-72(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 156 | mulq 8(%rcx) |
| 157 | add %rax,%r8 |
| 158 | adc %rdx,%r9 |
| 159 | movq 0(%rsi),%rax |
| 160 | mulq 0(%rcx) |
| 161 | add %rax,%r8 |
| 162 | adc %rdx,%r9 |
| 163 | movq 0(%rsi),%rax |
| 164 | mulq 8(%rcx) |
| 165 | mov %rax,%r10 |
| 166 | mov %rdx,%r11 |
| 167 | movq 0(%rsi),%rax |
| 168 | mulq 16(%rcx) |
| 169 | mov %rax,%r12 |
| 170 | mov %rdx,%r13 |
| 171 | movq 0(%rsi),%rax |
| 172 | mulq 24(%rcx) |
| 173 | mov %rax,%r14 |
| 174 | mov %rdx,%r15 |
| 175 | movq 0(%rsi),%rax |
| 176 | mulq 32(%rcx) |
| 177 | mov %rax,%rbx |
| 178 | mov %rdx,%rbp |
| 179 | movq 8(%rsi),%rax |
| 180 | mulq 0(%rcx) |
| 181 | add %rax,%r10 |
| 182 | adc %rdx,%r11 |
| 183 | movq 8(%rsi),%rax |
| 184 | mulq 8(%rcx) |
| 185 | add %rax,%r12 |
| 186 | adc %rdx,%r13 |
| 187 | movq 8(%rsi),%rax |
| 188 | mulq 16(%rcx) |
| 189 | add %rax,%r14 |
| 190 | adc %rdx,%r15 |
| 191 | movq 8(%rsi),%rax |
| 192 | mulq 24(%rcx) |
| 193 | add %rax,%rbx |
| 194 | adc %rdx,%rbp |
| 195 | movq 8(%rsi),%rdx |
| 196 | imulq $19,%rdx,%rax |
| 197 | mulq 32(%rcx) |
| 198 | add %rax,%r8 |
| 199 | adc %rdx,%r9 |
| 200 | movq 16(%rsi),%rax |
| 201 | mulq 0(%rcx) |
| 202 | add %rax,%r12 |
| 203 | adc %rdx,%r13 |
| 204 | movq 16(%rsi),%rax |
| 205 | mulq 8(%rcx) |
| 206 | add %rax,%r14 |
| 207 | adc %rdx,%r15 |
| 208 | movq 16(%rsi),%rax |
| 209 | mulq 16(%rcx) |
| 210 | add %rax,%rbx |
| 211 | adc %rdx,%rbp |
| 212 | movq 16(%rsi),%rdx |
| 213 | imulq $19,%rdx,%rax |
| 214 | mulq 24(%rcx) |
| 215 | add %rax,%r8 |
| 216 | adc %rdx,%r9 |
| 217 | movq 16(%rsi),%rdx |
| 218 | imulq $19,%rdx,%rax |
| 219 | mulq 32(%rcx) |
| 220 | add %rax,%r10 |
| 221 | adc %rdx,%r11 |
| 222 | movq 24(%rsi),%rax |
| 223 | mulq 0(%rcx) |
| 224 | add %rax,%r14 |
| 225 | adc %rdx,%r15 |
| 226 | movq 24(%rsi),%rax |
| 227 | mulq 8(%rcx) |
| 228 | add %rax,%rbx |
| 229 | adc %rdx,%rbp |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 230 | movq -64(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 231 | mulq 24(%rcx) |
| 232 | add %rax,%r10 |
| 233 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 234 | movq -64(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 235 | mulq 32(%rcx) |
| 236 | add %rax,%r12 |
| 237 | adc %rdx,%r13 |
| 238 | movq 32(%rsi),%rax |
| 239 | mulq 0(%rcx) |
| 240 | add %rax,%rbx |
| 241 | adc %rdx,%rbp |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 242 | movq -72(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 243 | mulq 16(%rcx) |
| 244 | add %rax,%r10 |
| 245 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 246 | movq -72(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 247 | mulq 24(%rcx) |
| 248 | add %rax,%r12 |
| 249 | adc %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 250 | movq -72(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 251 | mulq 32(%rcx) |
| 252 | add %rax,%r14 |
| 253 | adc %rdx,%r15 |
| 254 | movq x25519_x86_64_REDMASK51(%rip),%rsi |
| 255 | shld $13,%r8,%r9 |
| 256 | and %rsi,%r8 |
| 257 | shld $13,%r10,%r11 |
| 258 | and %rsi,%r10 |
| 259 | add %r9,%r10 |
| 260 | shld $13,%r12,%r13 |
| 261 | and %rsi,%r12 |
| 262 | add %r11,%r12 |
| 263 | shld $13,%r14,%r15 |
| 264 | and %rsi,%r14 |
| 265 | add %r13,%r14 |
| 266 | shld $13,%rbx,%rbp |
| 267 | and %rsi,%rbx |
| 268 | add %r15,%rbx |
| 269 | imulq $19,%rbp,%rdx |
| 270 | add %rdx,%r8 |
| 271 | mov %r8,%rdx |
| 272 | shr $51,%rdx |
| 273 | add %r10,%rdx |
| 274 | mov %rdx,%rcx |
| 275 | shr $51,%rdx |
| 276 | and %rsi,%r8 |
| 277 | add %r12,%rdx |
| 278 | mov %rdx,%r9 |
| 279 | shr $51,%rdx |
| 280 | and %rsi,%rcx |
| 281 | add %r14,%rdx |
| 282 | mov %rdx,%rax |
| 283 | shr $51,%rdx |
| 284 | and %rsi,%r9 |
| 285 | add %rbx,%rdx |
| 286 | mov %rdx,%r10 |
| 287 | shr $51,%rdx |
| 288 | and %rsi,%rax |
| 289 | imulq $19,%rdx,%rdx |
| 290 | add %rdx,%r8 |
| 291 | and %rsi,%r10 |
| 292 | movq %r8,0(%rdi) |
| 293 | movq %rcx,8(%rdi) |
| 294 | movq %r9,16(%rdi) |
| 295 | movq %rax,24(%rdi) |
| 296 | movq %r10,32(%rdi) |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 297 | movq -8(%rsp),%r12 |
| 298 | movq -16(%rsp),%r13 |
| 299 | movq -24(%rsp),%r14 |
| 300 | movq -32(%rsp),%r15 |
| 301 | movq -40(%rsp),%rbx |
| 302 | movq -48(%rsp),%rbp |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 303 | ret |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 304 | .cfi_endproc |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 305 | |
| 306 | .p2align 5 |
| 307 | .globl C_ABI(x25519_x86_64_square) |
| 308 | HIDDEN C_ABI(x25519_x86_64_square) |
| 309 | C_ABI(x25519_x86_64_square): |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 310 | .cfi_startproc |
| 311 | /* This is a leaf function and uses the redzone for saving registers. */ |
| 312 | movq %r12,-8(%rsp) |
| 313 | .cfi_rel_offset r12, -8 |
| 314 | movq %r13,-16(%rsp) |
| 315 | .cfi_rel_offset r13, -16 |
| 316 | movq %r14,-24(%rsp) |
| 317 | .cfi_rel_offset r14, -24 |
| 318 | movq %r15,-32(%rsp) |
| 319 | .cfi_rel_offset r15, -32 |
| 320 | movq %rbx,-40(%rsp) |
| 321 | .cfi_rel_offset rbx, -40 |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 322 | movq 0(%rsi),%rax |
| 323 | mulq 0(%rsi) |
| 324 | mov %rax,%rcx |
| 325 | mov %rdx,%r8 |
| 326 | movq 0(%rsi),%rax |
| 327 | shl $1,%rax |
| 328 | mulq 8(%rsi) |
| 329 | mov %rax,%r9 |
| 330 | mov %rdx,%r10 |
| 331 | movq 0(%rsi),%rax |
| 332 | shl $1,%rax |
| 333 | mulq 16(%rsi) |
| 334 | mov %rax,%r11 |
| 335 | mov %rdx,%r12 |
| 336 | movq 0(%rsi),%rax |
| 337 | shl $1,%rax |
| 338 | mulq 24(%rsi) |
| 339 | mov %rax,%r13 |
| 340 | mov %rdx,%r14 |
| 341 | movq 0(%rsi),%rax |
| 342 | shl $1,%rax |
| 343 | mulq 32(%rsi) |
| 344 | mov %rax,%r15 |
| 345 | mov %rdx,%rbx |
| 346 | movq 8(%rsi),%rax |
| 347 | mulq 8(%rsi) |
| 348 | add %rax,%r11 |
| 349 | adc %rdx,%r12 |
| 350 | movq 8(%rsi),%rax |
| 351 | shl $1,%rax |
| 352 | mulq 16(%rsi) |
| 353 | add %rax,%r13 |
| 354 | adc %rdx,%r14 |
| 355 | movq 8(%rsi),%rax |
| 356 | shl $1,%rax |
| 357 | mulq 24(%rsi) |
| 358 | add %rax,%r15 |
| 359 | adc %rdx,%rbx |
| 360 | movq 8(%rsi),%rdx |
| 361 | imulq $38,%rdx,%rax |
| 362 | mulq 32(%rsi) |
| 363 | add %rax,%rcx |
| 364 | adc %rdx,%r8 |
| 365 | movq 16(%rsi),%rax |
| 366 | mulq 16(%rsi) |
| 367 | add %rax,%r15 |
| 368 | adc %rdx,%rbx |
| 369 | movq 16(%rsi),%rdx |
| 370 | imulq $38,%rdx,%rax |
| 371 | mulq 24(%rsi) |
| 372 | add %rax,%rcx |
| 373 | adc %rdx,%r8 |
| 374 | movq 16(%rsi),%rdx |
| 375 | imulq $38,%rdx,%rax |
| 376 | mulq 32(%rsi) |
| 377 | add %rax,%r9 |
| 378 | adc %rdx,%r10 |
| 379 | movq 24(%rsi),%rdx |
| 380 | imulq $19,%rdx,%rax |
| 381 | mulq 24(%rsi) |
| 382 | add %rax,%r9 |
| 383 | adc %rdx,%r10 |
| 384 | movq 24(%rsi),%rdx |
| 385 | imulq $38,%rdx,%rax |
| 386 | mulq 32(%rsi) |
| 387 | add %rax,%r11 |
| 388 | adc %rdx,%r12 |
| 389 | movq 32(%rsi),%rdx |
| 390 | imulq $19,%rdx,%rax |
| 391 | mulq 32(%rsi) |
| 392 | add %rax,%r13 |
| 393 | adc %rdx,%r14 |
| 394 | movq x25519_x86_64_REDMASK51(%rip),%rsi |
| 395 | shld $13,%rcx,%r8 |
| 396 | and %rsi,%rcx |
| 397 | shld $13,%r9,%r10 |
| 398 | and %rsi,%r9 |
| 399 | add %r8,%r9 |
| 400 | shld $13,%r11,%r12 |
| 401 | and %rsi,%r11 |
| 402 | add %r10,%r11 |
| 403 | shld $13,%r13,%r14 |
| 404 | and %rsi,%r13 |
| 405 | add %r12,%r13 |
| 406 | shld $13,%r15,%rbx |
| 407 | and %rsi,%r15 |
| 408 | add %r14,%r15 |
| 409 | imulq $19,%rbx,%rdx |
| 410 | add %rdx,%rcx |
| 411 | mov %rcx,%rdx |
| 412 | shr $51,%rdx |
| 413 | add %r9,%rdx |
| 414 | and %rsi,%rcx |
| 415 | mov %rdx,%r8 |
| 416 | shr $51,%rdx |
| 417 | add %r11,%rdx |
| 418 | and %rsi,%r8 |
| 419 | mov %rdx,%r9 |
| 420 | shr $51,%rdx |
| 421 | add %r13,%rdx |
| 422 | and %rsi,%r9 |
| 423 | mov %rdx,%rax |
| 424 | shr $51,%rdx |
| 425 | add %r15,%rdx |
| 426 | and %rsi,%rax |
| 427 | mov %rdx,%r10 |
| 428 | shr $51,%rdx |
| 429 | imulq $19,%rdx,%rdx |
| 430 | add %rdx,%rcx |
| 431 | and %rsi,%r10 |
| 432 | movq %rcx,0(%rdi) |
| 433 | movq %r8,8(%rdi) |
| 434 | movq %r9,16(%rdi) |
| 435 | movq %rax,24(%rdi) |
| 436 | movq %r10,32(%rdi) |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 437 | movq -8(%rsp),%r12 |
| 438 | movq -16(%rsp),%r13 |
| 439 | movq -24(%rsp),%r14 |
| 440 | movq -32(%rsp),%r15 |
| 441 | movq -40(%rsp),%rbx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 442 | ret |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 443 | .cfi_endproc |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 444 | |
| 445 | .p2align 5 |
| 446 | .globl C_ABI(x25519_x86_64_ladderstep) |
| 447 | HIDDEN C_ABI(x25519_x86_64_ladderstep) |
| 448 | C_ABI(x25519_x86_64_ladderstep): |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 449 | .cfi_startproc |
| 450 | sub $344,%rsp |
| 451 | .cfi_adjust_cfa_offset 344 |
| 452 | movq %r12,296(%rsp) |
| 453 | .cfi_rel_offset r12, 296 |
| 454 | movq %r13,304(%rsp) |
| 455 | .cfi_rel_offset r13, 304 |
| 456 | movq %r14,312(%rsp) |
| 457 | .cfi_rel_offset r14, 312 |
| 458 | movq %r15,320(%rsp) |
| 459 | .cfi_rel_offset r15, 320 |
| 460 | movq %rbx,328(%rsp) |
| 461 | .cfi_rel_offset rbx, 328 |
| 462 | movq %rbp,336(%rsp) |
| 463 | .cfi_rel_offset rbp, 336 |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 464 | movq 40(%rdi),%rsi |
| 465 | movq 48(%rdi),%rdx |
| 466 | movq 56(%rdi),%rcx |
| 467 | movq 64(%rdi),%r8 |
| 468 | movq 72(%rdi),%r9 |
| 469 | mov %rsi,%rax |
| 470 | mov %rdx,%r10 |
| 471 | mov %rcx,%r11 |
| 472 | mov %r8,%r12 |
| 473 | mov %r9,%r13 |
| 474 | add x25519_x86_64_2P0(%rip),%rax |
| 475 | add x25519_x86_64_2P1234(%rip),%r10 |
| 476 | add x25519_x86_64_2P1234(%rip),%r11 |
| 477 | add x25519_x86_64_2P1234(%rip),%r12 |
| 478 | add x25519_x86_64_2P1234(%rip),%r13 |
| 479 | addq 80(%rdi),%rsi |
| 480 | addq 88(%rdi),%rdx |
| 481 | addq 96(%rdi),%rcx |
| 482 | addq 104(%rdi),%r8 |
| 483 | addq 112(%rdi),%r9 |
| 484 | subq 80(%rdi),%rax |
| 485 | subq 88(%rdi),%r10 |
| 486 | subq 96(%rdi),%r11 |
| 487 | subq 104(%rdi),%r12 |
| 488 | subq 112(%rdi),%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 489 | movq %rsi,0(%rsp) |
| 490 | movq %rdx,8(%rsp) |
| 491 | movq %rcx,16(%rsp) |
| 492 | movq %r8,24(%rsp) |
| 493 | movq %r9,32(%rsp) |
| 494 | movq %rax,40(%rsp) |
| 495 | movq %r10,48(%rsp) |
| 496 | movq %r11,56(%rsp) |
| 497 | movq %r12,64(%rsp) |
| 498 | movq %r13,72(%rsp) |
| 499 | movq 40(%rsp),%rax |
| 500 | mulq 40(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 501 | mov %rax,%rsi |
| 502 | mov %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 503 | movq 40(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 504 | shl $1,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 505 | mulq 48(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 506 | mov %rax,%r8 |
| 507 | mov %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 508 | movq 40(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 509 | shl $1,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 510 | mulq 56(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 511 | mov %rax,%r10 |
| 512 | mov %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 513 | movq 40(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 514 | shl $1,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 515 | mulq 64(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 516 | mov %rax,%r12 |
| 517 | mov %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 518 | movq 40(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 519 | shl $1,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 520 | mulq 72(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 521 | mov %rax,%r14 |
| 522 | mov %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 523 | movq 48(%rsp),%rax |
| 524 | mulq 48(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 525 | add %rax,%r10 |
| 526 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 527 | movq 48(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 528 | shl $1,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 529 | mulq 56(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 530 | add %rax,%r12 |
| 531 | adc %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 532 | movq 48(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 533 | shl $1,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 534 | mulq 64(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 535 | add %rax,%r14 |
| 536 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 537 | movq 48(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 538 | imulq $38,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 539 | mulq 72(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 540 | add %rax,%rsi |
| 541 | adc %rdx,%rcx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 542 | movq 56(%rsp),%rax |
| 543 | mulq 56(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 544 | add %rax,%r14 |
| 545 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 546 | movq 56(%rsp),%rdx |
| 547 | imulq $38,%rdx,%rax |
| 548 | mulq 64(%rsp) |
| 549 | add %rax,%rsi |
| 550 | adc %rdx,%rcx |
| 551 | movq 56(%rsp),%rdx |
| 552 | imulq $38,%rdx,%rax |
| 553 | mulq 72(%rsp) |
| 554 | add %rax,%r8 |
| 555 | adc %rdx,%r9 |
| 556 | movq 64(%rsp),%rdx |
| 557 | imulq $19,%rdx,%rax |
| 558 | mulq 64(%rsp) |
| 559 | add %rax,%r8 |
| 560 | adc %rdx,%r9 |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 561 | movq 64(%rsp),%rdx |
| 562 | imulq $38,%rdx,%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 563 | mulq 72(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 564 | add %rax,%r10 |
| 565 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 566 | movq 72(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 567 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 568 | mulq 72(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 569 | add %rax,%r12 |
| 570 | adc %rdx,%r13 |
| 571 | movq x25519_x86_64_REDMASK51(%rip),%rdx |
| 572 | shld $13,%rsi,%rcx |
| 573 | and %rdx,%rsi |
| 574 | shld $13,%r8,%r9 |
| 575 | and %rdx,%r8 |
| 576 | add %rcx,%r8 |
| 577 | shld $13,%r10,%r11 |
| 578 | and %rdx,%r10 |
| 579 | add %r9,%r10 |
| 580 | shld $13,%r12,%r13 |
| 581 | and %rdx,%r12 |
| 582 | add %r11,%r12 |
| 583 | shld $13,%r14,%r15 |
| 584 | and %rdx,%r14 |
| 585 | add %r13,%r14 |
| 586 | imulq $19,%r15,%rcx |
| 587 | add %rcx,%rsi |
| 588 | mov %rsi,%rcx |
| 589 | shr $51,%rcx |
| 590 | add %r8,%rcx |
| 591 | and %rdx,%rsi |
| 592 | mov %rcx,%r8 |
| 593 | shr $51,%rcx |
| 594 | add %r10,%rcx |
| 595 | and %rdx,%r8 |
| 596 | mov %rcx,%r9 |
| 597 | shr $51,%rcx |
| 598 | add %r12,%rcx |
| 599 | and %rdx,%r9 |
| 600 | mov %rcx,%rax |
| 601 | shr $51,%rcx |
| 602 | add %r14,%rcx |
| 603 | and %rdx,%rax |
| 604 | mov %rcx,%r10 |
| 605 | shr $51,%rcx |
| 606 | imulq $19,%rcx,%rcx |
| 607 | add %rcx,%rsi |
| 608 | and %rdx,%r10 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 609 | movq %rsi,80(%rsp) |
| 610 | movq %r8,88(%rsp) |
| 611 | movq %r9,96(%rsp) |
| 612 | movq %rax,104(%rsp) |
| 613 | movq %r10,112(%rsp) |
| 614 | movq 0(%rsp),%rax |
| 615 | mulq 0(%rsp) |
| 616 | mov %rax,%rsi |
| 617 | mov %rdx,%rcx |
| 618 | movq 0(%rsp),%rax |
| 619 | shl $1,%rax |
| 620 | mulq 8(%rsp) |
| 621 | mov %rax,%r8 |
| 622 | mov %rdx,%r9 |
| 623 | movq 0(%rsp),%rax |
| 624 | shl $1,%rax |
| 625 | mulq 16(%rsp) |
| 626 | mov %rax,%r10 |
| 627 | mov %rdx,%r11 |
| 628 | movq 0(%rsp),%rax |
| 629 | shl $1,%rax |
| 630 | mulq 24(%rsp) |
| 631 | mov %rax,%r12 |
| 632 | mov %rdx,%r13 |
| 633 | movq 0(%rsp),%rax |
| 634 | shl $1,%rax |
| 635 | mulq 32(%rsp) |
| 636 | mov %rax,%r14 |
| 637 | mov %rdx,%r15 |
| 638 | movq 8(%rsp),%rax |
| 639 | mulq 8(%rsp) |
| 640 | add %rax,%r10 |
| 641 | adc %rdx,%r11 |
| 642 | movq 8(%rsp),%rax |
| 643 | shl $1,%rax |
| 644 | mulq 16(%rsp) |
| 645 | add %rax,%r12 |
| 646 | adc %rdx,%r13 |
| 647 | movq 8(%rsp),%rax |
| 648 | shl $1,%rax |
| 649 | mulq 24(%rsp) |
| 650 | add %rax,%r14 |
| 651 | adc %rdx,%r15 |
| 652 | movq 8(%rsp),%rdx |
| 653 | imulq $38,%rdx,%rax |
| 654 | mulq 32(%rsp) |
| 655 | add %rax,%rsi |
| 656 | adc %rdx,%rcx |
| 657 | movq 16(%rsp),%rax |
| 658 | mulq 16(%rsp) |
| 659 | add %rax,%r14 |
| 660 | adc %rdx,%r15 |
| 661 | movq 16(%rsp),%rdx |
| 662 | imulq $38,%rdx,%rax |
| 663 | mulq 24(%rsp) |
| 664 | add %rax,%rsi |
| 665 | adc %rdx,%rcx |
| 666 | movq 16(%rsp),%rdx |
| 667 | imulq $38,%rdx,%rax |
| 668 | mulq 32(%rsp) |
| 669 | add %rax,%r8 |
| 670 | adc %rdx,%r9 |
| 671 | movq 24(%rsp),%rdx |
| 672 | imulq $19,%rdx,%rax |
| 673 | mulq 24(%rsp) |
| 674 | add %rax,%r8 |
| 675 | adc %rdx,%r9 |
| 676 | movq 24(%rsp),%rdx |
| 677 | imulq $38,%rdx,%rax |
| 678 | mulq 32(%rsp) |
| 679 | add %rax,%r10 |
| 680 | adc %rdx,%r11 |
| 681 | movq 32(%rsp),%rdx |
| 682 | imulq $19,%rdx,%rax |
| 683 | mulq 32(%rsp) |
| 684 | add %rax,%r12 |
| 685 | adc %rdx,%r13 |
| 686 | movq x25519_x86_64_REDMASK51(%rip),%rdx |
| 687 | shld $13,%rsi,%rcx |
| 688 | and %rdx,%rsi |
| 689 | shld $13,%r8,%r9 |
| 690 | and %rdx,%r8 |
| 691 | add %rcx,%r8 |
| 692 | shld $13,%r10,%r11 |
| 693 | and %rdx,%r10 |
| 694 | add %r9,%r10 |
| 695 | shld $13,%r12,%r13 |
| 696 | and %rdx,%r12 |
| 697 | add %r11,%r12 |
| 698 | shld $13,%r14,%r15 |
| 699 | and %rdx,%r14 |
| 700 | add %r13,%r14 |
| 701 | imulq $19,%r15,%rcx |
| 702 | add %rcx,%rsi |
| 703 | mov %rsi,%rcx |
| 704 | shr $51,%rcx |
| 705 | add %r8,%rcx |
| 706 | and %rdx,%rsi |
| 707 | mov %rcx,%r8 |
| 708 | shr $51,%rcx |
| 709 | add %r10,%rcx |
| 710 | and %rdx,%r8 |
| 711 | mov %rcx,%r9 |
| 712 | shr $51,%rcx |
| 713 | add %r12,%rcx |
| 714 | and %rdx,%r9 |
| 715 | mov %rcx,%rax |
| 716 | shr $51,%rcx |
| 717 | add %r14,%rcx |
| 718 | and %rdx,%rax |
| 719 | mov %rcx,%r10 |
| 720 | shr $51,%rcx |
| 721 | imulq $19,%rcx,%rcx |
| 722 | add %rcx,%rsi |
| 723 | and %rdx,%r10 |
| 724 | movq %rsi,120(%rsp) |
| 725 | movq %r8,128(%rsp) |
| 726 | movq %r9,136(%rsp) |
| 727 | movq %rax,144(%rsp) |
| 728 | movq %r10,152(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 729 | mov %rsi,%rsi |
| 730 | mov %r8,%rdx |
| 731 | mov %r9,%rcx |
| 732 | mov %rax,%r8 |
| 733 | mov %r10,%r9 |
| 734 | add x25519_x86_64_2P0(%rip),%rsi |
| 735 | add x25519_x86_64_2P1234(%rip),%rdx |
| 736 | add x25519_x86_64_2P1234(%rip),%rcx |
| 737 | add x25519_x86_64_2P1234(%rip),%r8 |
| 738 | add x25519_x86_64_2P1234(%rip),%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 739 | subq 80(%rsp),%rsi |
| 740 | subq 88(%rsp),%rdx |
| 741 | subq 96(%rsp),%rcx |
| 742 | subq 104(%rsp),%r8 |
| 743 | subq 112(%rsp),%r9 |
| 744 | movq %rsi,160(%rsp) |
| 745 | movq %rdx,168(%rsp) |
| 746 | movq %rcx,176(%rsp) |
| 747 | movq %r8,184(%rsp) |
| 748 | movq %r9,192(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 749 | movq 120(%rdi),%rsi |
| 750 | movq 128(%rdi),%rdx |
| 751 | movq 136(%rdi),%rcx |
| 752 | movq 144(%rdi),%r8 |
| 753 | movq 152(%rdi),%r9 |
| 754 | mov %rsi,%rax |
| 755 | mov %rdx,%r10 |
| 756 | mov %rcx,%r11 |
| 757 | mov %r8,%r12 |
| 758 | mov %r9,%r13 |
| 759 | add x25519_x86_64_2P0(%rip),%rax |
| 760 | add x25519_x86_64_2P1234(%rip),%r10 |
| 761 | add x25519_x86_64_2P1234(%rip),%r11 |
| 762 | add x25519_x86_64_2P1234(%rip),%r12 |
| 763 | add x25519_x86_64_2P1234(%rip),%r13 |
| 764 | addq 160(%rdi),%rsi |
| 765 | addq 168(%rdi),%rdx |
| 766 | addq 176(%rdi),%rcx |
| 767 | addq 184(%rdi),%r8 |
| 768 | addq 192(%rdi),%r9 |
| 769 | subq 160(%rdi),%rax |
| 770 | subq 168(%rdi),%r10 |
| 771 | subq 176(%rdi),%r11 |
| 772 | subq 184(%rdi),%r12 |
| 773 | subq 192(%rdi),%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 774 | movq %rsi,200(%rsp) |
| 775 | movq %rdx,208(%rsp) |
| 776 | movq %rcx,216(%rsp) |
| 777 | movq %r8,224(%rsp) |
| 778 | movq %r9,232(%rsp) |
| 779 | movq %rax,240(%rsp) |
| 780 | movq %r10,248(%rsp) |
| 781 | movq %r11,256(%rsp) |
| 782 | movq %r12,264(%rsp) |
| 783 | movq %r13,272(%rsp) |
| 784 | movq 224(%rsp),%rsi |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 785 | imulq $19,%rsi,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 786 | movq %rax,280(%rsp) |
| 787 | mulq 56(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 788 | mov %rax,%rsi |
| 789 | mov %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 790 | movq 232(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 791 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 792 | movq %rax,288(%rsp) |
| 793 | mulq 48(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 794 | add %rax,%rsi |
| 795 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 796 | movq 200(%rsp),%rax |
| 797 | mulq 40(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 798 | add %rax,%rsi |
| 799 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 800 | movq 200(%rsp),%rax |
| 801 | mulq 48(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 802 | mov %rax,%r8 |
| 803 | mov %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 804 | movq 200(%rsp),%rax |
| 805 | mulq 56(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 806 | mov %rax,%r10 |
| 807 | mov %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 808 | movq 200(%rsp),%rax |
| 809 | mulq 64(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 810 | mov %rax,%r12 |
| 811 | mov %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 812 | movq 200(%rsp),%rax |
| 813 | mulq 72(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 814 | mov %rax,%r14 |
| 815 | mov %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 816 | movq 208(%rsp),%rax |
| 817 | mulq 40(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 818 | add %rax,%r8 |
| 819 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 820 | movq 208(%rsp),%rax |
| 821 | mulq 48(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 822 | add %rax,%r10 |
| 823 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 824 | movq 208(%rsp),%rax |
| 825 | mulq 56(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 826 | add %rax,%r12 |
| 827 | adc %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 828 | movq 208(%rsp),%rax |
| 829 | mulq 64(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 830 | add %rax,%r14 |
| 831 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 832 | movq 208(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 833 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 834 | mulq 72(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 835 | add %rax,%rsi |
| 836 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 837 | movq 216(%rsp),%rax |
| 838 | mulq 40(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 839 | add %rax,%r10 |
| 840 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 841 | movq 216(%rsp),%rax |
| 842 | mulq 48(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 843 | add %rax,%r12 |
| 844 | adc %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 845 | movq 216(%rsp),%rax |
| 846 | mulq 56(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 847 | add %rax,%r14 |
| 848 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 849 | movq 216(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 850 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 851 | mulq 64(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 852 | add %rax,%rsi |
| 853 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 854 | movq 216(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 855 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 856 | mulq 72(%rsp) |
| 857 | add %rax,%r8 |
| 858 | adc %rdx,%r9 |
| 859 | movq 224(%rsp),%rax |
| 860 | mulq 40(%rsp) |
| 861 | add %rax,%r12 |
| 862 | adc %rdx,%r13 |
| 863 | movq 224(%rsp),%rax |
| 864 | mulq 48(%rsp) |
| 865 | add %rax,%r14 |
| 866 | adc %rdx,%r15 |
| 867 | movq 280(%rsp),%rax |
| 868 | mulq 64(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 869 | add %rax,%r8 |
| 870 | adc %rdx,%r9 |
| 871 | movq 280(%rsp),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 872 | mulq 72(%rsp) |
| 873 | add %rax,%r10 |
| 874 | adc %rdx,%r11 |
| 875 | movq 232(%rsp),%rax |
| 876 | mulq 40(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 877 | add %rax,%r14 |
| 878 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 879 | movq 288(%rsp),%rax |
| 880 | mulq 56(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 881 | add %rax,%r8 |
| 882 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 883 | movq 288(%rsp),%rax |
| 884 | mulq 64(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 885 | add %rax,%r10 |
| 886 | adc %rdx,%r11 |
| 887 | movq 288(%rsp),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 888 | mulq 72(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 889 | add %rax,%r12 |
| 890 | adc %rdx,%r13 |
| 891 | movq x25519_x86_64_REDMASK51(%rip),%rdx |
| 892 | shld $13,%rsi,%rcx |
| 893 | and %rdx,%rsi |
| 894 | shld $13,%r8,%r9 |
| 895 | and %rdx,%r8 |
| 896 | add %rcx,%r8 |
| 897 | shld $13,%r10,%r11 |
| 898 | and %rdx,%r10 |
| 899 | add %r9,%r10 |
| 900 | shld $13,%r12,%r13 |
| 901 | and %rdx,%r12 |
| 902 | add %r11,%r12 |
| 903 | shld $13,%r14,%r15 |
| 904 | and %rdx,%r14 |
| 905 | add %r13,%r14 |
| 906 | imulq $19,%r15,%rcx |
| 907 | add %rcx,%rsi |
| 908 | mov %rsi,%rcx |
| 909 | shr $51,%rcx |
| 910 | add %r8,%rcx |
| 911 | mov %rcx,%r8 |
| 912 | shr $51,%rcx |
| 913 | and %rdx,%rsi |
| 914 | add %r10,%rcx |
| 915 | mov %rcx,%r9 |
| 916 | shr $51,%rcx |
| 917 | and %rdx,%r8 |
| 918 | add %r12,%rcx |
| 919 | mov %rcx,%rax |
| 920 | shr $51,%rcx |
| 921 | and %rdx,%r9 |
| 922 | add %r14,%rcx |
| 923 | mov %rcx,%r10 |
| 924 | shr $51,%rcx |
| 925 | and %rdx,%rax |
| 926 | imulq $19,%rcx,%rcx |
| 927 | add %rcx,%rsi |
| 928 | and %rdx,%r10 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 929 | movq %rsi,40(%rsp) |
| 930 | movq %r8,48(%rsp) |
| 931 | movq %r9,56(%rsp) |
| 932 | movq %rax,64(%rsp) |
| 933 | movq %r10,72(%rsp) |
| 934 | movq 264(%rsp),%rsi |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 935 | imulq $19,%rsi,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 936 | movq %rax,200(%rsp) |
| 937 | mulq 16(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 938 | mov %rax,%rsi |
| 939 | mov %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 940 | movq 272(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 941 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 942 | movq %rax,208(%rsp) |
| 943 | mulq 8(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 944 | add %rax,%rsi |
| 945 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 946 | movq 240(%rsp),%rax |
| 947 | mulq 0(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 948 | add %rax,%rsi |
| 949 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 950 | movq 240(%rsp),%rax |
| 951 | mulq 8(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 952 | mov %rax,%r8 |
| 953 | mov %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 954 | movq 240(%rsp),%rax |
| 955 | mulq 16(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 956 | mov %rax,%r10 |
| 957 | mov %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 958 | movq 240(%rsp),%rax |
| 959 | mulq 24(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 960 | mov %rax,%r12 |
| 961 | mov %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 962 | movq 240(%rsp),%rax |
| 963 | mulq 32(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 964 | mov %rax,%r14 |
| 965 | mov %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 966 | movq 248(%rsp),%rax |
| 967 | mulq 0(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 968 | add %rax,%r8 |
| 969 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 970 | movq 248(%rsp),%rax |
| 971 | mulq 8(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 972 | add %rax,%r10 |
| 973 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 974 | movq 248(%rsp),%rax |
| 975 | mulq 16(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 976 | add %rax,%r12 |
| 977 | adc %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 978 | movq 248(%rsp),%rax |
| 979 | mulq 24(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 980 | add %rax,%r14 |
| 981 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 982 | movq 248(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 983 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 984 | mulq 32(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 985 | add %rax,%rsi |
| 986 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 987 | movq 256(%rsp),%rax |
| 988 | mulq 0(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 989 | add %rax,%r10 |
| 990 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 991 | movq 256(%rsp),%rax |
| 992 | mulq 8(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 993 | add %rax,%r12 |
| 994 | adc %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 995 | movq 256(%rsp),%rax |
| 996 | mulq 16(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 997 | add %rax,%r14 |
| 998 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 999 | movq 256(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1000 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1001 | mulq 24(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1002 | add %rax,%rsi |
| 1003 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1004 | movq 256(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1005 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1006 | mulq 32(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1007 | add %rax,%r8 |
| 1008 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1009 | movq 264(%rsp),%rax |
| 1010 | mulq 0(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1011 | add %rax,%r12 |
| 1012 | adc %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1013 | movq 264(%rsp),%rax |
| 1014 | mulq 8(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1015 | add %rax,%r14 |
| 1016 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1017 | movq 200(%rsp),%rax |
| 1018 | mulq 24(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1019 | add %rax,%r8 |
| 1020 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1021 | movq 200(%rsp),%rax |
| 1022 | mulq 32(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1023 | add %rax,%r10 |
| 1024 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1025 | movq 272(%rsp),%rax |
| 1026 | mulq 0(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1027 | add %rax,%r14 |
| 1028 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1029 | movq 208(%rsp),%rax |
| 1030 | mulq 16(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1031 | add %rax,%r8 |
| 1032 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1033 | movq 208(%rsp),%rax |
| 1034 | mulq 24(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1035 | add %rax,%r10 |
| 1036 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1037 | movq 208(%rsp),%rax |
| 1038 | mulq 32(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1039 | add %rax,%r12 |
| 1040 | adc %rdx,%r13 |
| 1041 | movq x25519_x86_64_REDMASK51(%rip),%rdx |
| 1042 | shld $13,%rsi,%rcx |
| 1043 | and %rdx,%rsi |
| 1044 | shld $13,%r8,%r9 |
| 1045 | and %rdx,%r8 |
| 1046 | add %rcx,%r8 |
| 1047 | shld $13,%r10,%r11 |
| 1048 | and %rdx,%r10 |
| 1049 | add %r9,%r10 |
| 1050 | shld $13,%r12,%r13 |
| 1051 | and %rdx,%r12 |
| 1052 | add %r11,%r12 |
| 1053 | shld $13,%r14,%r15 |
| 1054 | and %rdx,%r14 |
| 1055 | add %r13,%r14 |
| 1056 | imulq $19,%r15,%rcx |
| 1057 | add %rcx,%rsi |
| 1058 | mov %rsi,%rcx |
| 1059 | shr $51,%rcx |
| 1060 | add %r8,%rcx |
| 1061 | mov %rcx,%r8 |
| 1062 | shr $51,%rcx |
| 1063 | and %rdx,%rsi |
| 1064 | add %r10,%rcx |
| 1065 | mov %rcx,%r9 |
| 1066 | shr $51,%rcx |
| 1067 | and %rdx,%r8 |
| 1068 | add %r12,%rcx |
| 1069 | mov %rcx,%rax |
| 1070 | shr $51,%rcx |
| 1071 | and %rdx,%r9 |
| 1072 | add %r14,%rcx |
| 1073 | mov %rcx,%r10 |
| 1074 | shr $51,%rcx |
| 1075 | and %rdx,%rax |
| 1076 | imulq $19,%rcx,%rcx |
| 1077 | add %rcx,%rsi |
| 1078 | and %rdx,%r10 |
| 1079 | mov %rsi,%rdx |
| 1080 | mov %r8,%rcx |
| 1081 | mov %r9,%r11 |
| 1082 | mov %rax,%r12 |
| 1083 | mov %r10,%r13 |
| 1084 | add x25519_x86_64_2P0(%rip),%rdx |
| 1085 | add x25519_x86_64_2P1234(%rip),%rcx |
| 1086 | add x25519_x86_64_2P1234(%rip),%r11 |
| 1087 | add x25519_x86_64_2P1234(%rip),%r12 |
| 1088 | add x25519_x86_64_2P1234(%rip),%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1089 | addq 40(%rsp),%rsi |
| 1090 | addq 48(%rsp),%r8 |
| 1091 | addq 56(%rsp),%r9 |
| 1092 | addq 64(%rsp),%rax |
| 1093 | addq 72(%rsp),%r10 |
| 1094 | subq 40(%rsp),%rdx |
| 1095 | subq 48(%rsp),%rcx |
| 1096 | subq 56(%rsp),%r11 |
| 1097 | subq 64(%rsp),%r12 |
| 1098 | subq 72(%rsp),%r13 |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1099 | movq %rsi,120(%rdi) |
| 1100 | movq %r8,128(%rdi) |
| 1101 | movq %r9,136(%rdi) |
| 1102 | movq %rax,144(%rdi) |
| 1103 | movq %r10,152(%rdi) |
| 1104 | movq %rdx,160(%rdi) |
| 1105 | movq %rcx,168(%rdi) |
| 1106 | movq %r11,176(%rdi) |
| 1107 | movq %r12,184(%rdi) |
| 1108 | movq %r13,192(%rdi) |
| 1109 | movq 120(%rdi),%rax |
| 1110 | mulq 120(%rdi) |
| 1111 | mov %rax,%rsi |
| 1112 | mov %rdx,%rcx |
| 1113 | movq 120(%rdi),%rax |
| 1114 | shl $1,%rax |
| 1115 | mulq 128(%rdi) |
| 1116 | mov %rax,%r8 |
| 1117 | mov %rdx,%r9 |
| 1118 | movq 120(%rdi),%rax |
| 1119 | shl $1,%rax |
| 1120 | mulq 136(%rdi) |
| 1121 | mov %rax,%r10 |
| 1122 | mov %rdx,%r11 |
| 1123 | movq 120(%rdi),%rax |
| 1124 | shl $1,%rax |
| 1125 | mulq 144(%rdi) |
| 1126 | mov %rax,%r12 |
| 1127 | mov %rdx,%r13 |
| 1128 | movq 120(%rdi),%rax |
| 1129 | shl $1,%rax |
| 1130 | mulq 152(%rdi) |
| 1131 | mov %rax,%r14 |
| 1132 | mov %rdx,%r15 |
| 1133 | movq 128(%rdi),%rax |
| 1134 | mulq 128(%rdi) |
| 1135 | add %rax,%r10 |
| 1136 | adc %rdx,%r11 |
| 1137 | movq 128(%rdi),%rax |
| 1138 | shl $1,%rax |
| 1139 | mulq 136(%rdi) |
| 1140 | add %rax,%r12 |
| 1141 | adc %rdx,%r13 |
| 1142 | movq 128(%rdi),%rax |
| 1143 | shl $1,%rax |
| 1144 | mulq 144(%rdi) |
| 1145 | add %rax,%r14 |
| 1146 | adc %rdx,%r15 |
| 1147 | movq 128(%rdi),%rdx |
| 1148 | imulq $38,%rdx,%rax |
| 1149 | mulq 152(%rdi) |
| 1150 | add %rax,%rsi |
| 1151 | adc %rdx,%rcx |
| 1152 | movq 136(%rdi),%rax |
| 1153 | mulq 136(%rdi) |
| 1154 | add %rax,%r14 |
| 1155 | adc %rdx,%r15 |
| 1156 | movq 136(%rdi),%rdx |
| 1157 | imulq $38,%rdx,%rax |
| 1158 | mulq 144(%rdi) |
| 1159 | add %rax,%rsi |
| 1160 | adc %rdx,%rcx |
| 1161 | movq 136(%rdi),%rdx |
| 1162 | imulq $38,%rdx,%rax |
| 1163 | mulq 152(%rdi) |
| 1164 | add %rax,%r8 |
| 1165 | adc %rdx,%r9 |
| 1166 | movq 144(%rdi),%rdx |
| 1167 | imulq $19,%rdx,%rax |
| 1168 | mulq 144(%rdi) |
| 1169 | add %rax,%r8 |
| 1170 | adc %rdx,%r9 |
| 1171 | movq 144(%rdi),%rdx |
| 1172 | imulq $38,%rdx,%rax |
| 1173 | mulq 152(%rdi) |
| 1174 | add %rax,%r10 |
| 1175 | adc %rdx,%r11 |
| 1176 | movq 152(%rdi),%rdx |
| 1177 | imulq $19,%rdx,%rax |
| 1178 | mulq 152(%rdi) |
| 1179 | add %rax,%r12 |
| 1180 | adc %rdx,%r13 |
| 1181 | movq x25519_x86_64_REDMASK51(%rip),%rdx |
| 1182 | shld $13,%rsi,%rcx |
| 1183 | and %rdx,%rsi |
| 1184 | shld $13,%r8,%r9 |
| 1185 | and %rdx,%r8 |
| 1186 | add %rcx,%r8 |
| 1187 | shld $13,%r10,%r11 |
| 1188 | and %rdx,%r10 |
| 1189 | add %r9,%r10 |
| 1190 | shld $13,%r12,%r13 |
| 1191 | and %rdx,%r12 |
| 1192 | add %r11,%r12 |
| 1193 | shld $13,%r14,%r15 |
| 1194 | and %rdx,%r14 |
| 1195 | add %r13,%r14 |
| 1196 | imulq $19,%r15,%rcx |
| 1197 | add %rcx,%rsi |
| 1198 | mov %rsi,%rcx |
| 1199 | shr $51,%rcx |
| 1200 | add %r8,%rcx |
| 1201 | and %rdx,%rsi |
| 1202 | mov %rcx,%r8 |
| 1203 | shr $51,%rcx |
| 1204 | add %r10,%rcx |
| 1205 | and %rdx,%r8 |
| 1206 | mov %rcx,%r9 |
| 1207 | shr $51,%rcx |
| 1208 | add %r12,%rcx |
| 1209 | and %rdx,%r9 |
| 1210 | mov %rcx,%rax |
| 1211 | shr $51,%rcx |
| 1212 | add %r14,%rcx |
| 1213 | and %rdx,%rax |
| 1214 | mov %rcx,%r10 |
| 1215 | shr $51,%rcx |
| 1216 | imulq $19,%rcx,%rcx |
| 1217 | add %rcx,%rsi |
| 1218 | and %rdx,%r10 |
| 1219 | movq %rsi,120(%rdi) |
| 1220 | movq %r8,128(%rdi) |
| 1221 | movq %r9,136(%rdi) |
| 1222 | movq %rax,144(%rdi) |
| 1223 | movq %r10,152(%rdi) |
| 1224 | movq 160(%rdi),%rax |
| 1225 | mulq 160(%rdi) |
| 1226 | mov %rax,%rsi |
| 1227 | mov %rdx,%rcx |
| 1228 | movq 160(%rdi),%rax |
| 1229 | shl $1,%rax |
| 1230 | mulq 168(%rdi) |
| 1231 | mov %rax,%r8 |
| 1232 | mov %rdx,%r9 |
| 1233 | movq 160(%rdi),%rax |
| 1234 | shl $1,%rax |
| 1235 | mulq 176(%rdi) |
| 1236 | mov %rax,%r10 |
| 1237 | mov %rdx,%r11 |
| 1238 | movq 160(%rdi),%rax |
| 1239 | shl $1,%rax |
| 1240 | mulq 184(%rdi) |
| 1241 | mov %rax,%r12 |
| 1242 | mov %rdx,%r13 |
| 1243 | movq 160(%rdi),%rax |
| 1244 | shl $1,%rax |
| 1245 | mulq 192(%rdi) |
| 1246 | mov %rax,%r14 |
| 1247 | mov %rdx,%r15 |
| 1248 | movq 168(%rdi),%rax |
| 1249 | mulq 168(%rdi) |
| 1250 | add %rax,%r10 |
| 1251 | adc %rdx,%r11 |
| 1252 | movq 168(%rdi),%rax |
| 1253 | shl $1,%rax |
| 1254 | mulq 176(%rdi) |
| 1255 | add %rax,%r12 |
| 1256 | adc %rdx,%r13 |
| 1257 | movq 168(%rdi),%rax |
| 1258 | shl $1,%rax |
| 1259 | mulq 184(%rdi) |
| 1260 | add %rax,%r14 |
| 1261 | adc %rdx,%r15 |
| 1262 | movq 168(%rdi),%rdx |
| 1263 | imulq $38,%rdx,%rax |
| 1264 | mulq 192(%rdi) |
| 1265 | add %rax,%rsi |
| 1266 | adc %rdx,%rcx |
| 1267 | movq 176(%rdi),%rax |
| 1268 | mulq 176(%rdi) |
| 1269 | add %rax,%r14 |
| 1270 | adc %rdx,%r15 |
| 1271 | movq 176(%rdi),%rdx |
| 1272 | imulq $38,%rdx,%rax |
| 1273 | mulq 184(%rdi) |
| 1274 | add %rax,%rsi |
| 1275 | adc %rdx,%rcx |
| 1276 | movq 176(%rdi),%rdx |
| 1277 | imulq $38,%rdx,%rax |
| 1278 | mulq 192(%rdi) |
| 1279 | add %rax,%r8 |
| 1280 | adc %rdx,%r9 |
| 1281 | movq 184(%rdi),%rdx |
| 1282 | imulq $19,%rdx,%rax |
| 1283 | mulq 184(%rdi) |
| 1284 | add %rax,%r8 |
| 1285 | adc %rdx,%r9 |
| 1286 | movq 184(%rdi),%rdx |
| 1287 | imulq $38,%rdx,%rax |
| 1288 | mulq 192(%rdi) |
| 1289 | add %rax,%r10 |
| 1290 | adc %rdx,%r11 |
| 1291 | movq 192(%rdi),%rdx |
| 1292 | imulq $19,%rdx,%rax |
| 1293 | mulq 192(%rdi) |
| 1294 | add %rax,%r12 |
| 1295 | adc %rdx,%r13 |
| 1296 | movq x25519_x86_64_REDMASK51(%rip),%rdx |
| 1297 | shld $13,%rsi,%rcx |
| 1298 | and %rdx,%rsi |
| 1299 | shld $13,%r8,%r9 |
| 1300 | and %rdx,%r8 |
| 1301 | add %rcx,%r8 |
| 1302 | shld $13,%r10,%r11 |
| 1303 | and %rdx,%r10 |
| 1304 | add %r9,%r10 |
| 1305 | shld $13,%r12,%r13 |
| 1306 | and %rdx,%r12 |
| 1307 | add %r11,%r12 |
| 1308 | shld $13,%r14,%r15 |
| 1309 | and %rdx,%r14 |
| 1310 | add %r13,%r14 |
| 1311 | imulq $19,%r15,%rcx |
| 1312 | add %rcx,%rsi |
| 1313 | mov %rsi,%rcx |
| 1314 | shr $51,%rcx |
| 1315 | add %r8,%rcx |
| 1316 | and %rdx,%rsi |
| 1317 | mov %rcx,%r8 |
| 1318 | shr $51,%rcx |
| 1319 | add %r10,%rcx |
| 1320 | and %rdx,%r8 |
| 1321 | mov %rcx,%r9 |
| 1322 | shr $51,%rcx |
| 1323 | add %r12,%rcx |
| 1324 | and %rdx,%r9 |
| 1325 | mov %rcx,%rax |
| 1326 | shr $51,%rcx |
| 1327 | add %r14,%rcx |
| 1328 | and %rdx,%rax |
| 1329 | mov %rcx,%r10 |
| 1330 | shr $51,%rcx |
| 1331 | imulq $19,%rcx,%rcx |
| 1332 | add %rcx,%rsi |
| 1333 | and %rdx,%r10 |
| 1334 | movq %rsi,160(%rdi) |
| 1335 | movq %r8,168(%rdi) |
| 1336 | movq %r9,176(%rdi) |
| 1337 | movq %rax,184(%rdi) |
| 1338 | movq %r10,192(%rdi) |
| 1339 | movq 184(%rdi),%rsi |
| 1340 | imulq $19,%rsi,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1341 | movq %rax,0(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1342 | mulq 16(%rdi) |
| 1343 | mov %rax,%rsi |
| 1344 | mov %rdx,%rcx |
| 1345 | movq 192(%rdi),%rdx |
| 1346 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1347 | movq %rax,8(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1348 | mulq 8(%rdi) |
| 1349 | add %rax,%rsi |
| 1350 | adc %rdx,%rcx |
| 1351 | movq 160(%rdi),%rax |
| 1352 | mulq 0(%rdi) |
| 1353 | add %rax,%rsi |
| 1354 | adc %rdx,%rcx |
| 1355 | movq 160(%rdi),%rax |
| 1356 | mulq 8(%rdi) |
| 1357 | mov %rax,%r8 |
| 1358 | mov %rdx,%r9 |
| 1359 | movq 160(%rdi),%rax |
| 1360 | mulq 16(%rdi) |
| 1361 | mov %rax,%r10 |
| 1362 | mov %rdx,%r11 |
| 1363 | movq 160(%rdi),%rax |
| 1364 | mulq 24(%rdi) |
| 1365 | mov %rax,%r12 |
| 1366 | mov %rdx,%r13 |
| 1367 | movq 160(%rdi),%rax |
| 1368 | mulq 32(%rdi) |
| 1369 | mov %rax,%r14 |
| 1370 | mov %rdx,%r15 |
| 1371 | movq 168(%rdi),%rax |
| 1372 | mulq 0(%rdi) |
| 1373 | add %rax,%r8 |
| 1374 | adc %rdx,%r9 |
| 1375 | movq 168(%rdi),%rax |
| 1376 | mulq 8(%rdi) |
| 1377 | add %rax,%r10 |
| 1378 | adc %rdx,%r11 |
| 1379 | movq 168(%rdi),%rax |
| 1380 | mulq 16(%rdi) |
| 1381 | add %rax,%r12 |
| 1382 | adc %rdx,%r13 |
| 1383 | movq 168(%rdi),%rax |
| 1384 | mulq 24(%rdi) |
| 1385 | add %rax,%r14 |
| 1386 | adc %rdx,%r15 |
| 1387 | movq 168(%rdi),%rdx |
| 1388 | imulq $19,%rdx,%rax |
| 1389 | mulq 32(%rdi) |
| 1390 | add %rax,%rsi |
| 1391 | adc %rdx,%rcx |
| 1392 | movq 176(%rdi),%rax |
| 1393 | mulq 0(%rdi) |
| 1394 | add %rax,%r10 |
| 1395 | adc %rdx,%r11 |
| 1396 | movq 176(%rdi),%rax |
| 1397 | mulq 8(%rdi) |
| 1398 | add %rax,%r12 |
| 1399 | adc %rdx,%r13 |
| 1400 | movq 176(%rdi),%rax |
| 1401 | mulq 16(%rdi) |
| 1402 | add %rax,%r14 |
| 1403 | adc %rdx,%r15 |
| 1404 | movq 176(%rdi),%rdx |
| 1405 | imulq $19,%rdx,%rax |
| 1406 | mulq 24(%rdi) |
| 1407 | add %rax,%rsi |
| 1408 | adc %rdx,%rcx |
| 1409 | movq 176(%rdi),%rdx |
| 1410 | imulq $19,%rdx,%rax |
| 1411 | mulq 32(%rdi) |
| 1412 | add %rax,%r8 |
| 1413 | adc %rdx,%r9 |
| 1414 | movq 184(%rdi),%rax |
| 1415 | mulq 0(%rdi) |
| 1416 | add %rax,%r12 |
| 1417 | adc %rdx,%r13 |
| 1418 | movq 184(%rdi),%rax |
| 1419 | mulq 8(%rdi) |
| 1420 | add %rax,%r14 |
| 1421 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1422 | movq 0(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1423 | mulq 24(%rdi) |
| 1424 | add %rax,%r8 |
| 1425 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1426 | movq 0(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1427 | mulq 32(%rdi) |
| 1428 | add %rax,%r10 |
| 1429 | adc %rdx,%r11 |
| 1430 | movq 192(%rdi),%rax |
| 1431 | mulq 0(%rdi) |
| 1432 | add %rax,%r14 |
| 1433 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1434 | movq 8(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1435 | mulq 16(%rdi) |
| 1436 | add %rax,%r8 |
| 1437 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1438 | movq 8(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1439 | mulq 24(%rdi) |
| 1440 | add %rax,%r10 |
| 1441 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1442 | movq 8(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1443 | mulq 32(%rdi) |
| 1444 | add %rax,%r12 |
| 1445 | adc %rdx,%r13 |
| 1446 | movq x25519_x86_64_REDMASK51(%rip),%rdx |
| 1447 | shld $13,%rsi,%rcx |
| 1448 | and %rdx,%rsi |
| 1449 | shld $13,%r8,%r9 |
| 1450 | and %rdx,%r8 |
| 1451 | add %rcx,%r8 |
| 1452 | shld $13,%r10,%r11 |
| 1453 | and %rdx,%r10 |
| 1454 | add %r9,%r10 |
| 1455 | shld $13,%r12,%r13 |
| 1456 | and %rdx,%r12 |
| 1457 | add %r11,%r12 |
| 1458 | shld $13,%r14,%r15 |
| 1459 | and %rdx,%r14 |
| 1460 | add %r13,%r14 |
| 1461 | imulq $19,%r15,%rcx |
| 1462 | add %rcx,%rsi |
| 1463 | mov %rsi,%rcx |
| 1464 | shr $51,%rcx |
| 1465 | add %r8,%rcx |
| 1466 | mov %rcx,%r8 |
| 1467 | shr $51,%rcx |
| 1468 | and %rdx,%rsi |
| 1469 | add %r10,%rcx |
| 1470 | mov %rcx,%r9 |
| 1471 | shr $51,%rcx |
| 1472 | and %rdx,%r8 |
| 1473 | add %r12,%rcx |
| 1474 | mov %rcx,%rax |
| 1475 | shr $51,%rcx |
| 1476 | and %rdx,%r9 |
| 1477 | add %r14,%rcx |
| 1478 | mov %rcx,%r10 |
| 1479 | shr $51,%rcx |
| 1480 | and %rdx,%rax |
| 1481 | imulq $19,%rcx,%rcx |
| 1482 | add %rcx,%rsi |
| 1483 | and %rdx,%r10 |
| 1484 | movq %rsi,160(%rdi) |
| 1485 | movq %r8,168(%rdi) |
| 1486 | movq %r9,176(%rdi) |
| 1487 | movq %rax,184(%rdi) |
| 1488 | movq %r10,192(%rdi) |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1489 | movq 144(%rsp),%rsi |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1490 | imulq $19,%rsi,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1491 | movq %rax,0(%rsp) |
| 1492 | mulq 96(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1493 | mov %rax,%rsi |
| 1494 | mov %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1495 | movq 152(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1496 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1497 | movq %rax,8(%rsp) |
| 1498 | mulq 88(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1499 | add %rax,%rsi |
| 1500 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1501 | movq 120(%rsp),%rax |
| 1502 | mulq 80(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1503 | add %rax,%rsi |
| 1504 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1505 | movq 120(%rsp),%rax |
| 1506 | mulq 88(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1507 | mov %rax,%r8 |
| 1508 | mov %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1509 | movq 120(%rsp),%rax |
| 1510 | mulq 96(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1511 | mov %rax,%r10 |
| 1512 | mov %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1513 | movq 120(%rsp),%rax |
| 1514 | mulq 104(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1515 | mov %rax,%r12 |
| 1516 | mov %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1517 | movq 120(%rsp),%rax |
| 1518 | mulq 112(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1519 | mov %rax,%r14 |
| 1520 | mov %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1521 | movq 128(%rsp),%rax |
| 1522 | mulq 80(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1523 | add %rax,%r8 |
| 1524 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1525 | movq 128(%rsp),%rax |
| 1526 | mulq 88(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1527 | add %rax,%r10 |
| 1528 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1529 | movq 128(%rsp),%rax |
| 1530 | mulq 96(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1531 | add %rax,%r12 |
| 1532 | adc %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1533 | movq 128(%rsp),%rax |
| 1534 | mulq 104(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1535 | add %rax,%r14 |
| 1536 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1537 | movq 128(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1538 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1539 | mulq 112(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1540 | add %rax,%rsi |
| 1541 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1542 | movq 136(%rsp),%rax |
| 1543 | mulq 80(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1544 | add %rax,%r10 |
| 1545 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1546 | movq 136(%rsp),%rax |
| 1547 | mulq 88(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1548 | add %rax,%r12 |
| 1549 | adc %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1550 | movq 136(%rsp),%rax |
| 1551 | mulq 96(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1552 | add %rax,%r14 |
| 1553 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1554 | movq 136(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1555 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1556 | mulq 104(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1557 | add %rax,%rsi |
| 1558 | adc %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1559 | movq 136(%rsp),%rdx |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1560 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1561 | mulq 112(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1562 | add %rax,%r8 |
| 1563 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1564 | movq 144(%rsp),%rax |
| 1565 | mulq 80(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1566 | add %rax,%r12 |
| 1567 | adc %rdx,%r13 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1568 | movq 144(%rsp),%rax |
| 1569 | mulq 88(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1570 | add %rax,%r14 |
| 1571 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1572 | movq 0(%rsp),%rax |
| 1573 | mulq 104(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1574 | add %rax,%r8 |
| 1575 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1576 | movq 0(%rsp),%rax |
| 1577 | mulq 112(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1578 | add %rax,%r10 |
| 1579 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1580 | movq 152(%rsp),%rax |
| 1581 | mulq 80(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1582 | add %rax,%r14 |
| 1583 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1584 | movq 8(%rsp),%rax |
| 1585 | mulq 96(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1586 | add %rax,%r8 |
| 1587 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1588 | movq 8(%rsp),%rax |
| 1589 | mulq 104(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1590 | add %rax,%r10 |
| 1591 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1592 | movq 8(%rsp),%rax |
| 1593 | mulq 112(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1594 | add %rax,%r12 |
| 1595 | adc %rdx,%r13 |
| 1596 | movq x25519_x86_64_REDMASK51(%rip),%rdx |
| 1597 | shld $13,%rsi,%rcx |
| 1598 | and %rdx,%rsi |
| 1599 | shld $13,%r8,%r9 |
| 1600 | and %rdx,%r8 |
| 1601 | add %rcx,%r8 |
| 1602 | shld $13,%r10,%r11 |
| 1603 | and %rdx,%r10 |
| 1604 | add %r9,%r10 |
| 1605 | shld $13,%r12,%r13 |
| 1606 | and %rdx,%r12 |
| 1607 | add %r11,%r12 |
| 1608 | shld $13,%r14,%r15 |
| 1609 | and %rdx,%r14 |
| 1610 | add %r13,%r14 |
| 1611 | imulq $19,%r15,%rcx |
| 1612 | add %rcx,%rsi |
| 1613 | mov %rsi,%rcx |
| 1614 | shr $51,%rcx |
| 1615 | add %r8,%rcx |
| 1616 | mov %rcx,%r8 |
| 1617 | shr $51,%rcx |
| 1618 | and %rdx,%rsi |
| 1619 | add %r10,%rcx |
| 1620 | mov %rcx,%r9 |
| 1621 | shr $51,%rcx |
| 1622 | and %rdx,%r8 |
| 1623 | add %r12,%rcx |
| 1624 | mov %rcx,%rax |
| 1625 | shr $51,%rcx |
| 1626 | and %rdx,%r9 |
| 1627 | add %r14,%rcx |
| 1628 | mov %rcx,%r10 |
| 1629 | shr $51,%rcx |
| 1630 | and %rdx,%rax |
| 1631 | imulq $19,%rcx,%rcx |
| 1632 | add %rcx,%rsi |
| 1633 | and %rdx,%r10 |
| 1634 | movq %rsi,40(%rdi) |
| 1635 | movq %r8,48(%rdi) |
| 1636 | movq %r9,56(%rdi) |
| 1637 | movq %rax,64(%rdi) |
| 1638 | movq %r10,72(%rdi) |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1639 | movq 160(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1640 | mulq x25519_x86_64_121666_213(%rip) |
| 1641 | shr $13,%rax |
| 1642 | mov %rax,%rsi |
| 1643 | mov %rdx,%rcx |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1644 | movq 168(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1645 | mulq x25519_x86_64_121666_213(%rip) |
| 1646 | shr $13,%rax |
| 1647 | add %rax,%rcx |
| 1648 | mov %rdx,%r8 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1649 | movq 176(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1650 | mulq x25519_x86_64_121666_213(%rip) |
| 1651 | shr $13,%rax |
| 1652 | add %rax,%r8 |
| 1653 | mov %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1654 | movq 184(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1655 | mulq x25519_x86_64_121666_213(%rip) |
| 1656 | shr $13,%rax |
| 1657 | add %rax,%r9 |
| 1658 | mov %rdx,%r10 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1659 | movq 192(%rsp),%rax |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1660 | mulq x25519_x86_64_121666_213(%rip) |
| 1661 | shr $13,%rax |
| 1662 | add %rax,%r10 |
| 1663 | imulq $19,%rdx,%rdx |
| 1664 | add %rdx,%rsi |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1665 | addq 80(%rsp),%rsi |
| 1666 | addq 88(%rsp),%rcx |
| 1667 | addq 96(%rsp),%r8 |
| 1668 | addq 104(%rsp),%r9 |
| 1669 | addq 112(%rsp),%r10 |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1670 | movq %rsi,80(%rdi) |
| 1671 | movq %rcx,88(%rdi) |
| 1672 | movq %r8,96(%rdi) |
| 1673 | movq %r9,104(%rdi) |
| 1674 | movq %r10,112(%rdi) |
| 1675 | movq 104(%rdi),%rsi |
| 1676 | imulq $19,%rsi,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1677 | movq %rax,0(%rsp) |
| 1678 | mulq 176(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1679 | mov %rax,%rsi |
| 1680 | mov %rdx,%rcx |
| 1681 | movq 112(%rdi),%rdx |
| 1682 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1683 | movq %rax,8(%rsp) |
| 1684 | mulq 168(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1685 | add %rax,%rsi |
| 1686 | adc %rdx,%rcx |
| 1687 | movq 80(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1688 | mulq 160(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1689 | add %rax,%rsi |
| 1690 | adc %rdx,%rcx |
| 1691 | movq 80(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1692 | mulq 168(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1693 | mov %rax,%r8 |
| 1694 | mov %rdx,%r9 |
| 1695 | movq 80(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1696 | mulq 176(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1697 | mov %rax,%r10 |
| 1698 | mov %rdx,%r11 |
| 1699 | movq 80(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1700 | mulq 184(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1701 | mov %rax,%r12 |
| 1702 | mov %rdx,%r13 |
| 1703 | movq 80(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1704 | mulq 192(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1705 | mov %rax,%r14 |
| 1706 | mov %rdx,%r15 |
| 1707 | movq 88(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1708 | mulq 160(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1709 | add %rax,%r8 |
| 1710 | adc %rdx,%r9 |
| 1711 | movq 88(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1712 | mulq 168(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1713 | add %rax,%r10 |
| 1714 | adc %rdx,%r11 |
| 1715 | movq 88(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1716 | mulq 176(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1717 | add %rax,%r12 |
| 1718 | adc %rdx,%r13 |
| 1719 | movq 88(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1720 | mulq 184(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1721 | add %rax,%r14 |
| 1722 | adc %rdx,%r15 |
| 1723 | movq 88(%rdi),%rdx |
| 1724 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1725 | mulq 192(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1726 | add %rax,%rsi |
| 1727 | adc %rdx,%rcx |
| 1728 | movq 96(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1729 | mulq 160(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1730 | add %rax,%r10 |
| 1731 | adc %rdx,%r11 |
| 1732 | movq 96(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1733 | mulq 168(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1734 | add %rax,%r12 |
| 1735 | adc %rdx,%r13 |
| 1736 | movq 96(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1737 | mulq 176(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1738 | add %rax,%r14 |
| 1739 | adc %rdx,%r15 |
| 1740 | movq 96(%rdi),%rdx |
| 1741 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1742 | mulq 184(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1743 | add %rax,%rsi |
| 1744 | adc %rdx,%rcx |
| 1745 | movq 96(%rdi),%rdx |
| 1746 | imulq $19,%rdx,%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1747 | mulq 192(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1748 | add %rax,%r8 |
| 1749 | adc %rdx,%r9 |
| 1750 | movq 104(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1751 | mulq 160(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1752 | add %rax,%r12 |
| 1753 | adc %rdx,%r13 |
| 1754 | movq 104(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1755 | mulq 168(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1756 | add %rax,%r14 |
| 1757 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1758 | movq 0(%rsp),%rax |
| 1759 | mulq 184(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1760 | add %rax,%r8 |
| 1761 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1762 | movq 0(%rsp),%rax |
| 1763 | mulq 192(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1764 | add %rax,%r10 |
| 1765 | adc %rdx,%r11 |
| 1766 | movq 112(%rdi),%rax |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1767 | mulq 160(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1768 | add %rax,%r14 |
| 1769 | adc %rdx,%r15 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1770 | movq 8(%rsp),%rax |
| 1771 | mulq 176(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1772 | add %rax,%r8 |
| 1773 | adc %rdx,%r9 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1774 | movq 8(%rsp),%rax |
| 1775 | mulq 184(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1776 | add %rax,%r10 |
| 1777 | adc %rdx,%r11 |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1778 | movq 8(%rsp),%rax |
| 1779 | mulq 192(%rsp) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1780 | add %rax,%r12 |
| 1781 | adc %rdx,%r13 |
| 1782 | movq x25519_x86_64_REDMASK51(%rip),%rdx |
| 1783 | shld $13,%rsi,%rcx |
| 1784 | and %rdx,%rsi |
| 1785 | shld $13,%r8,%r9 |
| 1786 | and %rdx,%r8 |
| 1787 | add %rcx,%r8 |
| 1788 | shld $13,%r10,%r11 |
| 1789 | and %rdx,%r10 |
| 1790 | add %r9,%r10 |
| 1791 | shld $13,%r12,%r13 |
| 1792 | and %rdx,%r12 |
| 1793 | add %r11,%r12 |
| 1794 | shld $13,%r14,%r15 |
| 1795 | and %rdx,%r14 |
| 1796 | add %r13,%r14 |
| 1797 | imulq $19,%r15,%rcx |
| 1798 | add %rcx,%rsi |
| 1799 | mov %rsi,%rcx |
| 1800 | shr $51,%rcx |
| 1801 | add %r8,%rcx |
| 1802 | mov %rcx,%r8 |
| 1803 | shr $51,%rcx |
| 1804 | and %rdx,%rsi |
| 1805 | add %r10,%rcx |
| 1806 | mov %rcx,%r9 |
| 1807 | shr $51,%rcx |
| 1808 | and %rdx,%r8 |
| 1809 | add %r12,%rcx |
| 1810 | mov %rcx,%rax |
| 1811 | shr $51,%rcx |
| 1812 | and %rdx,%r9 |
| 1813 | add %r14,%rcx |
| 1814 | mov %rcx,%r10 |
| 1815 | shr $51,%rcx |
| 1816 | and %rdx,%rax |
| 1817 | imulq $19,%rcx,%rcx |
| 1818 | add %rcx,%rsi |
| 1819 | and %rdx,%r10 |
| 1820 | movq %rsi,80(%rdi) |
| 1821 | movq %r8,88(%rdi) |
| 1822 | movq %r9,96(%rdi) |
| 1823 | movq %rax,104(%rdi) |
| 1824 | movq %r10,112(%rdi) |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1825 | movq 296(%rsp),%r12 |
| 1826 | movq 304(%rsp),%r13 |
| 1827 | movq 312(%rsp),%r14 |
| 1828 | movq 320(%rsp),%r15 |
| 1829 | movq 328(%rsp),%rbx |
| 1830 | movq 336(%rsp),%rbp |
| 1831 | add $344,%rsp |
| 1832 | .cfi_adjust_cfa_offset -344 |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1833 | ret |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1834 | .cfi_endproc |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1835 | |
| 1836 | .p2align 5 |
| 1837 | .globl C_ABI(x25519_x86_64_work_cswap) |
| 1838 | HIDDEN C_ABI(x25519_x86_64_work_cswap) |
| 1839 | C_ABI(x25519_x86_64_work_cswap): |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1840 | .cfi_startproc |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1841 | cmp $1,%rsi |
| 1842 | movq 0(%rdi),%rsi |
| 1843 | movq 80(%rdi),%rdx |
| 1844 | movq 8(%rdi),%rcx |
| 1845 | movq 88(%rdi),%r8 |
| 1846 | mov %rsi,%r9 |
| 1847 | cmove %rdx,%rsi |
| 1848 | cmove %r9,%rdx |
| 1849 | mov %rcx,%r9 |
| 1850 | cmove %r8,%rcx |
| 1851 | cmove %r9,%r8 |
| 1852 | movq %rsi,0(%rdi) |
| 1853 | movq %rdx,80(%rdi) |
| 1854 | movq %rcx,8(%rdi) |
| 1855 | movq %r8,88(%rdi) |
| 1856 | movq 16(%rdi),%rsi |
| 1857 | movq 96(%rdi),%rdx |
| 1858 | movq 24(%rdi),%rcx |
| 1859 | movq 104(%rdi),%r8 |
| 1860 | mov %rsi,%r9 |
| 1861 | cmove %rdx,%rsi |
| 1862 | cmove %r9,%rdx |
| 1863 | mov %rcx,%r9 |
| 1864 | cmove %r8,%rcx |
| 1865 | cmove %r9,%r8 |
| 1866 | movq %rsi,16(%rdi) |
| 1867 | movq %rdx,96(%rdi) |
| 1868 | movq %rcx,24(%rdi) |
| 1869 | movq %r8,104(%rdi) |
| 1870 | movq 32(%rdi),%rsi |
| 1871 | movq 112(%rdi),%rdx |
| 1872 | movq 40(%rdi),%rcx |
| 1873 | movq 120(%rdi),%r8 |
| 1874 | mov %rsi,%r9 |
| 1875 | cmove %rdx,%rsi |
| 1876 | cmove %r9,%rdx |
| 1877 | mov %rcx,%r9 |
| 1878 | cmove %r8,%rcx |
| 1879 | cmove %r9,%r8 |
| 1880 | movq %rsi,32(%rdi) |
| 1881 | movq %rdx,112(%rdi) |
| 1882 | movq %rcx,40(%rdi) |
| 1883 | movq %r8,120(%rdi) |
| 1884 | movq 48(%rdi),%rsi |
| 1885 | movq 128(%rdi),%rdx |
| 1886 | movq 56(%rdi),%rcx |
| 1887 | movq 136(%rdi),%r8 |
| 1888 | mov %rsi,%r9 |
| 1889 | cmove %rdx,%rsi |
| 1890 | cmove %r9,%rdx |
| 1891 | mov %rcx,%r9 |
| 1892 | cmove %r8,%rcx |
| 1893 | cmove %r9,%r8 |
| 1894 | movq %rsi,48(%rdi) |
| 1895 | movq %rdx,128(%rdi) |
| 1896 | movq %rcx,56(%rdi) |
| 1897 | movq %r8,136(%rdi) |
| 1898 | movq 64(%rdi),%rsi |
| 1899 | movq 144(%rdi),%rdx |
| 1900 | movq 72(%rdi),%rcx |
| 1901 | movq 152(%rdi),%r8 |
| 1902 | mov %rsi,%r9 |
| 1903 | cmove %rdx,%rsi |
| 1904 | cmove %r9,%rdx |
| 1905 | mov %rcx,%r9 |
| 1906 | cmove %r8,%rcx |
| 1907 | cmove %r9,%r8 |
| 1908 | movq %rsi,64(%rdi) |
| 1909 | movq %rdx,144(%rdi) |
| 1910 | movq %rcx,72(%rdi) |
| 1911 | movq %r8,152(%rdi) |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1912 | mov %rdi,%rax |
| 1913 | mov %rsi,%rdx |
| 1914 | ret |
Robert Sloan | 4d1ac50 | 2017-02-06 08:36:14 -0800 | [diff] [blame] | 1915 | .cfi_endproc |
David Benjamin | 4969cc9 | 2016-04-22 15:02:23 -0400 | [diff] [blame] | 1916 | |
| 1917 | #endif /* __x86_64__ */ |
| 1918 | #endif /* !OPENSSL_NO_ASM */ |