diff options
| author | Luca Barbato <lu_zero@gentoo.org> | 2017-07-27 13:30:51 +0000 |
|---|---|---|
| committer | Luca Barbato <lu_zero@gentoo.org> | 2017-07-27 21:30:31 +0000 |
| commit | cbce0aa341c8be3f4b9253c93ed641ed454fc0a0 (patch) | |
| tree | 98a8b46a8f382b64ced48eee1327a8b930516b4e | |
| parent | a718c813ed8546b0959de78aae22846c1ea9a783 (diff) | |
| download | rust-cbce0aa341c8be3f4b9253c93ed641ed454fc0a0.tar.gz rust-cbce0aa341c8be3f4b9253c93ed641ed454fc0a0.zip | |
Add support for Vector Minimum on PowerPC
| -rw-r--r-- | src/etc/platform-intrinsics/powerpc.json | 7 | ||||
| -rw-r--r-- | src/librustc_platform_intrinsics/powerpc.rs | 30 |
2 files changed, 37 insertions, 0 deletions
diff --git a/src/etc/platform-intrinsics/powerpc.json b/src/etc/platform-intrinsics/powerpc.json index aaab224297e..7f01aaa3ac1 100644 --- a/src/etc/platform-intrinsics/powerpc.json +++ b/src/etc/platform-intrinsics/powerpc.json @@ -65,6 +65,13 @@ "llvm": "vmax{0.kind}{0.data_type_short}", "ret": "i(8-32)", "args": ["0", "0"] + }, + { + "intrinsic": "min{0.kind}{0.data_type_short}", + "width": [128], + "llvm": "vmin{0.kind}{0.data_type_short}", + "ret": "i(8-32)", + "args": ["0", "0"] } ] } diff --git a/src/librustc_platform_intrinsics/powerpc.rs b/src/librustc_platform_intrinsics/powerpc.rs index 327299a0d05..60074cce2b9 100644 --- a/src/librustc_platform_intrinsics/powerpc.rs +++ b/src/librustc_platform_intrinsics/powerpc.rs @@ -112,6 +112,36 @@ pub fn find(name: &str) -> Option<Intrinsic> { output: &::U32x4, definition: Named("llvm.ppc.altivec.vmaxuw") }, + "_vec_minsb" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS }, + output: &::I8x16, + definition: Named("llvm.ppc.altivec.vminsb") + }, + "_vec_minub" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS }, + output: &::U8x16, + definition: Named("llvm.ppc.altivec.vminub") + }, + "_vec_minsh" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS }, + output: &::I16x8, + definition: Named("llvm.ppc.altivec.vminsh") + }, + "_vec_minuh" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS }, + output: &::U16x8, + definition: Named("llvm.ppc.altivec.vminuh") + }, + "_vec_minsw" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS }, + output: &::I32x4, + definition: Named("llvm.ppc.altivec.vminsw") + }, + "_vec_minuw" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS }, + output: &::U32x4, + definition: Named("llvm.ppc.altivec.vminuw") + }, _ => return None, }) } |
