Skip to content

Commit e413814

Browse files
committed
Add support for Vector Truncate on PowerPC
1 parent 9dd3690 commit e413814

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/etc/platform-intrinsics/powerpc.json

+7
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,13 @@
255255
"ret": "f32",
256256
"args": ["0"]
257257
},
258+
{
259+
"intrinsic": "trunc",
260+
"width": [128],
261+
"llvm": "vrfiz",
262+
"ret": "f32",
263+
"args": ["0"]
264+
},
258265
{
259266
"intrinsic": "loge",
260267
"width": [128],

src/librustc_platform_intrinsics/powerpc.rs

+5
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
422422
output: &::F32x4,
423423
definition: Named("llvm.ppc.altivec.vrfin")
424424
},
425+
"_vec_trunc" => Intrinsic {
426+
inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS },
427+
output: &::F32x4,
428+
definition: Named("llvm.ppc.altivec.vrfiz")
429+
},
425430
"_vec_loge" => Intrinsic {
426431
inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS },
427432
output: &::F32x4,

0 commit comments

Comments
 (0)