diff options
| author | Luca Barbato <lu_zero@gentoo.org> | 2023-04-08 17:13:53 +0000 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2023-04-13 01:54:42 +0100 |
| commit | b27fcf7ba383126b3dbdbdffa8c34a64b38d354e (patch) | |
| tree | ae49a98d2fadca9a6dd27d34bb5f56a58585eac8 | |
| parent | 6e78450cb553811bc20a41c4bb4164e2c01b6d90 (diff) | |
| download | rust-b27fcf7ba383126b3dbdbdffa8c34a64b38d354e.tar.gz rust-b27fcf7ba383126b3dbdbdffa8c34a64b38d354e.zip | |
Add vec_any_nan, vec_any_nge, vec_any_ngt, vec_any_nle, vec_any_nlt and vec_any_numeric
| -rw-r--r-- | library/stdarch/crates/core_arch/src/powerpc/altivec.rs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/library/stdarch/crates/core_arch/src/powerpc/altivec.rs b/library/stdarch/crates/core_arch/src/powerpc/altivec.rs index a9a75772ec5..7087a9d345a 100644 --- a/library/stdarch/crates/core_arch/src/powerpc/altivec.rs +++ b/library/stdarch/crates/core_arch/src/powerpc/altivec.rs @@ -2329,6 +2329,14 @@ pub unsafe fn vec_all_nan(a: vector_float) -> bool { vcmpeqfp_p(0, a, a) != 0 } +/// Any Elements Not a Number +#[inline] +#[target_feature(enable = "altivec")] +#[cfg_attr(test, assert_instr("vcmpeqfp."))] +pub unsafe fn vec_any_nan(a: vector_float) -> bool { + vcmpeqfp_p(3, a, a) != 0 +} + /// Vector All Elements Not Equal #[inline] #[target_feature(enable = "altivec")] @@ -2389,6 +2397,46 @@ pub unsafe fn vec_all_numeric(a: vector_float) -> bool { vcmpgefp_p(2, a, a) != 0 } +/// Any Elements Not Greater Than or Equal +#[inline] +#[target_feature(enable = "altivec")] +#[cfg_attr(test, assert_instr("vcmpgefp."))] +pub unsafe fn vec_any_nge(a: vector_float, b: vector_float) -> bool { + vcmpgefp_p(3, a, b) != 0 +} + +/// Any Elements Not Greater Than +#[inline] +#[target_feature(enable = "altivec")] +#[cfg_attr(test, assert_instr("vcmpgtfp."))] +pub unsafe fn vec_any_ngt(a: vector_float, b: vector_float) -> bool { + vcmpgtfp_p(3, a, b) != 0 +} + +/// Any Elements Not Less Than or Equal +#[inline] +#[target_feature(enable = "altivec")] +#[cfg_attr(test, assert_instr("vcmpgefp."))] +pub unsafe fn vec_any_nle(a: vector_float, b: vector_float) -> bool { + vcmpgefp_p(3, b, a) != 0 +} + +/// Any Elements Not Less Than +#[inline] +#[target_feature(enable = "altivec")] +#[cfg_attr(test, assert_instr("vcmpgtfp."))] +pub unsafe fn vec_any_nlt(a: vector_float, b: vector_float) -> bool { + vcmpgtfp_p(3, b, a) != 0 +} + +/// Any Elements Numeric +#[inline] +#[target_feature(enable = "altivec")] +#[cfg_attr(test, assert_instr("vcmpgefp."))] +pub unsafe fn vec_any_numeric(a: vector_float) -> bool { + vcmpgefp_p(1, a, a) != 0 +} + #[cfg(target_endian = "big")] mod endian { use super::*; |
