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-07 07:35:32 +0000 |
| commit | 9c6ab920ab8136074cb24c3b708e718584b34b9d (patch) | |
| tree | c080fbbc06ecbe52c7a6ef3872ad6fe3fa3ec7af | |
| parent | 380b81853ed64b58f8cccd66c2d30726387df9ab (diff) | |
| download | rust-9c6ab920ab8136074cb24c3b708e718584b34b9d.tar.gz rust-9c6ab920ab8136074cb24c3b708e718584b34b9d.zip | |
Add support for Vector Multiply Even on PowerPC
| -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 7dde0fd4d08..fe33908ec39 100644 --- a/src/etc/platform-intrinsics/powerpc.json +++ b/src/etc/platform-intrinsics/powerpc.json @@ -100,6 +100,13 @@ "llvm": "vaddcuw", "ret": "u32", "args": ["0", "0"] + }, + { + "intrinsic": "mule{1.kind}{1.data_type_short}", + "width": [128], + "llvm": "vmule{0.kind}{1.data_type_short}", + "ret": "i(16-32)", + "args": ["0N", "1"] } ] } diff --git a/src/librustc_platform_intrinsics/powerpc.rs b/src/librustc_platform_intrinsics/powerpc.rs index 0ec6a7e66d8..4251d4ab25a 100644 --- a/src/librustc_platform_intrinsics/powerpc.rs +++ b/src/librustc_platform_intrinsics/powerpc.rs @@ -212,6 +212,26 @@ pub fn find(name: &str) -> Option<Intrinsic> { output: &::U32x4, definition: Named("llvm.ppc.altivec.vaddcuw") }, + "_vec_mulesb" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS }, + output: &::I16x8, + definition: Named("llvm.ppc.altivec.vmulesb") + }, + "_vec_muleub" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS }, + output: &::U16x8, + definition: Named("llvm.ppc.altivec.vmuleub") + }, + "_vec_mulesh" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS }, + output: &::I32x4, + definition: Named("llvm.ppc.altivec.vmulesh") + }, + "_vec_muleuh" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS }, + output: &::U32x4, + definition: Named("llvm.ppc.altivec.vmuleuh") + }, _ => return None, }) } |
