Skip to content

Commit

Permalink
Fix bug in VAES CPUID detection, use ECX instead of EBX register.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekKnapek committed May 17, 2024
1 parent 4c0c4fa commit cf02d92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mk_clib/src/mk_lang_cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ mk_lang_nodiscard mk_lang_jumbo mk_lang_types_bool_t mk_lang_cpuid_has_vaes(mk_l
{
mk_lang_types_bool_t has;

has = (g_mk_lang_cpuid_regset.m_leafs_count >= 0x7) && ((((mk_lang_types_uint_t)(g_mk_lang_cpuid_regset.m_leafs.m_regs[0x7].m_data.m_sints[1])) & (1u << 9)) != 0);
has = (g_mk_lang_cpuid_regset.m_leafs_count >= 0x7) && ((((mk_lang_types_uint_t)(g_mk_lang_cpuid_regset.m_leafs.m_regs[0x7].m_data.m_sints[2])) & (1u << 9)) != 0);
return has;
}

Expand Down

0 comments on commit cf02d92

Please sign in to comment.