summaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
authorKevin Jacobs <kjacobs@mozilla.com>2020-03-18 01:47:04 +0000
committerKevin Jacobs <kjacobs@mozilla.com>2020-03-18 01:47:04 +0000
commit3b08afafa04ee8803d20f58e336d43fe6a4d5e23 (patch)
treed9db12f203bfa3c7a49b25deb49b2eeacca9640e /nss
parentcba7139e8a83e94a3aa4c01b166269b09c66c4ea (diff)
downloadnss-hg-3b08afafa04ee8803d20f58e336d43fe6a4d5e23.tar.gz
Bug 1623184 - Clear ECX prior to cpuid, fixing query for Extended Features r=bbeurdouche
While trying to benchmark the recent HACL* AVX2 code, I noticed that it was not being called on two machines (that both support AVX2), instead using only the AVX version. In order to query for Extended Features (cpuid with EAX=7), we also need to set ECX to 0: https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-2a-manual.html. The current code fails to do this, resulting in flags that show no support. Initially, I wrote a separate `freebl_cpuid_ex` function that accepted a value for ECX as a separate input argument. However, some definitions of `freebl_cpuid` already zero ECX, so making this consistent is the simplest way to get the desired behavior. With this patch, the two test machines (MacOS and Linux x64) correctly use the AVX2 ChaCha20Poly1305 code. Differential Revision: https://phabricator.services.mozilla.com/D67235
Diffstat (limited to 'nss')
0 files changed, 0 insertions, 0 deletions