DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] x86: rte_mov256 was missing for AVX2
@ 2022-08-20 10:30 Morten Brørup
  2022-08-29 10:55 ` Thomas Monjalon
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Morten Brørup @ 2022-08-20 10:30 UTC (permalink / raw)
  To: bruce.richardson, konstantin.v.ananyev; +Cc: dev, Morten Brørup

The rte_mov256 function was missing for AVX2.
Does nobody build test for AVX2 and check the compiler output?

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/eal/x86/include/rte_memcpy.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/lib/eal/x86/include/rte_memcpy.h b/lib/eal/x86/include/rte_memcpy.h
index b678b5c942..d4d7a5cfc8 100644
--- a/lib/eal/x86/include/rte_memcpy.h
+++ b/lib/eal/x86/include/rte_memcpy.h
@@ -371,6 +371,23 @@ rte_mov128(uint8_t *dst, const uint8_t *src)
 	rte_mov32((uint8_t *)dst + 3 * 32, (const uint8_t *)src + 3 * 32);
 }
 
+/**
+ * Copy 256 bytes from one location to another,
+ * locations should not overlap.
+ */
+static __rte_always_inline void
+rte_mov256(uint8_t *dst, const uint8_t *src)
+{
+	rte_mov32((uint8_t *)dst + 0 * 32, (const uint8_t *)src + 0 * 32);
+	rte_mov32((uint8_t *)dst + 1 * 32, (const uint8_t *)src + 1 * 32);
+	rte_mov32((uint8_t *)dst + 2 * 32, (const uint8_t *)src + 2 * 32);
+	rte_mov32((uint8_t *)dst + 3 * 32, (const uint8_t *)src + 3 * 32);
+	rte_mov32((uint8_t *)dst + 4 * 32, (const uint8_t *)src + 4 * 32);
+	rte_mov32((uint8_t *)dst + 5 * 32, (const uint8_t *)src + 5 * 32);
+	rte_mov32((uint8_t *)dst + 6 * 32, (const uint8_t *)src + 6 * 32);
+	rte_mov32((uint8_t *)dst + 7 * 32, (const uint8_t *)src + 7 * 32);
+}
+
 /**
  * Copy 128-byte blocks from one location to another,
  * locations should not overlap.
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-09-30  8:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-20 10:30 [PATCH] x86: rte_mov256 was missing for AVX2 Morten Brørup
2022-08-29 10:55 ` Thomas Monjalon
2022-08-29 12:18   ` Morten Brørup
2022-08-29 13:12     ` Thomas Monjalon
2022-09-28 19:44 ` Morten Brørup
2022-09-29  8:25   ` Bruce Richardson
2022-09-30  8:34 ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).