Skip to content

Commit f52f1ab

Browse files
committed
Add support for Vector Floor on PowerPC
1 parent 03a2aea commit f52f1ab

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/etc/platform-intrinsics/powerpc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,13 @@
233233
"llvm": "vexptefp",
234234
"ret": "f32",
235235
"args": ["0"]
236+
},
237+
{
238+
"intrinsic": "floor",
239+
"width": [128],
240+
"llvm": "vrfim",
241+
"ret": "f32",
242+
"args": ["0"]
236243
}
237244
]
238245
}

src/librustc_platform_intrinsics/powerpc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
407407
output: &::F32x4,
408408
definition: Named("llvm.ppc.altivec.vexptefp")
409409
},
410+
"_vec_floor" => Intrinsic {
411+
inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS },
412+
output: &::F32x4,
413+
definition: Named("llvm.ppc.altivec.vrfim")
414+
},
410415
_ => return None,
411416
})
412417
}

0 commit comments

Comments
 (0)