transpile: revert __builtin_ia32_pause/__builtin_arm_yield to emit _mm_pause and __yield instead of cross-platform spin_loop#1292
Merged
Conversation
84affd0 to
cd6c23b
Compare
thedataking
approved these changes
Jul 23, 2025
Contributor
thedataking
left a comment
There was a problem hiding this comment.
LGTM.
The import_simd_function can also cause stdstimd to be used. Would it make sense to open an issue capturing the TODOs you noted for deprecation and reference that issue in both locations where stdsimd might be pulled in? E.g.
// TODO(#123): In Rust 1.88 (probably earlier), `#![feature(stdsimd)]` has been removed
You can easily test if it was pulled in 1.88 or 1.87 using compiler-explorer if you want.
31d9ccf to
b909f5f
Compare
cd6c23b to
16d17ba
Compare
kkysen
commented
Jul 24, 2025
Contributor
Author
kkysen
left a comment
There was a problem hiding this comment.
The
import_simd_functioncan also causestdstimdto be used. Would it make sense to open an issue capturing the TODOs you noted for deprecation and reference that issue in both locations wherestdsimdmight be pulled in? E.g.// TODO(#123): In Rust 1.88 (probably earlier), `#![feature(stdsimd)]` has been removedYou can easily test if it was pulled in 1.88 or 1.87 using compiler-explorer if you want.
Tracked in #1298 now.
`__yield` is the more direct, unstable equivalent of `__builtin_arm_yield`. Fixes 1st half of <#1263 (comment)>.
`_mm_pause` is the more direct, unstable equivalent of `__builtin_ia2_pause`. Fixes 2nd half of <#1263 (comment)>.
16d17ba to
a1d24cb
Compare
kkysen
added a commit
that referenced
this pull request
Jul 24, 2025
Previously, we had general platform-specific snapshots based on `target_os` (e.x. `linux`, `macos`). We also need arch-specific snapshots, however, for `x86_64` and `aarch64` (see #1292). Thus, this PR renames `platform-specific` to the more specific `os-specific` and also adds `arch-specific`. `platform` in `fn transpile` is kept as a general name for any platform-specific modifier, which could be the `target_os`, `target_arch`, or anything else or any combination.
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.
Fixes #1263 (comment).
This switches back to emitting the more direct but unstable translations of
_mm_pauseand__yield.