Uh oh!
There was an error while loading. Please reload this page.
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.
rustbot
commented
Sep 6, 2022
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
commented
Sep 6, 2022
(rust-highfive has picked a reviewer for you, use r? to override) |
Mark-Simulacrum
commented
Sep 9, 2022
Seems to match rust-lang/stdarch#706 and the target attributes we expose on the function. Seems OK. @bors r+ |
bors
commented
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
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.