awslabs / aws-c-common

Core c99 package for AWS SDK for C. Includes cross-platform primitives, configuration, data structures, and error handling.
Apache License 2.0
263 stars 159 forks source link

s_has_vpclmulqdq fix #1087

Closed jmklix closed 9 months ago

jmklix commented 9 months ago

check correct bit for VPCLMULQDQ

Issue #, if available: https://github.com/awslabs/aws-c-common/issues/1084

Description of changes: s_has_vpclmulqdq() is not checking the co

rrect bit to detect VPCLMULQDQ. According to the documentation it is bit 10. (code is checking bit 20).

Input Output EAX=07H, ECX=0 ECX[bit 10] VPCLMULQDQ EAX=07H, ECX=0 EBX[bit 16] AVX512F EAX=07H, ECX=0 EBX[bit 31] AVX512VL

https://en.wikichip.org/wiki/x86/vpclmulqdq

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

jmklix commented 9 months ago

this will be fixed in another PR