@@ -1032,6 +1032,30 @@ pub unsafe fn vtstq_p8(a: poly8x16_t, b: poly8x16_t) -> uint8x16_t {
1032
1032
simd_ne(c, transmute(d))
1033
1033
}
1034
1034
1035
+ /// Signed compare bitwise Test bits nonzero
1036
+ #[inline]
1037
+ #[target_feature(enable = "neon")]
1038
+ #[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
1039
+ #[cfg_attr(all(test, target_arch = "arm"), assert_instr(vtst))]
1040
+ #[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(cmtst))]
1041
+ pub unsafe fn vtst_p16(a: poly16x4_t, b: poly16x4_t) -> uint16x4_t {
1042
+ let c: poly16x4_t = simd_and(a, b);
1043
+ let d: i16x4 = i16x4::new(0, 0, 0, 0);
1044
+ simd_ne(c, transmute(d))
1045
+ }
1046
+
1047
+ /// Signed compare bitwise Test bits nonzero
1048
+ #[inline]
1049
+ #[target_feature(enable = "neon")]
1050
+ #[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
1051
+ #[cfg_attr(all(test, target_arch = "arm"), assert_instr(vtst))]
1052
+ #[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(cmtst))]
1053
+ pub unsafe fn vtstq_p16(a: poly16x8_t, b: poly16x8_t) -> uint16x8_t {
1054
+ let c: poly16x8_t = simd_and(a, b);
1055
+ let d: i16x8 = i16x8::new(0, 0, 0, 0, 0, 0, 0, 0);
1056
+ simd_ne(c, transmute(d))
1057
+ }
1058
+
1035
1059
/// Unsigned compare bitwise Test bits nonzero
1036
1060
#[inline]
1037
1061
#[target_feature(enable = "neon")]
@@ -25039,6 +25063,24 @@ mod test {
25039
25063
assert_eq!(r, e);
25040
25064
}
25041
25065
25066
+ #[simd_test(enable = "neon")]
25067
+ unsafe fn test_vtst_p16() {
25068
+ let a: i16x4 = i16x4::new(-32768, 0x00, 0x01, 0x02);
25069
+ let b: i16x4 = i16x4::new(-32768, 0x00, 0x01, 0x02);
25070
+ let e: u16x4 = u16x4::new(0xFF_FF, 0, 0xFF_FF, 0xFF_FF);
25071
+ let r: u16x4 = transmute(vtst_p16(transmute(a), transmute(b)));
25072
+ assert_eq!(r, e);
25073
+ }
25074
+
25075
+ #[simd_test(enable = "neon")]
25076
+ unsafe fn test_vtstq_p16() {
25077
+ let a: i16x8 = i16x8::new(-32768, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06);
25078
+ let b: i16x8 = i16x8::new(-32768, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06);
25079
+ let e: u16x8 = u16x8::new(0xFF_FF, 0, 0xFF_FF, 0xFF_FF, 0xFF_FF, 0xFF_FF, 0xFF_FF, 0xFF_FF);
25080
+ let r: u16x8 = transmute(vtstq_p16(transmute(a), transmute(b)));
25081
+ assert_eq!(r, e);
25082
+ }
25083
+
25042
25084
#[simd_test(enable = "neon")]
25043
25085
unsafe fn test_vtst_u8() {
25044
25086
let a: u8x8 = u8x8::new(0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06);
0 commit comments