blob: 8b13fa258603ba20c8abe81d6121f1aaae1551bb [file] [log] [blame]
Jan Voung3bd9f1a2014-06-18 10:50:57 -07001/*
2 * Simple sanity test of memcpy, memmove, and memset intrinsics.
3 * (fixed length buffers, variable length buffers, etc.).
4 * There is no include guard since this will be included multiple times,
5 * under different namespaces.
6 */
John Porto1d235422015-08-12 12:37:53 -07007#include "xdefs.h"
Jan Voung3bd9f1a2014-06-18 10:50:57 -07008
Andrew Scullcfa628b2015-08-20 14:23:05 -07009#include "mem_intrin.def"
10
John Porto1d235422015-08-12 12:37:53 -070011int memcpy_test(uint8_t *buf, uint8_t *buf2, uint8_t init, SizeT length);
12int memmove_test(uint8_t *buf, uint8_t *buf2, uint8_t init, SizeT length);
13int memset_test(uint8_t *buf, uint8_t *buf2, uint8_t init, SizeT length);
Jan Voung3bd9f1a2014-06-18 10:50:57 -070014
Andrew Scullcfa628b2015-08-20 14:23:05 -070015#define X(NBYTES) \
16 int memcpy_test_fixed_len_##NBYTES(uint8_t init); \
17 int memmove_test_fixed_len_##NBYTES(uint8_t init); \
18 int memset_test_fixed_len_##NBYTES(uint8_t init);
19MEMINTRIN_SIZE_TABLE
20#undef X