cat $<.license $@.tmp > $@ && rm -f $@.tmp
echo "" >> $@
echo ".section .note.GNU-stack,\"\",%progbits" >> $@
- sed -i 's/OPENSSL_ia32cap_P/_gnutls_x86_cpuid_s/g' $@
+ sed -i 's/OPENSSL_ia32cap_P/GNUTLS_x86_cpuid_s/g' $@
lib/accelerated/x86/coff/%-x86.s: devel/perlasm/%-x86.pl .submodule.stamp
CC=gcc perl $< coff \
$@.tmp
cat $<.license $@.tmp > $@ && rm -f $@.tmp
echo "" >> $@
- sed -i 's/OPENSSL_ia32cap_P/_gnutls_x86_cpuid_s/g' $@
+ sed -i 's/OPENSSL_ia32cap_P/GNUTLS_x86_cpuid_s/g' $@
lib/accelerated/x86/coff/%-x86_64.s: devel/perlasm/%-x86_64.pl .submodule.stamp
CC=gcc perl $< mingw64 \
$@.tmp
cat $<.license $@.tmp > $@ && rm -f $@.tmp
echo "" >> $@
- sed -i 's/OPENSSL_ia32cap_P/_gnutls_x86_cpuid_s/g' $@
+ sed -i 's/OPENSSL_ia32cap_P/GNUTLS_x86_cpuid_s/g' $@
lib/accelerated/x86/macosx/%.s: devel/perlasm/%.pl .submodule.stamp
CC=gcc perl $< macosx \
$@.tmp
cat $<.license $@.tmp > $@ && rm -f $@.tmp
echo "" >> $@
- sed -i 's/OPENSSL_ia32cap_P/_gnutls_x86_cpuid_s/g' $@
+ sed -i 's/OPENSSL_ia32cap_P/GNUTLS_x86_cpuid_s/g' $@
lib/accelerated/aarch64/elf/%.s: devel/perlasm/%.pl .submodule.stamp
rm -f $@tmp
.L112pic:
popl %ebx
leal .Lkey_const-.L112pic(%ebx),%ebx
- leal __gnutls_x86_cpuid_s,%ebp
+ leal _GNUTLS_x86_cpuid_s,%ebp
movups (%eax),%xmm0
xorps %xmm4,%xmm4
movl 4(%ebp),%ebp
.byte 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
.byte 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
.byte 115,108,46,111,114,103,62,0
-.comm __gnutls_x86_cpuid_s,16
+.comm _GNUTLS_x86_cpuid_s,16
leaq 7(%r8),%r9
movl %r10d,96+12(%rsp)
bswapl %r9d
- movl _gnutls_x86_cpuid_s+4(%rip),%r10d
+ movl GNUTLS_x86_cpuid_s+4(%rip),%r10d
xorl %ebp,%r9d
andl $71303168,%r10d
movl %r9d,112+12(%rsp)
movdqa %xmm5,%xmm14
movdqu 80(%rdi),%xmm7
movdqa %xmm6,%xmm15
- movl _gnutls_x86_cpuid_s+4(%rip),%r9d
+ movl GNUTLS_x86_cpuid_s+4(%rip),%r9d
cmpq $0x70,%rdx
jbe .Lcbc_dec_six_or_seven
movl $268437504,%r10d
movups (%rcx),%xmm0
xorps %xmm4,%xmm4
- andl _gnutls_x86_cpuid_s+4(%rip),%r10d
+ andl GNUTLS_x86_cpuid_s+4(%rip),%r10d
leaq 16(%r8),%rax
cmpl $256,%edx
je .L14rounds
jz .Lodd_tail
movdqu 16(%rdx),%xmm6
- movl _gnutls_x86_cpuid_s+4(%rip),%eax
+ movl GNUTLS_x86_cpuid_s+4(%rip),%eax
cmpq $0x30,%r9
jb .Lskip4x
movq %r8,%rdx
- movl _gnutls_x86_cpuid_s+0(%rip),%r9d
- movl _gnutls_x86_cpuid_s+4(%rip),%r8d
- movl _gnutls_x86_cpuid_s+8(%rip),%r10d
+ movl GNUTLS_x86_cpuid_s+0(%rip),%r9d
+ movl GNUTLS_x86_cpuid_s+4(%rip),%r8d
+ movl GNUTLS_x86_cpuid_s+8(%rip),%r10d
testl $512,%r8d
jz .Lialu
testl $536870912,%r10d
movq %r8,%rdx
- leaq _gnutls_x86_cpuid_s(%rip),%r11
+ leaq GNUTLS_x86_cpuid_s(%rip),%r11
movl 0(%r11),%r9d
movl 4(%r11),%r10d
movl 8(%r11),%r11d
movq %r8,%rdx
- leaq _gnutls_x86_cpuid_s(%rip),%r11
+ leaq GNUTLS_x86_cpuid_s(%rip),%r11
movl 0(%r11),%r9d
movl 4(%r11),%r10d
movl 8(%r11),%r11d
.L112pic:
popl %ebx
leal .Lkey_const-.L112pic(%ebx),%ebx
- leal _gnutls_x86_cpuid_s-.Lkey_const(%ebx),%ebp
+ leal GNUTLS_x86_cpuid_s-.Lkey_const(%ebx),%ebp
movups (%eax),%xmm0
xorps %xmm4,%xmm4
movl 4(%ebp),%ebp
.byte 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
.byte 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
.byte 115,108,46,111,114,103,62,0
-.comm _gnutls_x86_cpuid_s,16,4
+.comm GNUTLS_x86_cpuid_s,16,4
.section .note.GNU-stack,"",%progbits
leaq 7(%r8),%r9
movl %r10d,96+12(%rsp)
bswapl %r9d
- movl _gnutls_x86_cpuid_s+4(%rip),%r10d
+ movl GNUTLS_x86_cpuid_s+4(%rip),%r10d
xorl %ebp,%r9d
andl $71303168,%r10d
movl %r9d,112+12(%rsp)
movdqa %xmm5,%xmm14
movdqu 80(%rdi),%xmm7
movdqa %xmm6,%xmm15
- movl _gnutls_x86_cpuid_s+4(%rip),%r9d
+ movl GNUTLS_x86_cpuid_s+4(%rip),%r9d
cmpq $0x70,%rdx
jbe .Lcbc_dec_six_or_seven
movl $268437504,%r10d
movups (%rdi),%xmm0
xorps %xmm4,%xmm4
- andl _gnutls_x86_cpuid_s+4(%rip),%r10d
+ andl GNUTLS_x86_cpuid_s+4(%rip),%r10d
leaq 16(%rdx),%rax
cmpl $256,%esi
je .L14rounds
jz .Lodd_tail
movdqu 16(%rsi),%xmm6
- movl _gnutls_x86_cpuid_s+4(%rip),%eax
+ movl GNUTLS_x86_cpuid_s+4(%rip),%eax
cmpq $0x30,%rcx
jb .Lskip4x
.align 16
sha1_block_data_order:
.cfi_startproc
- movl _gnutls_x86_cpuid_s+0(%rip),%r9d
- movl _gnutls_x86_cpuid_s+4(%rip),%r8d
- movl _gnutls_x86_cpuid_s+8(%rip),%r10d
+ movl GNUTLS_x86_cpuid_s+0(%rip),%r9d
+ movl GNUTLS_x86_cpuid_s+4(%rip),%r8d
+ movl GNUTLS_x86_cpuid_s+8(%rip),%r10d
testl $512,%r8d
jz .Lialu
testl $536870912,%r10d
.align 16
sha256_block_data_order:
.cfi_startproc
- leaq _gnutls_x86_cpuid_s(%rip),%r11
+ leaq GNUTLS_x86_cpuid_s(%rip),%r11
movl 0(%r11),%r9d
movl 4(%r11),%r10d
movl 8(%r11),%r11d
.align 16
sha512_block_data_order:
.cfi_startproc
- leaq _gnutls_x86_cpuid_s(%rip),%r11
+ leaq GNUTLS_x86_cpuid_s(%rip),%r11
movl 0(%r11),%r9d
movl 4(%r11),%r10d
movl 8(%r11),%r11d
L112pic:
popl %ebx
leal Lkey_const-L112pic(%ebx),%ebx
- movl L__gnutls_x86_cpuid_s$non_lazy_ptr-Lkey_const(%ebx),%ebp
+ movl L_GNUTLS_x86_cpuid_s$non_lazy_ptr-Lkey_const(%ebx),%ebp
movups (%eax),%xmm0
xorps %xmm4,%xmm4
movl 4(%ebp),%ebp
.byte 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
.byte 115,108,46,111,114,103,62,0
.section __IMPORT,__pointers,non_lazy_symbol_pointers
-L__gnutls_x86_cpuid_s$non_lazy_ptr:
-.indirect_symbol __gnutls_x86_cpuid_s
+L_GNUTLS_x86_cpuid_s$non_lazy_ptr:
+.indirect_symbol _GNUTLS_x86_cpuid_s
.long 0
-.comm __gnutls_x86_cpuid_s,16,2
+.comm _GNUTLS_x86_cpuid_s,16,2
leaq 7(%r8),%r9
movl %r10d,96+12(%rsp)
bswapl %r9d
- movl __gnutls_x86_cpuid_s+4(%rip),%r10d
+ movl _GNUTLS_x86_cpuid_s+4(%rip),%r10d
xorl %ebp,%r9d
andl $71303168,%r10d
movl %r9d,112+12(%rsp)
movdqa %xmm5,%xmm14
movdqu 80(%rdi),%xmm7
movdqa %xmm6,%xmm15
- movl __gnutls_x86_cpuid_s+4(%rip),%r9d
+ movl _GNUTLS_x86_cpuid_s+4(%rip),%r9d
cmpq $0x70,%rdx
jbe L$cbc_dec_six_or_seven
movl $268437504,%r10d
movups (%rdi),%xmm0
xorps %xmm4,%xmm4
- andl __gnutls_x86_cpuid_s+4(%rip),%r10d
+ andl _GNUTLS_x86_cpuid_s+4(%rip),%r10d
leaq 16(%rdx),%rax
cmpl $256,%esi
je L$14rounds
jz L$odd_tail
movdqu 16(%rsi),%xmm6
- movl __gnutls_x86_cpuid_s+4(%rip),%eax
+ movl _GNUTLS_x86_cpuid_s+4(%rip),%eax
cmpq $0x30,%rcx
jb L$skip4x
.p2align 4
_sha1_block_data_order:
- movl __gnutls_x86_cpuid_s+0(%rip),%r9d
- movl __gnutls_x86_cpuid_s+4(%rip),%r8d
- movl __gnutls_x86_cpuid_s+8(%rip),%r10d
+ movl _GNUTLS_x86_cpuid_s+0(%rip),%r9d
+ movl _GNUTLS_x86_cpuid_s+4(%rip),%r8d
+ movl _GNUTLS_x86_cpuid_s+8(%rip),%r10d
testl $512,%r8d
jz L$ialu
testl $536870912,%r10d
.p2align 4
_sha256_block_data_order:
- leaq __gnutls_x86_cpuid_s(%rip),%r11
+ leaq _GNUTLS_x86_cpuid_s(%rip),%r11
movl 0(%r11),%r9d
movl 4(%r11),%r10d
movl 8(%r11),%r11d
.p2align 4
_sha512_block_data_order:
- leaq __gnutls_x86_cpuid_s(%rip),%r11
+ leaq _GNUTLS_x86_cpuid_s(%rip),%r11
movl 0(%r11),%r9d
movl 4(%r11),%r10d
movl 8(%r11),%r11d
#elif defined(__SUNPRO_C)
__hidden
#endif
-unsigned int _gnutls_x86_cpuid_s[4];
+unsigned int GNUTLS_x86_cpuid_s[4];
#ifndef bit_SHA
# define bit_SHA (1<<29)
if (capabilities & INTEL_AES_NI) {
if (a[1] & bit_AES) {
- _gnutls_x86_cpuid_s[1] |= bit_AES;
+ GNUTLS_x86_cpuid_s[1] |= bit_AES;
} else {
_gnutls_debug_log
("AESNI acceleration requested but not available\n");
if (capabilities & INTEL_SSSE3) {
if (a[1] & bit_SSSE3) {
- _gnutls_x86_cpuid_s[1] |= bit_SSSE3;
+ GNUTLS_x86_cpuid_s[1] |= bit_SSSE3;
} else {
_gnutls_debug_log
("SSSE3 acceleration requested but not available\n");
if (capabilities & INTEL_AVX) {
if ((a[1] & bit_AVX) && (a[1] & bit_MOVBE) &&
check_4th_gen_intel_features(a[1])) {
- _gnutls_x86_cpuid_s[1] |= bit_AVX|bit_MOVBE;
+ GNUTLS_x86_cpuid_s[1] |= bit_AVX|bit_MOVBE;
} else {
_gnutls_debug_log
("AVX acceleration requested but not available\n");
if (capabilities & INTEL_PCLMUL) {
if (a[1] & bit_PCLMUL) {
- _gnutls_x86_cpuid_s[1] |= bit_PCLMUL;
+ GNUTLS_x86_cpuid_s[1] |= bit_PCLMUL;
} else {
_gnutls_debug_log
("PCLMUL acceleration requested but not available\n");
if (capabilities & INTEL_SHA) {
if (a[2] & bit_SHA) {
- _gnutls_x86_cpuid_s[2] |= bit_SHA;
+ GNUTLS_x86_cpuid_s[2] |= bit_SHA;
} else {
_gnutls_debug_log
("SHA acceleration requested but not available\n");
static unsigned check_optimized_aes(void)
{
- return (_gnutls_x86_cpuid_s[1] & bit_AES);
+ return (GNUTLS_x86_cpuid_s[1] & bit_AES);
}
static unsigned check_ssse3(void)
{
- return (_gnutls_x86_cpuid_s[1] & bit_SSSE3);
+ return (GNUTLS_x86_cpuid_s[1] & bit_SSSE3);
}
static unsigned check_sha(void)
{
- return (_gnutls_x86_cpuid_s[2] & bit_SHA);
+ return (GNUTLS_x86_cpuid_s[2] & bit_SHA);
}
#ifdef ASM_X86_64
static unsigned check_avx_movbe(void)
{
- return (_gnutls_x86_cpuid_s[1] & (bit_AVX|bit_MOVBE)) == (bit_AVX|bit_MOVBE);
+ return (GNUTLS_x86_cpuid_s[1] & (bit_AVX|bit_MOVBE)) == (bit_AVX|bit_MOVBE);
}
static unsigned check_pclmul(void)
{
- return (_gnutls_x86_cpuid_s[1] & bit_PCLMUL);
+ return (GNUTLS_x86_cpuid_s[1] & bit_PCLMUL);
}
#endif
return 0;
if (capabilities & PADLOCK) {
if (c & bit_PADLOCK) {
- _gnutls_x86_cpuid_s[2] |= bit_PADLOCK;
+ GNUTLS_x86_cpuid_s[2] |= bit_PADLOCK;
} else {
_gnutls_debug_log
("Padlock acceleration requested but not available\n");
if (capabilities & PADLOCK_PHE) {
if (c & bit_PADLOCK_PHE) {
- _gnutls_x86_cpuid_s[2] |= bit_PADLOCK_PHE;
+ GNUTLS_x86_cpuid_s[2] |= bit_PADLOCK_PHE;
} else {
_gnutls_debug_log
("Padlock-PHE acceleration requested but not available\n");
if (capabilities & PADLOCK_PHE_SHA512) {
if (c & bit_PADLOCK_PHE_SHA512) {
- _gnutls_x86_cpuid_s[2] |= bit_PADLOCK_PHE_SHA512;
+ GNUTLS_x86_cpuid_s[2] |= bit_PADLOCK_PHE_SHA512;
} else {
_gnutls_debug_log
("Padlock-PHE-SHA512 acceleration requested but not available\n");
}
}
- return _gnutls_x86_cpuid_s[2];
+ return GNUTLS_x86_cpuid_s[2];
}
static int check_padlock(unsigned edx)
if (check_zhaoxin() == 0)
return;
- memset(_gnutls_x86_cpuid_s, 0, sizeof(_gnutls_x86_cpuid_s));
+ memset(GNUTLS_x86_cpuid_s, 0, sizeof(GNUTLS_x86_cpuid_s));
if (capabilities == 0){
- if(!read_cpuid_vals(_gnutls_x86_cpuid_s))
+ if(!read_cpuid_vals(GNUTLS_x86_cpuid_s))
return;
edx = padlock_capability();
} else{
int ret;
enum x86_cpu_vendor vendor;
- memset(_gnutls_x86_cpuid_s, 0, sizeof(_gnutls_x86_cpuid_s));
+ memset(GNUTLS_x86_cpuid_s, 0, sizeof(GNUTLS_x86_cpuid_s));
vendor = check_x86_cpu_vendor();
if (vendor == X86_CPU_VENDOR_OTHER) {
}
if (capabilities == 0) {
- if (!read_cpuid_vals(_gnutls_x86_cpuid_s))
+ if (!read_cpuid_vals(GNUTLS_x86_cpuid_s))
return;
- if (!check_4th_gen_intel_features(_gnutls_x86_cpuid_s[1])) {
- _gnutls_x86_cpuid_s[1] &= ~bit_AVX;
+ if (!check_4th_gen_intel_features(GNUTLS_x86_cpuid_s[1])) {
+ GNUTLS_x86_cpuid_s[1] &= ~bit_AVX;
/* Clear AVX2 bits as well, according to what
* OpenSSL does. Should we clear
* bit_AVX512DQ, bit_AVX512PF, bit_AVX512ER,
* and bit_AVX512CD? */
- _gnutls_x86_cpuid_s[2] &= ~(bit_AVX2|
+ GNUTLS_x86_cpuid_s[2] &= ~(bit_AVX2|
bit_AVX512F|
bit_AVX512IFMA|
bit_AVX512BW|
/* CRYPTOGAMS uses the (1 << 30) bit as an indicator of Intel CPUs */
if (vendor == X86_CPU_VENDOR_INTEL) {
- _gnutls_x86_cpuid_s[0] |= 1 << 30;
+ GNUTLS_x86_cpuid_s[0] |= 1 << 30;
} else {
- _gnutls_x86_cpuid_s[0] &= ~(1 << 30);
+ GNUTLS_x86_cpuid_s[0] &= ~(1 << 30);
}
if (check_ssse3()) {