Skip to content

Commit

Permalink
Get SSE2 value from reg[3]
Browse files Browse the repository at this point in the history
From https://www.amd.com/system/files/TechDocs/24594.pdf page 596 ,and https://www.felixcloutier.com/x86/cpuid#fig-3-6 I see that the SSE2 flag comes from a different registry than the other flags. Does EDX correspond to reg[3] ?
  • Loading branch information
Joaquin Romera authored and serge-sans-paille committed Nov 9, 2022
1 parent 4d18c0f commit c9387c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/xsimd/config/xsimd_cpuid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace xsimd

get_cpuid(regs, 0x1);

sse2 = regs[2] >> 26 & 1;
sse2 = regs[3] >> 26 & 1;
best = std::max(best, sse2::version() * sse2);

sse3 = regs[2] >> 0 & 1;
Expand Down

0 comments on commit c9387c6

Please sign in to comment.