]> git.lizzy.rs Git - rust.git/commitdiff
Add support for Vector Round on PowerPC
authorLuca Barbato <lu_zero@gentoo.org>
Fri, 4 Aug 2017 00:19:58 +0000 (00:19 +0000)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 27 Sep 2017 13:33:32 +0000 (13:33 +0000)
src/etc/platform-intrinsics/powerpc.json
src/librustc_platform_intrinsics/powerpc.rs

index 003513e9b855d5937171bdbd6b1a216898b14288..bc92e7bf722d8146c5b380b89844936c86e290dd 100644 (file)
             "ret": "f32",
             "args": ["0"]
         },
+        {
+            "intrinsic": "round",
+            "width": [128],
+            "llvm": "vrfin",
+            "ret": "f32",
+            "args": ["0"]
+        },
         {
             "intrinsic": "loge",
             "width": [128],
index c06d8867b045a17fe95c02f76aac236e9aa65147..c28dbcbceec9dd7d5fad8046b358015c1b61cacf 100644 (file)
@@ -417,6 +417,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
             output: &::F32x4,
             definition: Named("llvm.ppc.altivec.vrfip")
         },
+        "_vec_round" => Intrinsic {
+            inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS },
+            output: &::F32x4,
+            definition: Named("llvm.ppc.altivec.vrfin")
+        },
         "_vec_loge" => Intrinsic {
             inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS },
             output: &::F32x4,