Skip to content

Commit

Permalink
Add support for Vector Floor on PowerPC
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-zero committed Sep 27, 2017
1 parent 03a2aea commit f52f1ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/etc/platform-intrinsics/powerpc.json
Expand Up @@ -233,6 +233,13 @@
"llvm": "vexptefp",
"ret": "f32",
"args": ["0"]
},
{
"intrinsic": "floor",
"width": [128],
"llvm": "vrfim",
"ret": "f32",
"args": ["0"]
}
]
}
5 changes: 5 additions & 0 deletions src/librustc_platform_intrinsics/powerpc.rs
Expand Up @@ -407,6 +407,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
output: &::F32x4,
definition: Named("llvm.ppc.altivec.vexptefp")
},
"_vec_floor" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS },
output: &::F32x4,
definition: Named("llvm.ppc.altivec.vrfim")
},
_ => return None,
})
}

0 comments on commit f52f1ab

Please sign in to comment.