-
Notifications
You must be signed in to change notification settings - Fork 287
Run-time feature detection for AES-NI and TSC #312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I wish we would make the clippy and and rustfmt builds fail hardly. Otherwise every time I do a commit and want to format things appropriately I get a lot of noise in other parts of the library. The same applies to clippy: when I want to check that I haven't written something unnecessarily complex: |
So... it seems that the feature cache was full on 32-bit because this PR just added the 32th run-time feature test and I was using an AtomicUsize for the cache... I have added a I have also increased the size of the cache on 32-bit by making it an |
58dfd3e
to
c6eac51
Compare
Hm I think |
(otherwise though this looks good to me!) |
@alexcrichton Is there a reason to prefer AtomicUsize over AtomicU32 on 32-bit ? EDIT: this PR is otherwise ready. |
Oh I just tend to prefer stable things to unstable things, but either should work fine! |
@alexcrichton we would still the |
TSC doesn't have an LLVM feature, so IIUC we still can't use
simd_test
for it (its enabled for all x86 targets). Anyways, offering run-time feature detection for it should do no harm.