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

Unified Diff: crosstest/mem_intrin.cpp

Issue 389683003: Remove memcpy test workaround for name mangling substitutions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « crosstest/mem_intrin.h ('k') | crosstest/mem_intrin_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crosstest/mem_intrin.cpp
diff --git a/crosstest/mem_intrin.cpp b/crosstest/mem_intrin.cpp
index baeb06dc4b27fd57f687961f3db122718a6458f4..4a65995e5859f3dc09a42a523b831d052621cd97 100644
--- a/crosstest/mem_intrin.cpp
+++ b/crosstest/mem_intrin.cpp
@@ -48,29 +48,29 @@ int memcpy_test_fixed_len(uint8_t init) {
elem_t buf2[NWORDS];
reset_buf((uint8_t *)buf, init, BYTE_LENGTH);
memcpy((void *)buf2, (void *)buf, BYTE_LENGTH);
- return fletcher_checksum((uint8_t*)buf2, BYTE_LENGTH);
+ return fletcher_checksum((uint8_t *)buf2, BYTE_LENGTH);
}
int memmove_test_fixed_len(uint8_t init) {
elem_t buf[NWORDS];
reset_buf((uint8_t *)buf, init, BYTE_LENGTH);
memmove((void *)(buf + 4), (void *)buf, BYTE_LENGTH - (4 * sizeof(elem_t)));
- return fletcher_checksum((uint8_t*)buf + 4, BYTE_LENGTH - 4);
+ return fletcher_checksum((uint8_t *)buf + 4, BYTE_LENGTH - 4);
}
int memset_test_fixed_len(uint8_t init) {
elem_t buf[NWORDS];
memset((void *)buf, init, BYTE_LENGTH);
- return fletcher_checksum((uint8_t*)buf, BYTE_LENGTH);
+ return fletcher_checksum((uint8_t *)buf, BYTE_LENGTH);
}
-int memcpy_test(uint8_t *buf, void *buf2, uint8_t init, size_t length) {
+int memcpy_test(uint8_t *buf, uint8_t *buf2, uint8_t init, size_t length) {
reset_buf(buf, init, length);
- memcpy(buf2, (void *)buf, length);
- return fletcher_checksum((uint8_t *)buf2, length);
+ memcpy((void *)buf2, (void *)buf, length);
+ return fletcher_checksum(buf2, length);
}
-int memmove_test(uint8_t *buf, void *buf2, uint8_t init, size_t length) {
+int memmove_test(uint8_t *buf, uint8_t *buf2, uint8_t init, size_t length) {
int sum1;
int sum2;
const int overlap_bytes = 4 * sizeof(elem_t);
@@ -84,14 +84,13 @@ int memmove_test(uint8_t *buf, void *buf2, uint8_t init, size_t length) {
memmove((void *)overlap_buf, (void *)buf, reduced_length);
sum1 = fletcher_checksum(overlap_buf, reduced_length);
/* Test w/out overlap. */
- memmove(buf2, (void *)buf, length);
- sum2 = fletcher_checksum((uint8_t *)buf2, length);
+ memmove((void *)buf2, (void *)buf, length);
+ sum2 = fletcher_checksum(buf2, length);
return sum1 + sum2;
}
-int memset_test(uint8_t *buf, void *buf2, uint8_t init, size_t length) {
+int memset_test(uint8_t *buf, uint8_t *buf2, uint8_t init, size_t length) {
memset((void *)buf, init, length);
- memset(buf2, init + 4, length);
- return fletcher_checksum(buf, length) +
- fletcher_checksum((uint8_t *)buf2, length);
+ memset((void *)buf2, init + 4, length);
+ return fletcher_checksum(buf, length) + fletcher_checksum(buf2, length);
}
« no previous file with comments | « crosstest/mem_intrin.h ('k') | crosstest/mem_intrin_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698