diff options
author | jkim <jkim@FreeBSD.org> | 2016-05-03 18:50:10 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2016-05-03 18:50:10 +0000 |
commit | 00a878d06ed0d3bdfbf6339ef29f6cc94fd47ced (patch) | |
tree | 64905eaaef6c163463b7acbaca1a9724913735f5 /secure/lib/libcrypto/i386 | |
parent | c052df1347dcbd00de507acf0cfa03733e795db5 (diff) | |
parent | acb827e3083196de4c00b67ac9ae3bf860ffd4a9 (diff) | |
download | FreeBSD-src-00a878d06ed0d3bdfbf6339ef29f6cc94fd47ced.zip FreeBSD-src-00a878d06ed0d3bdfbf6339ef29f6cc94fd47ced.tar.gz |
Merge OpenSSL 1.0.2h.
Relnotes: yes
Diffstat (limited to 'secure/lib/libcrypto/i386')
-rw-r--r-- | secure/lib/libcrypto/i386/x86-mont.s | 78 |
1 files changed, 43 insertions, 35 deletions
diff --git a/secure/lib/libcrypto/i386/x86-mont.s b/secure/lib/libcrypto/i386/x86-mont.s index 26f84f8..948e853 100644 --- a/secure/lib/libcrypto/i386/x86-mont.s +++ b/secure/lib/libcrypto/i386/x86-mont.s @@ -30,6 +30,14 @@ bn_mul_mont: xorl $2048,%edx subl %edx,%esp andl $-64,%esp + movl %ebp,%eax + subl %esp,%eax + andl $-4096,%eax +.L001page_walk: + movl (%esp,%eax,1),%edx + subl $4096,%eax +.byte 46 + jnc .L001page_walk movl (%esi),%eax movl 4(%esi),%ebx movl 8(%esi),%ecx @@ -45,7 +53,7 @@ bn_mul_mont: movl %ebp,24(%esp) leal OPENSSL_ia32cap_P,%eax btl $26,(%eax) - jnc .L001non_sse2 + jnc .L002non_sse2 movl $-1,%eax movd %eax,%mm7 movl 8(%esp),%esi @@ -69,7 +77,7 @@ bn_mul_mont: psrlq $32,%mm3 incl %ecx .align 16 -.L0021st: +.L0031st: pmuludq %mm4,%mm0 pmuludq %mm5,%mm1 paddq %mm0,%mm2 @@ -84,7 +92,7 @@ bn_mul_mont: psrlq $32,%mm3 leal 1(%ecx),%ecx cmpl %ebx,%ecx - jl .L0021st + jl .L0031st pmuludq %mm4,%mm0 pmuludq %mm5,%mm1 paddq %mm0,%mm2 @@ -98,7 +106,7 @@ bn_mul_mont: paddq %mm2,%mm3 movq %mm3,32(%esp,%ebx,4) incl %edx -.L003outer: +.L004outer: xorl %ecx,%ecx movd (%edi,%edx,4),%mm4 movd (%esi),%mm5 @@ -120,7 +128,7 @@ bn_mul_mont: paddq %mm6,%mm2 incl %ecx decl %ebx -.L004inner: +.L005inner: pmuludq %mm4,%mm0 pmuludq %mm5,%mm1 paddq %mm0,%mm2 @@ -137,7 +145,7 @@ bn_mul_mont: paddq %mm6,%mm2 decl %ebx leal 1(%ecx),%ecx - jnz .L004inner + jnz .L005inner movl %ecx,%ebx pmuludq %mm4,%mm0 pmuludq %mm5,%mm1 @@ -155,11 +163,11 @@ bn_mul_mont: movq %mm3,32(%esp,%ebx,4) leal 1(%edx),%edx cmpl %ebx,%edx - jle .L003outer + jle .L004outer emms - jmp .L005common_tail + jmp .L006common_tail .align 16 -.L001non_sse2: +.L002non_sse2: movl 8(%esp),%esi leal 1(%ebx),%ebp movl 12(%esp),%edi @@ -170,12 +178,12 @@ bn_mul_mont: leal 4(%edi,%ebx,4),%eax orl %edx,%ebp movl (%edi),%edi - jz .L006bn_sqr_mont + jz .L007bn_sqr_mont movl %eax,28(%esp) movl (%esi),%eax xorl %edx,%edx .align 16 -.L007mull: +.L008mull: movl %edx,%ebp mull %edi addl %eax,%ebp @@ -184,7 +192,7 @@ bn_mul_mont: movl (%esi,%ecx,4),%eax cmpl %ebx,%ecx movl %ebp,28(%esp,%ecx,4) - jl .L007mull + jl .L008mull movl %edx,%ebp mull %edi movl 20(%esp),%edi @@ -202,9 +210,9 @@ bn_mul_mont: movl 4(%esi),%eax adcl $0,%edx incl %ecx - jmp .L0082ndmadd + jmp .L0092ndmadd .align 16 -.L0091stmadd: +.L0101stmadd: movl %edx,%ebp mull %edi addl 32(%esp,%ecx,4),%ebp @@ -215,7 +223,7 @@ bn_mul_mont: adcl $0,%edx cmpl %ebx,%ecx movl %ebp,28(%esp,%ecx,4) - jl .L0091stmadd + jl .L0101stmadd movl %edx,%ebp mull %edi addl 32(%esp,%ebx,4),%eax @@ -238,7 +246,7 @@ bn_mul_mont: adcl $0,%edx movl $1,%ecx .align 16 -.L0082ndmadd: +.L0092ndmadd: movl %edx,%ebp mull %edi addl 32(%esp,%ecx,4),%ebp @@ -249,7 +257,7 @@ bn_mul_mont: adcl $0,%edx cmpl %ebx,%ecx movl %ebp,24(%esp,%ecx,4) - jl .L0082ndmadd + jl .L0092ndmadd movl %edx,%ebp mull %edi addl 32(%esp,%ebx,4),%ebp @@ -265,16 +273,16 @@ bn_mul_mont: movl %edx,32(%esp,%ebx,4) cmpl 28(%esp),%ecx movl %eax,36(%esp,%ebx,4) - je .L005common_tail + je .L006common_tail movl (%ecx),%edi movl 8(%esp),%esi movl %ecx,12(%esp) xorl %ecx,%ecx xorl %edx,%edx movl (%esi),%eax - jmp .L0091stmadd + jmp .L0101stmadd .align 16 -.L006bn_sqr_mont: +.L007bn_sqr_mont: movl %ebx,(%esp) movl %ecx,12(%esp) movl %edi,%eax @@ -285,7 +293,7 @@ bn_mul_mont: andl $1,%ebx incl %ecx .align 16 -.L010sqr: +.L011sqr: movl (%esi,%ecx,4),%eax movl %edx,%ebp mull %edi @@ -297,7 +305,7 @@ bn_mul_mont: cmpl (%esp),%ecx movl %eax,%ebx movl %ebp,28(%esp,%ecx,4) - jl .L010sqr + jl .L011sqr movl (%esi,%ecx,4),%eax movl %edx,%ebp mull %edi @@ -321,7 +329,7 @@ bn_mul_mont: movl 4(%esi),%eax movl $1,%ecx .align 16 -.L0113rdmadd: +.L0123rdmadd: movl %edx,%ebp mull %edi addl 32(%esp,%ecx,4),%ebp @@ -340,7 +348,7 @@ bn_mul_mont: adcl $0,%edx cmpl %ebx,%ecx movl %ebp,24(%esp,%ecx,4) - jl .L0113rdmadd + jl .L0123rdmadd movl %edx,%ebp mull %edi addl 32(%esp,%ebx,4),%ebp @@ -356,7 +364,7 @@ bn_mul_mont: movl %edx,32(%esp,%ebx,4) cmpl %ebx,%ecx movl %eax,36(%esp,%ebx,4) - je .L005common_tail + je .L006common_tail movl 4(%esi,%ecx,4),%edi leal 1(%ecx),%ecx movl %edi,%eax @@ -368,12 +376,12 @@ bn_mul_mont: xorl %ebp,%ebp cmpl %ebx,%ecx leal 1(%ecx),%ecx - je .L012sqrlast + je .L013sqrlast movl %edx,%ebx shrl $1,%edx andl $1,%ebx .align 16 -.L013sqradd: +.L014sqradd: movl (%esi,%ecx,4),%eax movl %edx,%ebp mull %edi @@ -389,13 +397,13 @@ bn_mul_mont: cmpl (%esp),%ecx movl %ebp,28(%esp,%ecx,4) movl %eax,%ebx - jle .L013sqradd + jle .L014sqradd movl %edx,%ebp addl %edx,%edx shrl $31,%ebp addl %ebx,%edx adcl $0,%ebp -.L012sqrlast: +.L013sqrlast: movl 20(%esp),%edi movl 16(%esp),%esi imull 32(%esp),%edi @@ -410,9 +418,9 @@ bn_mul_mont: adcl $0,%edx movl $1,%ecx movl 4(%esi),%eax - jmp .L0113rdmadd + jmp .L0123rdmadd .align 16 -.L005common_tail: +.L006common_tail: movl 16(%esp),%ebp movl 4(%esp),%edi leal 32(%esp),%esi @@ -420,13 +428,13 @@ bn_mul_mont: movl %ebx,%ecx xorl %edx,%edx .align 16 -.L014sub: +.L015sub: sbbl (%ebp,%edx,4),%eax movl %eax,(%edi,%edx,4) decl %ecx movl 4(%esi,%edx,4),%eax leal 1(%edx),%edx - jge .L014sub + jge .L015sub sbbl $0,%eax andl %eax,%esi notl %eax @@ -434,12 +442,12 @@ bn_mul_mont: andl %eax,%ebp orl %ebp,%esi .align 16 -.L015copy: +.L016copy: movl (%esi,%ebx,4),%eax movl %eax,(%edi,%ebx,4) movl %ecx,32(%esp,%ebx,4) decl %ebx - jge .L015copy + jge .L016copy movl 24(%esp),%esp movl $1,%eax .L000just_leave: |