diff options
| author | bors <bors@rust-lang.org> | 2017-08-18 03:15:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-08-18 03:15:01 +0000 |
| commit | 7f3be0a4b254cac6e71b8a025ee6e58112e47948 (patch) | |
| tree | 40eea636b15d17fe29c0dee7f756112fe62ba440 | |
| parent | 4ac7646d3929b54678095dd349783e73f6b0b14d (diff) | |
| parent | 5d91eda8b38208e1e4a346ba06b1acbd939a9b04 (diff) | |
| download | rust-7f3be0a4b254cac6e71b8a025ee6e58112e47948.tar.gz rust-7f3be0a4b254cac6e71b8a025ee6e58112e47948.zip | |
Auto merge of #43897 - lu-zero:master, r=alexcrichton
More PowerPC intrinsics
| -rw-r--r-- | src/etc/platform-intrinsics/powerpc.json | 35 | ||||
| -rw-r--r-- | src/librustc_platform_intrinsics/powerpc.rs | 55 |
2 files changed, 90 insertions, 0 deletions
diff --git a/src/etc/platform-intrinsics/powerpc.json b/src/etc/platform-intrinsics/powerpc.json index c70791be030..d615037b632 100644 --- a/src/etc/platform-intrinsics/powerpc.json +++ b/src/etc/platform-intrinsics/powerpc.json @@ -121,6 +121,41 @@ "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"] + }, + { + "intrinsic": "packsu{1.kind}{1.data_type_short}", + "width": [128], + "llvm": "vpk{1.kind}{1.data_type_short}{0.kind}s", + "ret": "u(8-16)", + "args": ["0Ws", "1"] + }, + { + "intrinsic": "packpx", + "width": [128], + "llvm": "vpkpx", + "ret": "s16", + "args": ["s32", "s32"] + }, + { + "intrinsic": "unpackl{1.kind}{1.data_type_short}", + "width": [128], + "llvm": "vupkl{1.kind}{1.data_type_short}", + "ret": "s(16-32)", + "args": ["0N"] + }, + { + "intrinsic": "unpackh{1.kind}{1.data_type_short}", + "width": [128], + "llvm": "vupkh{1.kind}{1.data_type_short}", + "ret": "s(16-32)", + "args": ["0N"] } ] } diff --git a/src/librustc_platform_intrinsics/powerpc.rs b/src/librustc_platform_intrinsics/powerpc.rs index b38369665f8..1a2e8e9c5d8 100644 --- a/src/librustc_platform_intrinsics/powerpc.rs +++ b/src/librustc_platform_intrinsics/powerpc.rs @@ -282,6 +282,61 @@ 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") + }, + "_vec_packsush" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS }, + output: &::U8x16, + definition: Named("llvm.ppc.altivec.vpkshus") + }, + "_vec_packsusw" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS }, + output: &::U16x8, + definition: Named("llvm.ppc.altivec.vpkswus") + }, + "_vec_packpx" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS }, + output: &::I16x8, + definition: Named("llvm.ppc.altivec.vpkpx") + }, + "_vec_unpacklsb" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 1] = [&::I8x16]; &INPUTS }, + output: &::I16x8, + definition: Named("llvm.ppc.altivec.vupklsb") + }, + "_vec_unpacklsh" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 1] = [&::I16x8]; &INPUTS }, + output: &::I32x4, + definition: Named("llvm.ppc.altivec.vupklsh") + }, + "_vec_unpackhsb" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 1] = [&::I8x16]; &INPUTS }, + output: &::I16x8, + definition: Named("llvm.ppc.altivec.vupkhsb") + }, + "_vec_unpackhsh" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 1] = [&::I16x8]; &INPUTS }, + output: &::I32x4, + definition: Named("llvm.ppc.altivec.vupkhsh") + }, _ => return None, }) } |
