Skip to content

Commit 19c4bdb

Browse files
committed
Add support for Vector Multiply Odd on PowerPC
1 parent 9c6ab92 commit 19c4bdb

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/etc/platform-intrinsics/powerpc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@
107107
"llvm": "vmule{0.kind}{1.data_type_short}",
108108
"ret": "i(16-32)",
109109
"args": ["0N", "1"]
110+
},
111+
{
112+
"intrinsic": "mulo{1.kind}{1.data_type_short}",
113+
"width": [128],
114+
"llvm": "vmulo{0.kind}{1.data_type_short}",
115+
"ret": "i(16-32)",
116+
"args": ["0N", "1"]
110117
}
111118
]
112119
}

src/librustc_platform_intrinsics/powerpc.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,26 @@ pub fn find(name: &str) -> Option<Intrinsic> {
232232
output: &::U32x4,
233233
definition: Named("llvm.ppc.altivec.vmuleuh")
234234
},
235+
"_vec_mulosb" => Intrinsic {
236+
inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
237+
output: &::I16x8,
238+
definition: Named("llvm.ppc.altivec.vmulosb")
239+
},
240+
"_vec_muloub" => Intrinsic {
241+
inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS },
242+
output: &::U16x8,
243+
definition: Named("llvm.ppc.altivec.vmuloub")
244+
},
245+
"_vec_mulosh" => Intrinsic {
246+
inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
247+
output: &::I32x4,
248+
definition: Named("llvm.ppc.altivec.vmulosh")
249+
},
250+
"_vec_mulouh" => Intrinsic {
251+
inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
252+
output: &::U32x4,
253+
definition: Named("llvm.ppc.altivec.vmulouh")
254+
},
235255
_ => return None,
236256
})
237257
}

0 commit comments

Comments
 (0)