-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Compile spin_loop_hint as pause on x86 even without sse2 enabled #101495
Conversation
The x86 `pause` instruction was introduced with sse2, but because it is encoded as `rep nop`, it works just fine on cpu's without sse2 support. It just doesn't do anything.
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
(rust-highfive has picked a reviewer for you, use r? to override) |
Seems to match rust-lang/stdarch#706 and the target attributes we expose on the function. Seems OK. @bors r+ |
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#101475 (Use futex-based locks and thread parker on Hermit) - rust-lang#101492 (Suggest adding array lengths to references to arrays if possible) - rust-lang#101495 (Compile spin_loop_hint as pause on x86 even without sse2 enabled) - rust-lang#101529 (Fix the example code and doctest for Formatter::sign_plus) - rust-lang#101600 (rustdoc: simplify the codeblock tooltip) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The x86
pause
instruction was introduced with sse2, but because it is encoded asrep nop
, it works just fine on cpu's without sse2 support. It just doesn't do anything.