aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/vector_sse42.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-03-19 15:38:40 +0100
committerNeale Ranns <nranns@cisco.com>2019-03-26 10:31:01 +0000
commitc59b9a26ed9a6bc083db2868b6993add6fd2ba5b (patch)
tree70496bdc4ad01ab9e11cd07913f2aec681fac324 /src/vppinfra/vector_sse42.h
parent8e22054209ae9c4f08dae16f1aff910d8c8d0b76 (diff)
ipsec: esp-encrypt rework
Change-Id: Ibe7f806b9d600994e83c9f1be526fdb0a1ef1833 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/vector_sse42.h')
-rw-r--r--src/vppinfra/vector_sse42.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vppinfra/vector_sse42.h b/src/vppinfra/vector_sse42.h
index 5d6a47d3915..ee5b4dcc7df 100644
--- a/src/vppinfra/vector_sse42.h
+++ b/src/vppinfra/vector_sse42.h
@@ -691,6 +691,18 @@ u32x4_scatter_one (u32x4 r, int index, void *p)
*(u32 *) p = r[index];
}
+static_always_inline u8x16
+u8x16_is_greater (u8x16 v1, u8x16 v2)
+{
+ return (u8x16) _mm_cmpgt_epi8 ((__m128i) v1, (__m128i) v2);
+}
+
+static_always_inline u8x16
+u8x16_blend (u8x16 v1, u8x16 v2, u8x16 mask)
+{
+ return (u8x16) _mm_blendv_epi8 ((__m128i) v1, (__m128i) v2, (__m128i) mask);
+}
+
#endif /* included_vector_sse2_h */