Skip to content

Commit b7348d1

Browse files
committed
replaced extern "rust-intrinsic" block with core::ptr::copy_nonoverlapping
using core::ptr::copy_nonoverlapping for memory operations
1 parent a70790e commit b7348d1

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

crates/core_arch/src/powerpc/altivec.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -687,15 +687,9 @@ mod sealed {
687687
pub unsafe fn $fun(a: isize, b: *const $ty) -> t_t_l!($ty) {
688688
let addr = (b as *const u8).offset(a);
689689

690-
// Workaround ptr::copy_nonoverlapping not being inlined
691-
unsafe extern "rust-intrinsic" {
692-
#[rustc_nounwind]
693-
pub fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
694-
}
695-
696690
let mut r = mem::MaybeUninit::uninit();
697691

698-
copy_nonoverlapping(
692+
core::ptr::copy_nonoverlapping(
699693
addr,
700694
r.as_mut_ptr() as *mut u8,
701695
mem::size_of::<t_t_l!($ty)>(),
@@ -742,13 +736,7 @@ mod sealed {
742736
pub unsafe fn $fun(s: t_t_l!($ty), a: isize, b: *mut $ty) {
743737
let addr = (b as *mut u8).offset(a);
744738

745-
// Workaround ptr::copy_nonoverlapping not being inlined
746-
unsafe extern "rust-intrinsic" {
747-
#[rustc_nounwind]
748-
pub fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
749-
}
750-
751-
copy_nonoverlapping(
739+
core::ptr::copy_nonoverlapping(
752740
&s as *const _ as *const u8,
753741
addr,
754742
mem::size_of::<t_t_l!($ty)>(),

0 commit comments

Comments
 (0)