]> git.proxmox.com Git - rustc.git/blobdiff - library/stdarch/crates/core_arch/src/powerpc/altivec.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / library / stdarch / crates / core_arch / src / powerpc / altivec.rs
index 8b2be39dc7a5e18f3749b4e0dcc3bbb85d60f0d9..70344c88be3236a9fd46411cc7f0c35bd60c1933 100644 (file)
@@ -51,6 +51,8 @@ types! {
 
 #[allow(improper_ctypes)]
 extern "C" {
+    #[link_name = "llvm.ppc.altivec.lvx"]
+    fn lvx(p: *const i8) -> vector_unsigned_int;
     #[link_name = "llvm.ppc.altivec.vperm"]
     fn vperm(
         a: vector_signed_int,
@@ -442,8 +444,7 @@ mod sealed {
     #[inline(always)]
     unsafe fn load(off: i32, p: *const i8) -> u32x4 {
         let addr = p.offset(off as isize);
-
-        *(addr as *const u32x4)
+        transmute(lvx(addr))
     }
 
     pub trait VectorLd {