about summary refs log tree commit diff
path: root/library/stdarch
diff options
context:
space:
mode:
authorFolkert de Vries <folkert@folkertdev.nl>2025-03-06 16:50:04 +0100
committerAmanieu d'Antras <amanieu@gmail.com>2025-03-16 20:02:22 +0000
commitd218bd162420e8a97a63a10fd13591e4f1a53c00 (patch)
tree0d2b4b711cfd74e8d67a2564323756bd4ac06da5 /library/stdarch
parent790d77e4e6eab1e3e818cbced29508663b38972a (diff)
downloadrust-d218bd162420e8a97a63a10fd13591e4f1a53c00.tar.gz
rust-d218bd162420e8a97a63a10fd13591e4f1a53c00.zip
add `vec_cmprg_or_0_idx_cc` and `vec_cmpnrg_or_0_idx_cc`
Diffstat (limited to 'library/stdarch')
-rw-r--r--library/stdarch/crates/core_arch/src/s390x/vector.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/library/stdarch/crates/core_arch/src/s390x/vector.rs b/library/stdarch/crates/core_arch/src/s390x/vector.rs
index 54bfc98af53..a0d60e55d11 100644
--- a/library/stdarch/crates/core_arch/src/s390x/vector.rs
+++ b/library/stdarch/crates/core_arch/src/s390x/vector.rs
@@ -4848,6 +4848,36 @@ pub unsafe fn vec_cmpnrg_or_0_idx<T: sealed::VectorCompareRange>(a: T, b: T, c:
     a.vstrcz::<{ FindImm::NeIdx as u32 }>(b, c)
 }
 
+/// Vector Compare Ranges or Zero Index with Condition Code
+#[inline]
+#[target_feature(enable = "vector")]
+#[unstable(feature = "stdarch_s390x", issue = "135681")]
+pub unsafe fn vec_cmprg_or_0_idx_cc<T: sealed::VectorCompareRange>(
+    a: T,
+    b: T,
+    c: T,
+    d: *mut i32,
+) -> T::Result {
+    let (x, y) = a.vstrczs::<{ FindImm::EqIdx as u32 }>(b, c);
+    d.write(y);
+    x
+}
+
+/// Vector Compare Not in Ranges or Zero Index with Condition Code
+#[inline]
+#[target_feature(enable = "vector")]
+#[unstable(feature = "stdarch_s390x", issue = "135681")]
+pub unsafe fn vec_cmpnrg_or_0_idx_cc<T: sealed::VectorCompareRange>(
+    a: T,
+    b: T,
+    c: T,
+    d: *mut i32,
+) -> T::Result {
+    let (x, y) = a.vstrczs::<{ FindImm::NeIdx as u32 }>(b, c);
+    d.write(y);
+    x
+}
+
 #[cfg(test)]
 mod tests {
     use super::*;