From 2112972a646f2ff273339ec45be71fdb188a2d46 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Wed, 31 Jul 2019 13:48:46 +0200 Subject: [PATCH] Use ::swap_bytes instead of llvm.bswap.i64 --- library/stdarch/crates/core_arch/src/x86_64/bswap.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/library/stdarch/crates/core_arch/src/x86_64/bswap.rs b/library/stdarch/crates/core_arch/src/x86_64/bswap.rs index 9e8e76d4f706..81ecbc2290e7 100644 --- a/library/stdarch/crates/core_arch/src/x86_64/bswap.rs +++ b/library/stdarch/crates/core_arch/src/x86_64/bswap.rs @@ -12,13 +12,7 @@ use stdarch_test::assert_instr; #[cfg_attr(test, assert_instr(bswap))] #[stable(feature = "simd_x86", since = "1.27.0")] pub unsafe fn _bswap64(x: i64) -> i64 { - bswap_i64(x) -} - -#[allow(improper_ctypes)] -extern "C" { - #[link_name = "llvm.bswap.i64"] - fn bswap_i64(x: i64) -> i64; + x.swap_bytes() } #[cfg(test)]