Skip to content

Commit 215e5b3

Browse files
committed
Use <i32>::swap_bytes instead of llvm.bswap.i32
1 parent 2111b53 commit 215e5b3

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

crates/core_arch/src/x86/bswap.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,7 @@ use stdarch_test::assert_instr;
1111
#[cfg_attr(test, assert_instr(bswap))]
1212
#[stable(feature = "simd_x86", since = "1.27.0")]
1313
pub unsafe fn _bswap(x: i32) -> i32 {
14-
bswap_i32(x)
15-
}
16-
17-
#[allow(improper_ctypes)]
18-
extern "C" {
19-
#[link_name = "llvm.bswap.i32"]
20-
fn bswap_i32(x: i32) -> i32;
14+
x.swap_bytes()
2115
}
2216

2317
#[cfg(test)]

0 commit comments

Comments
 (0)