From 0b3ff211358a48720b0a74608b38775235288bb0 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Fri, 24 May 2019 18:09:45 +0000 Subject: [PATCH] Add Altivec vec_cmple and vec_cmplt --- .../crates/core_arch/src/powerpc/altivec.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/library/stdarch/crates/core_arch/src/powerpc/altivec.rs b/library/stdarch/crates/core_arch/src/powerpc/altivec.rs index 2f56ecf8f3de..3441f17e1034 100644 --- a/library/stdarch/crates/core_arch/src/powerpc/altivec.rs +++ b/library/stdarch/crates/core_arch/src/powerpc/altivec.rs @@ -1355,6 +1355,23 @@ mod sealed { vector_mladd! { vector_signed_short, vector_signed_short, vector_signed_short } } +/// Vector cmplt. +#[inline] +#[target_feature(enable = "altivec")] +pub unsafe fn vec_cmplt(a: U, b: T) -> >::Result +where + T: sealed::VectorCmpGt, +{ + vec_cmpgt(b, a) +} + +/// Vector cmple. +#[inline] +#[target_feature(enable = "altivec")] +pub unsafe fn vec_cmple(a: vector_float, b: vector_float) -> vector_bool_int { + vec_cmpge(b, a) +} + /// Vector cmpgt. #[inline] #[target_feature(enable = "altivec")]