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:41:15 +0000 |
| commit | 19c4bdb4e12ada030e64a731a3b588867c58025e (patch) | |
| tree | 5bb34034a1e709e52bd1a9978c29d584c56d7e0a | |
| parent | 9c6ab920ab8136074cb24c3b708e718584b34b9d (diff) | |
| download | rust-19c4bdb4e12ada030e64a731a3b588867c58025e.tar.gz rust-19c4bdb4e12ada030e64a731a3b588867c58025e.zip | |
Add support for Vector Multiply Odd 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 fe33908ec39..abccc8747e4 100644 --- a/src/etc/platform-intrinsics/powerpc.json +++ b/src/etc/platform-intrinsics/powerpc.json @@ -107,6 +107,13 @@ "llvm": "vmule{0.kind}{1.data_type_short}", "ret": "i(16-32)", "args": ["0N", "1"] + }, + { + "intrinsic": "mulo{1.kind}{1.data_type_short}", + "width": [128], + "llvm": "vmulo{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 4251d4ab25a..d9c00a8e627 100644 --- a/src/librustc_platform_intrinsics/powerpc.rs +++ b/src/librustc_platform_intrinsics/powerpc.rs @@ -232,6 +232,26 @@ pub fn find(name: &str) -> Option<Intrinsic> { output: &::U32x4, definition: Named("llvm.ppc.altivec.vmuleuh") }, + "_vec_mulosb" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS }, + output: &::I16x8, + definition: Named("llvm.ppc.altivec.vmulosb") + }, + "_vec_muloub" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS }, + output: &::U16x8, + definition: Named("llvm.ppc.altivec.vmuloub") + }, + "_vec_mulosh" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS }, + output: &::I32x4, + definition: Named("llvm.ppc.altivec.vmulosh") + }, + "_vec_mulouh" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS }, + output: &::U32x4, + definition: Named("llvm.ppc.altivec.vmulouh") + }, _ => return None, }) } |
