]> git.proxmox.com Git - rustc.git/blob - library/stdarch/crates/core_arch/src/aarch64/armclang.rs
New upstream version 1.54.0+dfsg1
[rustc.git] / library / stdarch / crates / core_arch / src / aarch64 / armclang.rs
1 //! ARM compiler specific intrinsics
2 //!
3 //! # References
4 //!
5 //! - [ARM Compiler v 6.10 - armclang Reference Guide][arm_comp_ref]
6 //!
7 //! [arm_comp_ref]: https://developer.arm.com/docs/100067/0610
8
9 #[cfg(test)]
10 use stdarch_test::assert_instr;
11
12 /// Inserts a breakpoint instruction.
13 ///
14 /// `VAL` is a compile-time constant integer in range `[0, 65535]`.
15 ///
16 /// The breakpoint instruction inserted is `BRK` on A64.
17 #[cfg_attr(test, assert_instr(brk, VAL = 0))]
18 #[inline(always)]
19 #[rustc_legacy_const_generics(0)]
20 pub unsafe fn __breakpoint<const VAL: i32>() {
21 static_assert_imm16!(VAL);
22 asm!("brk {}", const VAL);
23 }