diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-03-20 13:04:46 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-03-20 14:02:31 +0100 |
commit | 1cf6ef7e7f4b8882bd289ec254cd83731a7e11f3 (patch) | |
tree | 9f0bf9a3c504c10223f62a0eb13de429549d984e /src/crypto/curve25519-avx-x86_64.S | |
parent | 233e5b29b1ac39a86c15f0ece862b88965b3901b (diff) |
curve25519: do dispatcher in C instead of asm, since shlx is haswell only
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/curve25519-avx-x86_64.S')
-rw-r--r-- | src/crypto/curve25519-avx-x86_64.S | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/src/crypto/curve25519-avx-x86_64.S b/src/crypto/curve25519-avx-x86_64.S index bc2796d..bd660ef 100644 --- a/src/crypto/curve25519-avx-x86_64.S +++ b/src/crypto/curve25519-avx-x86_64.S @@ -3484,156 +3484,3 @@ ENTRY(curve25519_sandy2x_fe51_invert) popq %rbp ret ENDPROC(curve25519_sandy2x_fe51_invert) - -ENTRY(curve25519_sandy2x) - pushq %rbx - movq %rdi, %rbx - subq $368, %rsp - movq (%rsi), %rax - leaq 128(%rsp), %rdi - movq %rax, (%rsp) - movq 8(%rsi), %rax - andb $-8, (%rsp) - movq %rax, 8(%rsp) - movq 16(%rsi), %rax - movq %rax, 16(%rsp) - movq 24(%rsi), %rax - movq %rdx, %rsi - movq %rax, 24(%rsp) - shrq $56, %rax - andl $127, %eax - orl $64, %eax - movb %al, 31(%rsp) - call curve25519_sandy2x_fe_frombytes - leaq 128(%rsp), %rdi - movq %rsp, %rsi - call curve25519_sandy2x_ladder - movl $26, %eax - shlx %rax, 296(%rsp), %rax - leaq 80(%rsp), %rsi - addq 288(%rsp), %rax - movq %rsi, %rdi - movq %rax, 80(%rsp) - movl $26, %eax - shlx %rax, 312(%rsp), %rax - addq 304(%rsp), %rax - movq %rax, 88(%rsp) - movl $26, %eax - shlx %rax, 328(%rsp), %rax - addq 320(%rsp), %rax - movq %rax, 96(%rsp) - movl $26, %eax - shlx %rax, 344(%rsp), %rax - addq 336(%rsp), %rax - movq %rax, 104(%rsp) - movl $26, %eax - shlx %rax, 360(%rsp), %rax - addq 352(%rsp), %rax - movq %rax, 112(%rsp) - movl $26, %eax - shlx %rax, 216(%rsp), %rax - addq 208(%rsp), %rax - movq %rax, 32(%rsp) - movl $26, %eax - shlx %rax, 232(%rsp), %rax - addq 224(%rsp), %rax - movq %rax, 40(%rsp) - movl $26, %eax - shlx %rax, 248(%rsp), %rax - addq 240(%rsp), %rax - movq %rax, 48(%rsp) - movl $26, %eax - shlx %rax, 264(%rsp), %rax - addq 256(%rsp), %rax - movq %rax, 56(%rsp) - movl $26, %eax - shlx %rax, 280(%rsp), %rax - addq 272(%rsp), %rax - movq %rax, 64(%rsp) - call curve25519_sandy2x_fe51_invert - leaq 32(%rsp), %rsi - leaq 80(%rsp), %rdx - movq %rsi, %rdi - call curve25519_sandy2x_fe51_mul - leaq 32(%rsp), %rsi - movq %rbx, %rdi - call curve25519_sandy2x_fe51_pack - addq $368, %rsp - popq %rbx - ret -ENDPROC(curve25519_sandy2x) - -ENTRY(curve25519_sandy2x_base) - pushq %rbx - movq %rdi, %rbx - subq $368, %rsp - movq (%rsi), %rax - leaq 128(%rsp), %rdi - movq %rax, (%rsp) - movq 8(%rsi), %rax - andb $-8, (%rsp) - movq %rax, 8(%rsp) - movq 16(%rsi), %rax - movq %rax, 16(%rsp) - movq 24(%rsi), %rax - movq %rsp, %rsi - movq %rax, 24(%rsp) - shrq $56, %rax - andl $127, %eax - orl $64, %eax - movb %al, 31(%rsp) - call curve25519_sandy2x_ladder_base - movl $26, %eax - shlx %rax, 216(%rsp), %rax - leaq 80(%rsp), %rsi - addq 208(%rsp), %rax - movq %rsi, %rdi - movq %rax, 80(%rsp) - movl $26, %eax - shlx %rax, 232(%rsp), %rax - addq 224(%rsp), %rax - movq %rax, 88(%rsp) - movl $26, %eax - shlx %rax, 248(%rsp), %rax - addq 240(%rsp), %rax - movq %rax, 96(%rsp) - movl $26, %eax - shlx %rax, 264(%rsp), %rax - addq 256(%rsp), %rax - movq %rax, 104(%rsp) - movl $26, %eax - shlx %rax, 280(%rsp), %rax - addq 272(%rsp), %rax - movq %rax, 112(%rsp) - movl $26, %eax - shlx %rax, 136(%rsp), %rax - addq 128(%rsp), %rax - movq %rax, 32(%rsp) - movl $26, %eax - shlx %rax, 152(%rsp), %rax - addq 144(%rsp), %rax - movq %rax, 40(%rsp) - movl $26, %eax - shlx %rax, 168(%rsp), %rax - addq 160(%rsp), %rax - movq %rax, 48(%rsp) - movl $26, %eax - shlx %rax, 184(%rsp), %rax - addq 176(%rsp), %rax - movq %rax, 56(%rsp) - movl $26, %eax - shlx %rax, 200(%rsp), %rax - addq 192(%rsp), %rax - movq %rax, 64(%rsp) - call curve25519_sandy2x_fe51_invert - leaq 32(%rsp), %rsi - leaq 80(%rsp), %rdx - movq %rsi, %rdi - call curve25519_sandy2x_fe51_mul - leaq 32(%rsp), %rsi - movq %rbx, %rdi - call curve25519_sandy2x_fe51_pack - addq $368, %rsp - popq %rbx - ret -ENDPROC(curve25519_sandy2x_base) |