@@ -4646,6 +4646,19 @@ pub unsafe fn vmull_high_u32(a: uint32x4_t, b: uint32x4_t) -> uint64x2_t {
4646
4646
vmull_u32(a, b)
4647
4647
}
4648
4648
4649
+ /// Polynomial multiply long
4650
+ #[inline]
4651
+ #[target_feature(enable = "neon,crypto")]
4652
+ #[cfg_attr(test, assert_instr(pmull))]
4653
+ pub unsafe fn vmull_p64(a: p64, b: p64) -> p128 {
4654
+ #[allow(improper_ctypes)]
4655
+ extern "C" {
4656
+ #[cfg_attr(target_arch = "aarch64", link_name = "llvm.aarch64.neon.pmull64")]
4657
+ fn vmull_p64_(a: p64, b: p64) -> int8x16_t;
4658
+ }
4659
+ transmute(vmull_p64_(a, b))
4660
+ }
4661
+
4649
4662
/// Polynomial multiply long
4650
4663
#[inline]
4651
4664
#[target_feature(enable = "neon")]
@@ -4656,6 +4669,14 @@ pub unsafe fn vmull_high_p8(a: poly8x16_t, b: poly8x16_t) -> poly16x8_t {
4656
4669
vmull_p8(a, b)
4657
4670
}
4658
4671
4672
+ /// Polynomial multiply long
4673
+ #[inline]
4674
+ #[target_feature(enable = "neon,crypto")]
4675
+ #[cfg_attr(test, assert_instr(pmull))]
4676
+ pub unsafe fn vmull_high_p64(a: poly64x2_t, b: poly64x2_t) -> p128 {
4677
+ vmull_p64(simd_extract(a, 1), simd_extract(b, 1))
4678
+ }
4679
+
4659
4680
/// Multiply long
4660
4681
#[inline]
4661
4682
#[target_feature(enable = "neon")]
@@ -12612,6 +12633,15 @@ mod test {
12612
12633
assert_eq!(r, e);
12613
12634
}
12614
12635
12636
+ #[simd_test(enable = "neon")]
12637
+ unsafe fn test_vmull_p64() {
12638
+ let a: p64 = 15;
12639
+ let b: p64 = 3;
12640
+ let e: p128 = 17;
12641
+ let r: p128 = transmute(vmull_p64(transmute(a), transmute(b)));
12642
+ assert_eq!(r, e);
12643
+ }
12644
+
12615
12645
#[simd_test(enable = "neon")]
12616
12646
unsafe fn test_vmull_high_p8() {
12617
12647
let a: i8x16 = i8x16::new(1, 2, 9, 10, 9, 10, 11, 12, 9, 10, 11, 12, 13, 14, 15, 16);
@@ -12621,6 +12651,15 @@ mod test {
12621
12651
assert_eq!(r, e);
12622
12652
}
12623
12653
12654
+ #[simd_test(enable = "neon")]
12655
+ unsafe fn test_vmull_high_p64() {
12656
+ let a: i64x2 = i64x2::new(1, 15);
12657
+ let b: i64x2 = i64x2::new(1, 3);
12658
+ let e: p128 = 17;
12659
+ let r: p128 = transmute(vmull_high_p64(transmute(a), transmute(b)));
12660
+ assert_eq!(r, e);
12661
+ }
12662
+
12624
12663
#[simd_test(enable = "neon")]
12625
12664
unsafe fn test_vmull_high_n_s16() {
12626
12665
let a: i16x8 = i16x8::new(1, 2, 9, 10, 9, 10, 11, 12);
0 commit comments