]>
git.proxmox.com Git - rustc.git/blob - src/stdarch/crates/core_arch/src/x86/bswap.rs
1 //! Byte swap intrinsics.
2 #![allow(clippy::module_name_repetitions)]
5 use stdarch_test
::assert_instr
;
7 /// Returns an integer with the reversed byte order of x
9 /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_bswap)
11 #[cfg_attr(test, assert_instr(bswap))]
12 #[stable(feature = "simd_x86", since = "1.27.0")]
13 pub unsafe fn _bswap(x
: i32) -> i32 {
24 assert_eq
!(_bswap(0x0EADBE0F), 0x0FBEAD0E);
25 assert_eq
!(_bswap(0x00000000), 0x00000000);