Skip to content

Commit 88fc6dc

Browse files
committed
Add support for Vector Pack Pixel on PowerPC
The llvm intrinsic uses signed integers.
1 parent 1773233 commit 88fc6dc

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/etc/platform-intrinsics/powerpc.json

+7
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@
135135
"llvm": "vpk{1.kind}{1.data_type_short}{0.kind}s",
136136
"ret": "u(8-16)",
137137
"args": ["0Ws", "1"]
138+
},
139+
{
140+
"intrinsic": "packpx",
141+
"width": [128],
142+
"llvm": "vpkpx",
143+
"ret": "s16",
144+
"args": ["s32", "s32"]
138145
}
139146
]
140147
}

src/librustc_platform_intrinsics/powerpc.rs

+5
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
312312
output: &::U16x8,
313313
definition: Named("llvm.ppc.altivec.vpkswus")
314314
},
315+
"_vec_packpx" => Intrinsic {
316+
inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
317+
output: &::I16x8,
318+
definition: Named("llvm.ppc.altivec.vpkpx")
319+
},
315320
_ => return None,
316321
})
317322
}

0 commit comments

Comments
 (0)