From 185229e258f0e6c79a0cc5d0d50e03fe8594eafa Mon Sep 17 00:00:00 2001 From: Shigeki Ohtsu Date: Fri, 3 Nov 2017 00:34:04 +0900 Subject: [PATCH] deps: update openssl asm and asm_obsolete files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Regenerate asm files with Makefile and CC=gcc and ASM=nasm where gcc version was 5.4.0 and nasm version was 2.11.08. Also asm files in asm_obsolete dir to support old compiler and assembler are regenerated without CC and ASM envs. PR-URL: https://github.com/nodejs/node/pull/16691 Reviewed-By: Ben Noordhuis Reviewed-By: Tobias Nießen Reviewed-By: Michael Dawson Reviewed-By: Myles Borins Reviewed-By: Colin Ihrig Reviewed-By: Rod Vagg Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell --- .../openssl/asm/x64-elf-gas/bn/x86_64-mont5.s | 12 +++++++++-- .../asm/x64-elf-gas/ec/ecp_nistz256-x86_64.s | 20 ++++++++----------- deps/openssl/asm/x64-elf-gas/x86_64cpuid.s | 17 +++++++++++++++- .../asm/x64-macosx-gas/bn/x86_64-mont5.s | 12 +++++++++-- .../x64-macosx-gas/ec/ecp_nistz256-x86_64.s | 20 ++++++++----------- deps/openssl/asm/x64-macosx-gas/x86_64cpuid.s | 17 +++++++++++++++- .../asm/x64-win32-masm/bn/x86_64-mont5.asm | 12 +++++++++-- .../x64-win32-masm/ec/ecp_nistz256-x86_64.asm | 20 ++++++++----------- .../asm/x64-win32-masm/x86_64cpuid.asm | 17 +++++++++++++++- .../asm_obsolete/x64-elf-gas/x86_64cpuid.s | 17 +++++++++++++++- .../asm_obsolete/x64-macosx-gas/x86_64cpuid.s | 17 +++++++++++++++- .../x64-win32-masm/x86_64cpuid.asm | 17 +++++++++++++++- 12 files changed, 150 insertions(+), 48 deletions(-) diff --git a/deps/openssl/asm/x64-elf-gas/bn/x86_64-mont5.s b/deps/openssl/asm/x64-elf-gas/bn/x86_64-mont5.s index 7eac91326f6dd5..963fa3efda5ea9 100644 --- a/deps/openssl/asm/x64-elf-gas/bn/x86_64-mont5.s +++ b/deps/openssl/asm/x64-elf-gas/bn/x86_64-mont5.s @@ -3075,11 +3075,19 @@ __bn_sqrx8x_internal: .align 32 .Lsqrx8x_break: - subq 16+8(%rsp),%r8 + xorq %rbp,%rbp + subq 16+8(%rsp),%rbx + adcxq %rbp,%r8 movq 24+8(%rsp),%rcx + adcxq %rbp,%r9 movq 0(%rsi),%rdx - xorl %ebp,%ebp + adcq $0,%r10 movq %r8,0(%rdi) + adcq $0,%r11 + adcq $0,%r12 + adcq $0,%r13 + adcq $0,%r14 + adcq $0,%r15 cmpq %rcx,%rdi je .Lsqrx8x_outer_loop diff --git a/deps/openssl/asm/x64-elf-gas/ec/ecp_nistz256-x86_64.s b/deps/openssl/asm/x64-elf-gas/ec/ecp_nistz256-x86_64.s index 23188cda6e935a..027be89d1e446d 100644 --- a/deps/openssl/asm/x64-elf-gas/ec/ecp_nistz256-x86_64.s +++ b/deps/openssl/asm/x64-elf-gas/ec/ecp_nistz256-x86_64.s @@ -1036,19 +1036,18 @@ __ecp_nistz256_sqr_montx: adoxq %rbp,%r13 .byte 0x67,0x67 mulxq %rdx,%rcx,%rax - movq %r8,%rdx + movq .Lpoly+24(%rip),%rdx adoxq %rcx,%r14 shlxq %rsi,%r8,%rcx adoxq %rax,%r15 shrxq %rsi,%r8,%rax - movq .Lpoly+24(%rip),%rbp + movq %rdx,%rbp addq %rcx,%r9 adcq %rax,%r10 - mulxq %rbp,%rcx,%r8 - movq %r9,%rdx + mulxq %r8,%rcx,%r8 adcq %rcx,%r11 shlxq %rsi,%r9,%rcx adcq $0,%r8 @@ -1058,8 +1057,7 @@ __ecp_nistz256_sqr_montx: addq %rcx,%r10 adcq %rax,%r11 - mulxq %rbp,%rcx,%r9 - movq %r10,%rdx + mulxq %r9,%rcx,%r9 adcq %rcx,%r8 shlxq %rsi,%r10,%rcx adcq $0,%r9 @@ -1069,8 +1067,7 @@ __ecp_nistz256_sqr_montx: addq %rcx,%r11 adcq %rax,%r8 - mulxq %rbp,%rcx,%r10 - movq %r11,%rdx + mulxq %r10,%rcx,%r10 adcq %rcx,%r9 shlxq %rsi,%r11,%rcx adcq $0,%r10 @@ -1080,12 +1077,12 @@ __ecp_nistz256_sqr_montx: addq %rcx,%r8 adcq %rax,%r9 - mulxq %rbp,%rcx,%r11 + mulxq %r11,%rcx,%r11 adcq %rcx,%r10 adcq $0,%r11 xorq %rdx,%rdx - adcq %r8,%r12 + addq %r8,%r12 movq .Lpoly+8(%rip),%rsi adcq %r9,%r13 movq %r12,%r8 @@ -1094,8 +1091,7 @@ __ecp_nistz256_sqr_montx: movq %r13,%r9 adcq $0,%rdx - xorl %eax,%eax - sbbq $-1,%r12 + subq $-1,%r12 movq %r14,%r10 sbbq %rsi,%r13 sbbq $0,%r14 diff --git a/deps/openssl/asm/x64-elf-gas/x86_64cpuid.s b/deps/openssl/asm/x64-elf-gas/x86_64cpuid.s index 06d11dc9c8e95e..86c780b1c5f4b6 100644 --- a/deps/openssl/asm/x64-elf-gas/x86_64cpuid.s +++ b/deps/openssl/asm/x64-elf-gas/x86_64cpuid.s @@ -116,8 +116,19 @@ OPENSSL_ia32_cpuid: orl $0x40000000,%edx andb $15,%ah cmpb $15,%ah - jne .Lnotintel + jne .LnotP4 orl $0x00100000,%edx +.LnotP4: + cmpb $6,%ah + jne .Lnotintel + andl $0x0fff0ff0,%eax + cmpl $0x00050670,%eax + je .Lknights + cmpl $0x00080650,%eax + jne .Lnotintel +.Lknights: + andl $0xfbffffff,%ecx + .Lnotintel: btl $28,%edx jnc .Lgeneric @@ -142,6 +153,10 @@ OPENSSL_ia32_cpuid: movl $7,%eax xorl %ecx,%ecx cpuid + btl $26,%r9d + jc .Lnotknights + andl $0xfff7ffff,%ebx +.Lnotknights: movl %ebx,8(%rdi) .Lno_extended_info: diff --git a/deps/openssl/asm/x64-macosx-gas/bn/x86_64-mont5.s b/deps/openssl/asm/x64-macosx-gas/bn/x86_64-mont5.s index 21416b6f5d720c..0cdcd14f1a493c 100644 --- a/deps/openssl/asm/x64-macosx-gas/bn/x86_64-mont5.s +++ b/deps/openssl/asm/x64-macosx-gas/bn/x86_64-mont5.s @@ -3075,11 +3075,19 @@ L$sqrx8x_loop: .p2align 5 L$sqrx8x_break: - subq 16+8(%rsp),%r8 + xorq %rbp,%rbp + subq 16+8(%rsp),%rbx + adcxq %rbp,%r8 movq 24+8(%rsp),%rcx + adcxq %rbp,%r9 movq 0(%rsi),%rdx - xorl %ebp,%ebp + adcq $0,%r10 movq %r8,0(%rdi) + adcq $0,%r11 + adcq $0,%r12 + adcq $0,%r13 + adcq $0,%r14 + adcq $0,%r15 cmpq %rcx,%rdi je L$sqrx8x_outer_loop diff --git a/deps/openssl/asm/x64-macosx-gas/ec/ecp_nistz256-x86_64.s b/deps/openssl/asm/x64-macosx-gas/ec/ecp_nistz256-x86_64.s index 05b6d5be2c885b..19df69f08afeb9 100644 --- a/deps/openssl/asm/x64-macosx-gas/ec/ecp_nistz256-x86_64.s +++ b/deps/openssl/asm/x64-macosx-gas/ec/ecp_nistz256-x86_64.s @@ -1036,19 +1036,18 @@ __ecp_nistz256_sqr_montx: adoxq %rbp,%r13 .byte 0x67,0x67 mulxq %rdx,%rcx,%rax - movq %r8,%rdx + movq L$poly+24(%rip),%rdx adoxq %rcx,%r14 shlxq %rsi,%r8,%rcx adoxq %rax,%r15 shrxq %rsi,%r8,%rax - movq L$poly+24(%rip),%rbp + movq %rdx,%rbp addq %rcx,%r9 adcq %rax,%r10 - mulxq %rbp,%rcx,%r8 - movq %r9,%rdx + mulxq %r8,%rcx,%r8 adcq %rcx,%r11 shlxq %rsi,%r9,%rcx adcq $0,%r8 @@ -1058,8 +1057,7 @@ __ecp_nistz256_sqr_montx: addq %rcx,%r10 adcq %rax,%r11 - mulxq %rbp,%rcx,%r9 - movq %r10,%rdx + mulxq %r9,%rcx,%r9 adcq %rcx,%r8 shlxq %rsi,%r10,%rcx adcq $0,%r9 @@ -1069,8 +1067,7 @@ __ecp_nistz256_sqr_montx: addq %rcx,%r11 adcq %rax,%r8 - mulxq %rbp,%rcx,%r10 - movq %r11,%rdx + mulxq %r10,%rcx,%r10 adcq %rcx,%r9 shlxq %rsi,%r11,%rcx adcq $0,%r10 @@ -1080,12 +1077,12 @@ __ecp_nistz256_sqr_montx: addq %rcx,%r8 adcq %rax,%r9 - mulxq %rbp,%rcx,%r11 + mulxq %r11,%rcx,%r11 adcq %rcx,%r10 adcq $0,%r11 xorq %rdx,%rdx - adcq %r8,%r12 + addq %r8,%r12 movq L$poly+8(%rip),%rsi adcq %r9,%r13 movq %r12,%r8 @@ -1094,8 +1091,7 @@ __ecp_nistz256_sqr_montx: movq %r13,%r9 adcq $0,%rdx - xorl %eax,%eax - sbbq $-1,%r12 + subq $-1,%r12 movq %r14,%r10 sbbq %rsi,%r13 sbbq $0,%r14 diff --git a/deps/openssl/asm/x64-macosx-gas/x86_64cpuid.s b/deps/openssl/asm/x64-macosx-gas/x86_64cpuid.s index 909270ecae312b..7075cf80d3015b 100644 --- a/deps/openssl/asm/x64-macosx-gas/x86_64cpuid.s +++ b/deps/openssl/asm/x64-macosx-gas/x86_64cpuid.s @@ -117,8 +117,19 @@ L$nocacheinfo: orl $0x40000000,%edx andb $15,%ah cmpb $15,%ah - jne L$notintel + jne L$notP4 orl $0x00100000,%edx +L$notP4: + cmpb $6,%ah + jne L$notintel + andl $0x0fff0ff0,%eax + cmpl $0x00050670,%eax + je L$knights + cmpl $0x00080650,%eax + jne L$notintel +L$knights: + andl $0xfbffffff,%ecx + L$notintel: btl $28,%edx jnc L$generic @@ -143,6 +154,10 @@ L$generic: movl $7,%eax xorl %ecx,%ecx cpuid + btl $26,%r9d + jc L$notknights + andl $0xfff7ffff,%ebx +L$notknights: movl %ebx,8(%rdi) L$no_extended_info: diff --git a/deps/openssl/asm/x64-win32-masm/bn/x86_64-mont5.asm b/deps/openssl/asm/x64-win32-masm/bn/x86_64-mont5.asm index 837b0bcedcd0c6..fb9aaaeabe2a90 100644 --- a/deps/openssl/asm/x64-win32-masm/bn/x86_64-mont5.asm +++ b/deps/openssl/asm/x64-win32-masm/bn/x86_64-mont5.asm @@ -3166,11 +3166,19 @@ DB 067h ALIGN 32 $L$sqrx8x_break:: - sub r8,QWORD PTR[((16+8))+rsp] + xor rbp,rbp + sub rbx,QWORD PTR[((16+8))+rsp] + adcx r8,rbp mov rcx,QWORD PTR[((24+8))+rsp] + adcx r9,rbp mov rdx,QWORD PTR[rsi] - xor ebp,ebp + adc r10,0 mov QWORD PTR[rdi],r8 + adc r11,0 + adc r12,0 + adc r13,0 + adc r14,0 + adc r15,0 cmp rdi,rcx je $L$sqrx8x_outer_loop diff --git a/deps/openssl/asm/x64-win32-masm/ec/ecp_nistz256-x86_64.asm b/deps/openssl/asm/x64-win32-masm/ec/ecp_nistz256-x86_64.asm index 87338aa6f0edae..da36a1c048642e 100644 --- a/deps/openssl/asm/x64-win32-masm/ec/ecp_nistz256-x86_64.asm +++ b/deps/openssl/asm/x64-win32-masm/ec/ecp_nistz256-x86_64.asm @@ -1137,19 +1137,18 @@ DB 067h adox r13,rbp DB 067h,067h mulx rax,rcx,rdx - mov rdx,r8 + mov rdx,QWORD PTR[(($L$poly+24))] adox r14,rcx shlx rcx,r8,rsi adox r15,rax shrx rax,r8,rsi - mov rbp,QWORD PTR[(($L$poly+24))] + mov rbp,rdx add r9,rcx adc r10,rax - mulx r8,rcx,rbp - mov rdx,r9 + mulx r8,rcx,r8 adc r11,rcx shlx rcx,r9,rsi adc r8,0 @@ -1159,8 +1158,7 @@ DB 067h,067h add r10,rcx adc r11,rax - mulx r9,rcx,rbp - mov rdx,r10 + mulx r9,rcx,r9 adc r8,rcx shlx rcx,r10,rsi adc r9,0 @@ -1170,8 +1168,7 @@ DB 067h,067h add r11,rcx adc r8,rax - mulx r10,rcx,rbp - mov rdx,r11 + mulx r10,rcx,r10 adc r9,rcx shlx rcx,r11,rsi adc r10,0 @@ -1181,12 +1178,12 @@ DB 067h,067h add r8,rcx adc r9,rax - mulx r11,rcx,rbp + mulx r11,rcx,r11 adc r10,rcx adc r11,0 xor rdx,rdx - adc r12,r8 + add r12,r8 mov rsi,QWORD PTR[(($L$poly+8))] adc r13,r9 mov r8,r12 @@ -1195,8 +1192,7 @@ DB 067h,067h mov r9,r13 adc rdx,0 - xor eax,eax - sbb r12,-1 + sub r12,-1 mov r10,r14 sbb r13,rsi sbb r14,0 diff --git a/deps/openssl/asm/x64-win32-masm/x86_64cpuid.asm b/deps/openssl/asm/x64-win32-masm/x86_64cpuid.asm index 6cb8077b9da0a5..69532e09fbece5 100644 --- a/deps/openssl/asm/x64-win32-masm/x86_64cpuid.asm +++ b/deps/openssl/asm/x64-win32-masm/x86_64cpuid.asm @@ -127,8 +127,19 @@ $L$nocacheinfo:: or edx,040000000h and ah,15 cmp ah,15 - jne $L$notintel + jne $L$notP4 or edx,000100000h +$L$notP4:: + cmp ah,6 + jne $L$notintel + and eax,00fff0ff0h + cmp eax,000050670h + je $L$knights + cmp eax,000080650h + jne $L$notintel +$L$knights:: + and ecx,0fbffffffh + $L$notintel:: bt edx,28 jnc $L$generic @@ -153,6 +164,10 @@ $L$generic:: mov eax,7 xor ecx,ecx cpuid + bt r9d,26 + jc $L$notknights + and ebx,0fff7ffffh +$L$notknights:: mov DWORD PTR[8+rdi],ebx $L$no_extended_info:: diff --git a/deps/openssl/asm_obsolete/x64-elf-gas/x86_64cpuid.s b/deps/openssl/asm_obsolete/x64-elf-gas/x86_64cpuid.s index 06d11dc9c8e95e..86c780b1c5f4b6 100644 --- a/deps/openssl/asm_obsolete/x64-elf-gas/x86_64cpuid.s +++ b/deps/openssl/asm_obsolete/x64-elf-gas/x86_64cpuid.s @@ -116,8 +116,19 @@ OPENSSL_ia32_cpuid: orl $0x40000000,%edx andb $15,%ah cmpb $15,%ah - jne .Lnotintel + jne .LnotP4 orl $0x00100000,%edx +.LnotP4: + cmpb $6,%ah + jne .Lnotintel + andl $0x0fff0ff0,%eax + cmpl $0x00050670,%eax + je .Lknights + cmpl $0x00080650,%eax + jne .Lnotintel +.Lknights: + andl $0xfbffffff,%ecx + .Lnotintel: btl $28,%edx jnc .Lgeneric @@ -142,6 +153,10 @@ OPENSSL_ia32_cpuid: movl $7,%eax xorl %ecx,%ecx cpuid + btl $26,%r9d + jc .Lnotknights + andl $0xfff7ffff,%ebx +.Lnotknights: movl %ebx,8(%rdi) .Lno_extended_info: diff --git a/deps/openssl/asm_obsolete/x64-macosx-gas/x86_64cpuid.s b/deps/openssl/asm_obsolete/x64-macosx-gas/x86_64cpuid.s index 909270ecae312b..7075cf80d3015b 100644 --- a/deps/openssl/asm_obsolete/x64-macosx-gas/x86_64cpuid.s +++ b/deps/openssl/asm_obsolete/x64-macosx-gas/x86_64cpuid.s @@ -117,8 +117,19 @@ L$nocacheinfo: orl $0x40000000,%edx andb $15,%ah cmpb $15,%ah - jne L$notintel + jne L$notP4 orl $0x00100000,%edx +L$notP4: + cmpb $6,%ah + jne L$notintel + andl $0x0fff0ff0,%eax + cmpl $0x00050670,%eax + je L$knights + cmpl $0x00080650,%eax + jne L$notintel +L$knights: + andl $0xfbffffff,%ecx + L$notintel: btl $28,%edx jnc L$generic @@ -143,6 +154,10 @@ L$generic: movl $7,%eax xorl %ecx,%ecx cpuid + btl $26,%r9d + jc L$notknights + andl $0xfff7ffff,%ebx +L$notknights: movl %ebx,8(%rdi) L$no_extended_info: diff --git a/deps/openssl/asm_obsolete/x64-win32-masm/x86_64cpuid.asm b/deps/openssl/asm_obsolete/x64-win32-masm/x86_64cpuid.asm index 6cb8077b9da0a5..69532e09fbece5 100644 --- a/deps/openssl/asm_obsolete/x64-win32-masm/x86_64cpuid.asm +++ b/deps/openssl/asm_obsolete/x64-win32-masm/x86_64cpuid.asm @@ -127,8 +127,19 @@ $L$nocacheinfo:: or edx,040000000h and ah,15 cmp ah,15 - jne $L$notintel + jne $L$notP4 or edx,000100000h +$L$notP4:: + cmp ah,6 + jne $L$notintel + and eax,00fff0ff0h + cmp eax,000050670h + je $L$knights + cmp eax,000080650h + jne $L$notintel +$L$knights:: + and ecx,0fbffffffh + $L$notintel:: bt edx,28 jnc $L$generic @@ -153,6 +164,10 @@ $L$generic:: mov eax,7 xor ecx,ecx cpuid + bt r9d,26 + jc $L$notknights + and ebx,0fff7ffffh +$L$notknights:: mov DWORD PTR[8+rdi],ebx $L$no_extended_info::