about summary refs log tree commit diff
path: root/library/stdarch/examples
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-01-09 13:38:09 -0600
committerGitHub <noreply@github.com>2018-01-09 13:38:09 -0600
commitbaf9d0e7e03d8af279ee1b8e202342c18e637f48 (patch)
tree231adb33f0816c291fb6ea0c23864db214602325 /library/stdarch/examples
parent248f5441bb8847f6a7fda236d69ff61e851e33b4 (diff)
downloadrust-baf9d0e7e03d8af279ee1b8e202342c18e637f48.tar.gz
rust-baf9d0e7e03d8af279ee1b8e202342c18e637f48.zip
Migrate the `i686::sse` module to vendor types (#269)
This migrates the entire `i686::sse` module (and touches a few others) to the
vendor types.
Diffstat (limited to 'library/stdarch/examples')
-rw-r--r--library/stdarch/examples/nbody.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/stdarch/examples/nbody.rs b/library/stdarch/examples/nbody.rs
index 4bb775abe51..c83933a3259 100644
--- a/library/stdarch/examples/nbody.rs
+++ b/library/stdarch/examples/nbody.rs
@@ -27,18 +27,18 @@ impl Frsqrt for f64x2 {
         #[cfg(all(any(target_arch = "x86", target_arch = "x86_64"),
                   target_feature = "sse"))]
         {
-            use self::stdsimd::vendor;
-            use simd::f32x4;
+            use stdsimd::vendor::*;
 
             let t = self.as_f32x2();
 
             let u = unsafe {
-                vendor::_mm_rsqrt_ps(f32x4::new(
+                let res = _mm_rsqrt_ps(_mm_setr_ps(
                     t.extract(0),
                     t.extract(1),
                     0.,
                     0.,
-                )).as_f64x4()
+                ));
+                std::mem::transmute::<_, simd::f32x4>(res).as_f64x4()
             };
             Self::new(u.extract(0), u.extract(1))
         }