Skip to content

Commit

Permalink
s_has_vpclmulqdq fix
Browse files Browse the repository at this point in the history
check correct bit for VPCLMULQDQ
  • Loading branch information
jmklix authored Feb 5, 2024
1 parent 901405e commit d8a9d59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/arch/intel/cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ static bool s_has_bmi2(void) {
static bool s_has_vpclmulqdq(void) {
uint32_t abcd[4];
/* Check VPCLMULQDQ:
* CPUID.(EAX=07H, ECX=0H):ECX.VPCLMULQDQ[bit 20]==1 */
uint32_t vpclmulqdq_mask = (1 << 20);
* CPUID.(EAX=07H, ECX=0H):ECX.VPCLMULQDQ[bit 10]==1 */
uint32_t vpclmulqdq_mask = (1 << 10);
aws_run_cpuid(7, 0, abcd);
if ((abcd[2] & vpclmulqdq_mask) != vpclmulqdq_mask) {
return false;
Expand Down

0 comments on commit d8a9d59

Please sign in to comment.