Chromium Code Reviews| Index: crosstest/mem_intrin.h |
| diff --git a/crosstest/mem_intrin.h b/crosstest/mem_intrin.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6683ab132ab1deb119c62627a882885a43c08a63 |
| --- /dev/null |
| +++ b/crosstest/mem_intrin.h |
| @@ -0,0 +1,20 @@ |
| +/* |
| + * Simple sanity test of memcpy, memmove, and memset intrinsics. |
| + * (fixed length buffers, variable length buffers, etc.) |
| + */ |
| + |
| +#include <stdint.h> /* cstdint requires -std=c++0x or higher */ |
|
Jim Stichnoth
2014/06/16 23:05:16
Since mem_intrin.h is now being #included inside n
jvoung (off chromium)
2014/06/17 17:36:19
Hmm good point. I don't know of any way to pop nam
|
| +#include <cstring> |
| + |
| +/* Declare first buf as uint8_t * and second as void *, to avoid C++ |
| + * name mangling's use of substitutions. Otherwise Subzero's name |
| + * mangling injection will need to bump each substitution sequence ID |
| + * up by one (e.g., from S_ to S0_ and S1_ to S2_). |
| + */ |
| +int memcpy_test(uint8_t *buf, void *buf2, uint8_t init, size_t length); |
| +int memmove_test(uint8_t *buf, void *buf2, uint8_t init, size_t length); |
| +int memset_test(uint8_t *buf, void *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); |