Closed gnzlbg closed 4 months ago
But if we are arguing that, then we should just have the courage to make __cpuid() a safe function on x86-64 CPUs, and make this function reachable only on 32-bit x86. Except even that wouldn't apply, due to SGX existing. In truth, the problem is this: Intel is quite clearly willing to alter the deal. We can only pray they do not change it further!
You usually cannot rely on what CPUID reports when you are operating in a kernel context or in other special contexts (probably signal handlers). This, combined with the SGX and i586 complexity, is why I suggested that this be made a target feature.
@rfcbot fcp close
We don't have any targets for i386/i486 (which don't support CPUID) and we're happy to let SGX targets figure out feature detection on their own. As such, let's just remove has_cpuid
.
Team member @Amanieu has proposed to close this. The next step is review by the rest of the tagged team members:
No concerns currently listed.
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!
See this document for info about what commands tagged team members can give me.
:bell: This is now entering its final comment period, as per the review above. :bell:
Speaking for myself here: I'd be in favor of having is_x86_feature_detected
be available in core
, ideally in a fully functional way.
I'd be in favor of having
is_x86_feature_detected
be available incore
, ideally in a fully functional way.
The "fully functional" part isn't possible on SGX, where platform support is needed for feature detection. So if the definition is moved to core
, there needs to be a way for std
to plug-in functionality.
I assume it would only exist in core for targets where that is possible, i.e., not the SGX targets.
It seems pretty strange to me to have target-specific (beyond arch) items in core.
I mean, it seems pretty strange to me to have architectures which can't actually execute their ISA.
The final comment period, with a disposition to close, as per the review above, is now complete.
As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.
false
This issue tracks the stabilization of the
has_cpuid
intrinsic.The "mini-RFC" is part of the stabilization PR: https://github.com/rust-lang-nursery/stdsimd/pull/730
cc @rust-lang/libs @alexcrichton