diff options
| author | Luca Barbato <lu_zero@gentoo.org> | 2017-08-04 00:19:58 +0000 |
|---|---|---|
| committer | Luca Barbato <lu_zero@gentoo.org> | 2017-08-16 05:04:41 +0000 |
| commit | c2cdcefeadfc9d41706cb9171ffe7839c43dc04b (patch) | |
| tree | cbb005b5c36837b0dbc535c1c6a34adf3880d804 /src | |
| parent | e40dc66f47614eb2d1c8026d112a27b6f8b291d0 (diff) | |
| download | rust-c2cdcefeadfc9d41706cb9171ffe7839c43dc04b.tar.gz rust-c2cdcefeadfc9d41706cb9171ffe7839c43dc04b.zip | |
Add support for Vector Pack Saturated on PowerPC
Diffstat (limited to 'src')
| -rw-r--r-- | src/etc/platform-intrinsics/powerpc.json | 7 | ||||
| -rw-r--r-- | src/librustc_platform_intrinsics/powerpc.rs | 20 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/etc/platform-intrinsics/powerpc.json b/src/etc/platform-intrinsics/powerpc.json index c70791be030..25ab8f780e5 100644 --- a/src/etc/platform-intrinsics/powerpc.json +++ b/src/etc/platform-intrinsics/powerpc.json @@ -121,6 +121,13 @@ "llvm": "vavg{0.kind}{0.data_type_short}", "ret": "i(8-32)", "args": ["0", "0"] + }, + { + "intrinsic": "packs{0.kind}{1.data_type_short}", + "width": [128], + "llvm": "vpk{0.kind}{1.data_type_short}{0.kind}s", + "ret": "i(8-16)", + "args": ["0W", "1"] } ] } diff --git a/src/librustc_platform_intrinsics/powerpc.rs b/src/librustc_platform_intrinsics/powerpc.rs index b38369665f8..d2822947f51 100644 --- a/src/librustc_platform_intrinsics/powerpc.rs +++ b/src/librustc_platform_intrinsics/powerpc.rs @@ -282,6 +282,26 @@ pub fn find(name: &str) -> Option<Intrinsic> { output: &::U32x4, definition: Named("llvm.ppc.altivec.vavguw") }, + "_vec_packssh" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS }, + output: &::I8x16, + definition: Named("llvm.ppc.altivec.vpkshss") + }, + "_vec_packsuh" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS }, + output: &::U8x16, + definition: Named("llvm.ppc.altivec.vpkuhus") + }, + "_vec_packssw" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS }, + output: &::I16x8, + definition: Named("llvm.ppc.altivec.vpkswss") + }, + "_vec_packsuw" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS }, + output: &::U16x8, + definition: Named("llvm.ppc.altivec.vpkuwus") + }, _ => return None, }) } |
