Files
rust/library/stdarch
Jonathan Brouwer f3983ba757 Rollup merge of #163918 - yilin0518:fix_arm_hint, r=JohnTitor
remove redundant unsafe

Related Zulipchat topic link: [Safety requirements of ARM hint APIs](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Safety.20requirements.20of.20ARM.20hint.20APIs/with/629609101)

This PR tries to remove the unsafe in `core_arch/arm_shared/hint.rs`. As the Zulip topic discussed, these APIs have `#[cfg(any(...))]` attribute to restrict that these can only be compiled when specific architecture is met. So there seems no need to mark these APIs unsafe.

For `__nop`, I found that in `riscv_shared` there exist the same `nop` instruction, but it is marked safe. The concrete path is `core_arch/src/riscv_shared/mod.rs`

```rust
/// Generates the `NOP` instruction
///
/// The NOP instruction does not change any architecturally visible state, except for
/// advancing the `pc` and incrementing any applicable performance counters.
#[inline]
#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")]
pub fn nop() {
    unsafe {
        asm!("nop", options(nomem, nostack, preserves_flags));
    }
}
```

But there is a remaining question: For `wfe` and `wfi`, they can be configurable to trap. So I think if needed, I can complement some discription about trap. Hoping you can give me some suggestion.
2026-10-11 16:23:22 +02:00
..
2026-09-17 21:30:00 +02:00
2026-04-08 13:53:59 +02:00
2026-09-17 21:30:00 +02:00
2026-02-25 15:00:04 +01:00
2026-09-17 21:30:00 +02:00
…
2026-09-13 20:16:32 -04:00

stdarch - Rust's standard library SIMD components

Actions Status

This repository contains the core_arch crate, which implements core::arch - Rust's core library architecture-specific intrinsics.

The std::simd component now lives in the packed_simd_2 crate.

Synchronizing josh subtree with rustc

This repository is linked to rust-lang/rust as a josh subtree. You can use the rustc-josh-sync tool to perform synchronization.

You can find a guide on how to perform the synchronization here.