Clarify support_test_aesni
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
b959027010
commit
f8986e3147
1 changed files with 15 additions and 2 deletions
|
@ -3503,11 +3503,24 @@ component_test_malloc_0_null () {
|
|||
tests/ssl-opt.sh -e 'proxy'
|
||||
}
|
||||
|
||||
support_test_aesni () {
|
||||
# require an x86_64 target
|
||||
support_build_aesni() {
|
||||
# Check that gcc targets x86_64
|
||||
gcc -v 2>&1 | grep Target | grep -q x86_64
|
||||
}
|
||||
|
||||
support_run_aesni() {
|
||||
# Check for AESNI support on the host.
|
||||
#
|
||||
# In principle 32-bit x86 can support AESNI, but our implementation does not
|
||||
# support 32-bit x86, so we check for x86-64.
|
||||
# We can only grep /proc/cpuinfo on Linux, so this also checks for Linux
|
||||
[[ "$HOSTTYPE" == "x86_64" && "$OSTYPE" == "linux-gnu" ]] && </proc/cpuinfo grep '^flags' | grep -w aes
|
||||
}
|
||||
|
||||
support_test_aesni () {
|
||||
support_build_aesni && support_run_aesni
|
||||
}
|
||||
|
||||
component_test_aesni () { # ~ 60s
|
||||
# This tests the two AESNI implementations (intrinsics and assembly), and also the plain C
|
||||
# fallback. It also tests the logic that is used to select which implementation(s) to build.
|
||||
|
|
Loading…
Reference in a new issue