Compile spin_loop_hint as pause on x86 even without sse2 enabled#101495
Merged
bors merged 1 commit intorust-lang:masterfrom Sep 9, 2022
Merged
Compile spin_loop_hint as pause on x86 even without sse2 enabled#101495bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
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.
Collaborator
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Contributor
|
(rust-highfive has picked a reviewer for you, use r? to override) |
Member
|
Seems to match rust-lang/stdarch#706 and the target attributes we expose on the function. Seems OK. @bors r+ |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 9, 2022
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The x86
pauseinstruction 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.