Use golang.org/x/sys/cpu for CPU feature detection?
mengzhuo opened this issue · 3 comments
mengzhuo commented
We can use https://godoc.org/golang.org/x/sys/cpu .
mmcloughlin commented
Thanks for filing this issue. There are two reasons why I didn't do this.
Firstly I need to check for CPUID flags that are unsupported by x/sys/cpu
.
Lines 5 to 16 in 871e507
Second, for a library such as this, I prefer to avoid dependencies unless strictly necessary.
mengzhuo commented
I see.
I'm trying porting meow's ARMv8( arm64 ).
However it will be painful that implement arm64's CPU feature detection on its own.
mmcloughlin commented
I would welcome an ARMv8 pull request. If golang.org/x/sys/cpu
provides the feature detection you need, it would be fine to use it. We would still need to use custom code for x86.