-rw-r--r-- 6415 lib25519-20240928/crypto_multiscalar/ed25519/amd64-maax-opt/ge25519_p1p1_to_p2.S raw
#include "crypto_asm_hidden.h" // linker define ge25519_p1p1_to_p2 // linker use mask63 #define mask63 CRYPTO_SHARED_NAMESPACE(mask63) .p2align 5 ASM_HIDDEN _CRYPTO_SHARED_NAMESPACE(ge25519_p1p1_to_p2) .globl _CRYPTO_SHARED_NAMESPACE(ge25519_p1p1_to_p2) ASM_HIDDEN CRYPTO_SHARED_NAMESPACE(ge25519_p1p1_to_p2) .globl CRYPTO_SHARED_NAMESPACE(ge25519_p1p1_to_p2) _CRYPTO_SHARED_NAMESPACE(ge25519_p1p1_to_p2): CRYPTO_SHARED_NAMESPACE(ge25519_p1p1_to_p2): movq %rsp,%r11 subq $56,%rsp movq %r11,0(%rsp) movq %r12,8(%rsp) movq %r13,16(%rsp) movq %r14,24(%rsp) movq %r15,32(%rsp) movq %rbx,40(%rsp) movq %rbp,48(%rsp) /* p1p1 to p2 */ // mul xorq %r13,%r13 movq 0(%rsi),%rdx mulx 96(%rsi),%r8,%r9 mulx 104(%rsi),%rcx,%r10 adcx %rcx,%r9 mulx 112(%rsi),%rcx,%r11 adcx %rcx,%r10 mulx 120(%rsi),%rcx,%r12 adcx %rcx,%r11 adcx %r13,%r12 xorq %r14,%r14 movq 8(%rsi),%rdx mulx 96(%rsi),%rcx,%rbp adcx %rcx,%r9 adox %rbp,%r10 mulx 104(%rsi),%rcx,%rbp adcx %rcx,%r10 adox %rbp,%r11 mulx 112(%rsi),%rcx,%rbp adcx %rcx,%r11 adox %rbp,%r12 mulx 120(%rsi),%rcx,%rbp adcx %rcx,%r12 adox %rbp,%r13 adcx %r14,%r13 xorq %r15,%r15 movq 16(%rsi),%rdx mulx 96(%rsi),%rcx,%rbp adcx %rcx,%r10 adox %rbp,%r11 mulx 104(%rsi),%rcx,%rbp adcx %rcx,%r11 adox %rbp,%r12 mulx 112(%rsi),%rcx,%rbp adcx %rcx,%r12 adox %rbp,%r13 mulx 120(%rsi),%rcx,%rbp adcx %rcx,%r13 adox %rbp,%r14 adcx %r15,%r14 xorq %rax,%rax movq 24(%rsi),%rdx mulx 96(%rsi),%rcx,%rbp adcx %rcx,%r11 adox %rbp,%r12 mulx 104(%rsi),%rcx,%rbp adcx %rcx,%r12 adox %rbp,%r13 mulx 112(%rsi),%rcx,%rbp adcx %rcx,%r13 adox %rbp,%r14 mulx 120(%rsi),%rcx,%rbp adcx %rcx,%r14 adox %rbp,%r15 adcx %rax,%r15 xorq %rbp,%rbp movq $38,%rdx mulx %r12,%rax,%r12 adcx %rax,%r8 adox %r12,%r9 mulx %r13,%rcx,%r13 adcx %rcx,%r9 adox %r13,%r10 mulx %r14,%rcx,%r14 adcx %rcx,%r10 adox %r14,%r11 mulx %r15,%rcx,%r15 adcx %rcx,%r11 adox %rbp,%r15 adcx %rbp,%r15 shld $1,%r11,%r15 andq mask63(%rip),%r11 imul $19,%r15,%r15 addq %r15,%r8 adcq $0,%r9 adcq $0,%r10 adcq $0,%r11 movq %r8,0(%rdi) movq %r9,8(%rdi) movq %r10,16(%rdi) movq %r11,24(%rdi) // mul xorq %r13,%r13 movq 32(%rsi),%rdx mulx 64(%rsi),%r8,%r9 mulx 72(%rsi),%rcx,%r10 adcx %rcx,%r9 mulx 80(%rsi),%rcx,%r11 adcx %rcx,%r10 mulx 88(%rsi),%rcx,%r12 adcx %rcx,%r11 adcx %r13,%r12 xorq %r14,%r14 movq 40(%rsi),%rdx mulx 64(%rsi),%rcx,%rbp adcx %rcx,%r9 adox %rbp,%r10 mulx 72(%rsi),%rcx,%rbp adcx %rcx,%r10 adox %rbp,%r11 mulx 80(%rsi),%rcx,%rbp adcx %rcx,%r11 adox %rbp,%r12 mulx 88(%rsi),%rcx,%rbp adcx %rcx,%r12 adox %rbp,%r13 adcx %r14,%r13 xorq %r15,%r15 movq 48(%rsi),%rdx mulx 64(%rsi),%rcx,%rbp adcx %rcx,%r10 adox %rbp,%r11 mulx 72(%rsi),%rcx,%rbp adcx %rcx,%r11 adox %rbp,%r12 mulx 80(%rsi),%rcx,%rbp adcx %rcx,%r12 adox %rbp,%r13 mulx 88(%rsi),%rcx,%rbp adcx %rcx,%r13 adox %rbp,%r14 adcx %r15,%r14 xorq %rax,%rax movq 56(%rsi),%rdx mulx 64(%rsi),%rcx,%rbp adcx %rcx,%r11 adox %rbp,%r12 mulx 72(%rsi),%rcx,%rbp adcx %rcx,%r12 adox %rbp,%r13 mulx 80(%rsi),%rcx,%rbp adcx %rcx,%r13 adox %rbp,%r14 mulx 88(%rsi),%rcx,%rbp adcx %rcx,%r14 adox %rbp,%r15 adcx %rax,%r15 xorq %rbp,%rbp movq $38,%rdx mulx %r12,%rax,%r12 adcx %rax,%r8 adox %r12,%r9 mulx %r13,%rcx,%r13 adcx %rcx,%r9 adox %r13,%r10 mulx %r14,%rcx,%r14 adcx %rcx,%r10 adox %r14,%r11 mulx %r15,%rcx,%r15 adcx %rcx,%r11 adox %rbp,%r15 adcx %rbp,%r15 shld $1,%r11,%r15 andq mask63(%rip),%r11 imul $19,%r15,%r15 addq %r15,%r8 adcq $0,%r9 adcq $0,%r10 adcq $0,%r11 movq %r8,32(%rdi) movq %r9,40(%rdi) movq %r10,48(%rdi) movq %r11,56(%rdi) // mul xorq %r13,%r13 movq 32(%rsi),%rdx mulx 96(%rsi),%r8,%r9 mulx 104(%rsi),%rcx,%r10 adcx %rcx,%r9 mulx 112(%rsi),%rcx,%r11 adcx %rcx,%r10 mulx 120(%rsi),%rcx,%r12 adcx %rcx,%r11 adcx %r13,%r12 xorq %r14,%r14 movq 40(%rsi),%rdx mulx 96(%rsi),%rcx,%rbp adcx %rcx,%r9 adox %rbp,%r10 mulx 104(%rsi),%rcx,%rbp adcx %rcx,%r10 adox %rbp,%r11 mulx 112(%rsi),%rcx,%rbp adcx %rcx,%r11 adox %rbp,%r12 mulx 120(%rsi),%rcx,%rbp adcx %rcx,%r12 adox %rbp,%r13 adcx %r14,%r13 xorq %r15,%r15 movq 48(%rsi),%rdx mulx 96(%rsi),%rcx,%rbp adcx %rcx,%r10 adox %rbp,%r11 mulx 104(%rsi),%rcx,%rbp adcx %rcx,%r11 adox %rbp,%r12 mulx 112(%rsi),%rcx,%rbp adcx %rcx,%r12 adox %rbp,%r13 mulx 120(%rsi),%rcx,%rbp adcx %rcx,%r13 adox %rbp,%r14 adcx %r15,%r14 xorq %rax,%rax movq 56(%rsi),%rdx mulx 96(%rsi),%rcx,%rbp adcx %rcx,%r11 adox %rbp,%r12 mulx 104(%rsi),%rcx,%rbp adcx %rcx,%r12 adox %rbp,%r13 mulx 112(%rsi),%rcx,%rbp adcx %rcx,%r13 adox %rbp,%r14 mulx 120(%rsi),%rcx,%rbp adcx %rcx,%r14 adox %rbp,%r15 adcx %rax,%r15 xorq %rbp,%rbp movq $38,%rdx mulx %r12,%rax,%r12 adcx %rax,%r8 adox %r12,%r9 mulx %r13,%rcx,%r13 adcx %rcx,%r9 adox %r13,%r10 mulx %r14,%rcx,%r14 adcx %rcx,%r10 adox %r14,%r11 mulx %r15,%rcx,%r15 adcx %rcx,%r11 adox %rbp,%r15 adcx %rbp,%r15 shld $1,%r11,%r15 andq mask63(%rip),%r11 imul $19,%r15,%r15 addq %r15,%r8 adcq $0,%r9 adcq $0,%r10 adcq $0,%r11 movq %r8,64(%rdi) movq %r9,72(%rdi) movq %r10,80(%rdi) movq %r11,88(%rdi) movq 0(%rsp),%r11 movq 8(%rsp),%r12 movq 16(%rsp),%r13 movq 24(%rsp),%r14 movq 32(%rsp),%r15 movq 40(%rsp),%rbx movq 48(%rsp),%rbp movq %r11,%rsp ret .section .note.GNU-stack,"",@progbits