Skip to content

Conversation

heiher
Copy link
Contributor

@heiher heiher commented Aug 27, 2025

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Aug 27, 2025

r? @scottmcm

rustbot has assigned @scottmcm.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 27, 2025
@folkertdev
Copy link
Contributor

This function could use cfg_select!:

cfg_select! {
    target_arch = "x86" => { 
        // SAFETY: the `cfg` attr ensures that we only execute this on x86 targets.
        unsafe { crate::arch::x86::_mm_pause() }
    }
    target_arch = "x86_64" => { 
        // SAFETY: the `cfg` attr ensures that we only execute this on x86_64 targets.
        unsafe { crate::arch::x86_64::_mm_pause() }
    }
    target_arch = "riscv32" => crate::arch::riscv32::pause(),
    target_arch = "riscv64" => crate::arch::riscv64::pause(),
    any(target_arch = "aarch64", target_arch = "arm64ec") => { 
        // SAFETY: the `cfg` attr ensures that we only execute this on aarch64 targets.
        unsafe { crate::arch::aarch64::__isb(crate::arch::aarch64::SY) }
    }
    all(target_arch = "arm", target_feature = "v6") => { 
        // SAFETY: the `cfg` attr ensures that we only execute this on arm targets
        // with support for the v6 feature.
        unsafe { crate::arch::arm::__yield() }
    }
    target_arch = "loongarch32" => crate::arch::loongarch32::ibar::<0>(),
    target_arch = "loongarch64" => crate::arch::loongarch64::ibar::<0>(),
    _ => { /* do nothing */ }
}

@heiher
Copy link
Contributor Author

heiher commented Aug 28, 2025

r? @folkertdev

@rustbot rustbot assigned folkertdev and unassigned scottmcm Aug 28, 2025
@joshtriplett
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 28, 2025

📌 Commit 0da328b has been approved by joshtriplett

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 28, 2025
bors added a commit that referenced this pull request Aug 28, 2025
Rollup of 9 pull requests

Successful merges:

 - #142727 (wasm: rm static mut)
 - #143193 (Port `#[link]` to the new attribute parsing infrastructure )
 - #144864 (No source fixes)
 - #145913 (Add spin_loop hint for LoongArch)
 - #145926 (compiletest: Remove several remnants of the old libtest-based executor)
 - #145928 (Rename `Location::file_with_nul` to `file_as_c_str`)
 - #145930 (`const`ify (the unstable) `str::as_str`)
 - #145941 (Disable `integer_to_ptr_transmutes` suggestion for unsized types)
 - #145953 (Update `icu_list` to 2.0)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3f89664 into rust-lang:master Aug 28, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 28, 2025
rust-timer added a commit that referenced this pull request Aug 28, 2025
Rollup merge of #145913 - heiher:loong-hint, r=joshtriplett

Add spin_loop hint for LoongArch
@heiher heiher deleted the loong-hint branch August 28, 2025 17:07
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants