segmentio/asm

use x/sys/cpu

smasher164 opened this issue · 1 comments

Prefer x/sys/cpu over the current asm/cpu package. It also has the advantage of taking into account whether an OS supports XMM and YMM registers.

The asm/cpu package is wrapping cpuid so that we can ensure a stable ABI across the AVO-generation phase and the runtime cpu detection when the library is in use. It isn't directly responsible for the feature detection itself. That said, it does seem like wrapping x/sys over cpuid might be preferable. While cpuid does perform some OS support checking, x/sys does appear to be more thorough. Thanks for the suggestion, I'll take a look!