Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: crosstest/mem_intrin.h

Issue 1278173009: Inline memove for small constant sizes and refactor memcpy and memset. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Simplify xtests and add flags for memory intrinsic optimization. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: crosstest/mem_intrin.h
diff --git a/crosstest/mem_intrin.h b/crosstest/mem_intrin.h
index 70f02ae7394da5292736e3fc44daf410239d5185..c5cbacfb493df460d1004a8d6ad61b483f3bc9ba 100644
--- a/crosstest/mem_intrin.h
+++ b/crosstest/mem_intrin.h
@@ -5,10 +5,15 @@
* under different namespaces.
*/
+#include "mem_intrin.def"
+
int memcpy_test(uint8_t *buf, uint8_t *buf2, uint8_t init, size_t length);
int memmove_test(uint8_t *buf, uint8_t *buf2, uint8_t init, size_t length);
int memset_test(uint8_t *buf, uint8_t *buf2, uint8_t init, size_t length);
-int memcpy_test_fixed_len(uint8_t init);
-int memmove_test_fixed_len(uint8_t init);
-int memset_test_fixed_len(uint8_t init);
+#define X(NBYTES) \
+ int memcpy_test_fixed_len_##NBYTES(uint8_t init); \
+ int memmove_test_fixed_len_##NBYTES(uint8_t init); \
+ int memset_test_fixed_len_##NBYTES(uint8_t init);
+VALUES
+#undef X

Powered by Google App Engine
This is Rietveld 408576698