mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-04-30 03:34:39 +00:00
OPENSSL_ia32cap: reserve for new extensions.
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
1b6fa9fdf8
commit
d6ee8f3dc4
@ -61,16 +61,26 @@ void OPENSSL_cpuid_setup(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((env = strchr(env, ':'))) {
|
if ((env = strchr(env, ':'))) {
|
||||||
unsigned int vecx;
|
IA32CAP vecx;
|
||||||
env++;
|
env++;
|
||||||
off = (env[0] == '~') ? 1 : 0;
|
off = (env[0] == '~') ? 1 : 0;
|
||||||
vecx = strtoul(env + off, NULL, 0);
|
# if defined(_WIN32)
|
||||||
if (off)
|
if (!sscanf(env + off, "%I64i", &vecx))
|
||||||
OPENSSL_ia32cap_P[2] &= ~vecx;
|
vecx = strtoul(env + off, NULL, 0);
|
||||||
else
|
# else
|
||||||
OPENSSL_ia32cap_P[2] = vecx;
|
if (!sscanf(env + off, "%lli", (long long *)&vecx))
|
||||||
|
vecx = strtoul(env + off, NULL, 0);
|
||||||
|
# endif
|
||||||
|
if (off) {
|
||||||
|
OPENSSL_ia32cap_P[2] &= ~(unsigned int)vecx;
|
||||||
|
OPENSSL_ia32cap_P[3] &= ~(unsigned int)(vecx >> 32);
|
||||||
|
} else {
|
||||||
|
OPENSSL_ia32cap_P[2] = (unsigned int)vecx;
|
||||||
|
OPENSSL_ia32cap_P[3] = (unsigned int)(vecx >> 32);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
OPENSSL_ia32cap_P[2] = 0;
|
OPENSSL_ia32cap_P[2] = 0;
|
||||||
|
OPENSSL_ia32cap_P[3] = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
vec = OPENSSL_ia32_cpuid(OPENSSL_ia32cap_P);
|
vec = OPENSSL_ia32_cpuid(OPENSSL_ia32cap_P);
|
||||||
|
@ -68,7 +68,7 @@ OPENSSL_ia32_cpuid:
|
|||||||
.cfi_register %rbx,%r8
|
.cfi_register %rbx,%r8
|
||||||
|
|
||||||
xor %eax,%eax
|
xor %eax,%eax
|
||||||
mov %eax,8(%rdi) # clear extended feature flags
|
mov %rax,8(%rdi) # clear extended feature flags
|
||||||
cpuid
|
cpuid
|
||||||
mov %eax,%r11d # max value for standard query level
|
mov %eax,%r11d # max value for standard query level
|
||||||
|
|
||||||
@ -187,6 +187,7 @@ OPENSSL_ia32_cpuid:
|
|||||||
and \$0xfff7ffff,%ebx # clear ADCX/ADOX flag
|
and \$0xfff7ffff,%ebx # clear ADCX/ADOX flag
|
||||||
.Lnotknights:
|
.Lnotknights:
|
||||||
mov %ebx,8(%rdi) # save extended feature flags
|
mov %ebx,8(%rdi) # save extended feature flags
|
||||||
|
mov %ecx,12(%rdi)
|
||||||
.Lno_extended_info:
|
.Lno_extended_info:
|
||||||
|
|
||||||
bt \$27,%r9d # check OSXSAVE bit
|
bt \$27,%r9d # check OSXSAVE bit
|
||||||
|
@ -110,6 +110,10 @@ a.k.a. AVX512IFMA extension;
|
|||||||
|
|
||||||
=item bit #64+31 denoting availability of AVX512VL extension;
|
=item bit #64+31 denoting availability of AVX512VL extension;
|
||||||
|
|
||||||
|
=item bit #64+41 denoting availability of VAES extension;
|
||||||
|
|
||||||
|
=item bit #64+42 denoting availability of VPCLMULQDQ extension;
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
To control this extended capability word use ':' as delimiter when
|
To control this extended capability word use ':' as delimiter when
|
||||||
@ -130,6 +134,7 @@ requirements are summarized in below table:
|
|||||||
ADCX/ADOX | 2.23 | 2.10 | 3.3
|
ADCX/ADOX | 2.23 | 2.10 | 3.3
|
||||||
AVX512 | 2.25 | 2.11.8 | see NOTES
|
AVX512 | 2.25 | 2.11.8 | see NOTES
|
||||||
AVX512IFMA | 2.26 | 2.11.8 | see NOTES
|
AVX512IFMA | 2.26 | 2.11.8 | see NOTES
|
||||||
|
VAES | n/a | n/a |
|
||||||
|
|
||||||
=head1 NOTES
|
=head1 NOTES
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user