OLD | NEW |
1 /* crosstest.py --test=mem_intrin.cpp --driver=mem_intrin_main.cpp \ | 1 /* crosstest.py --test=mem_intrin.cpp --driver=mem_intrin_main.cpp \ |
2 --prefix=Subzero_ --output=mem_intrin */ | 2 --prefix=Subzero_ --output=mem_intrin */ |
3 | 3 |
4 #include <stdint.h> /* cstdint requires -std=c++0x or higher */ | 4 #include <stdint.h> /* cstdint requires -std=c++0x or higher */ |
5 #include <cstdio> | 5 #include <cstdio> |
6 | 6 |
7 #include "mem_intrin.h" | 7 #include "mem_intrin.h" |
8 #include "xdefs.h" | 8 #include "xdefs.h" |
9 | 9 |
10 namespace Subzero_ { | 10 namespace Subzero_ { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 #define X(NBYTES) \ | 57 #define X(NBYTES) \ |
58 do_test_fixed(memcpy_test_fixed_len, NBYTES); \ | 58 do_test_fixed(memcpy_test_fixed_len, NBYTES); \ |
59 do_test_fixed(memmove_test_fixed_len, NBYTES); \ | 59 do_test_fixed(memmove_test_fixed_len, NBYTES); \ |
60 do_test_fixed(memset_test_fixed_len, NBYTES); | 60 do_test_fixed(memset_test_fixed_len, NBYTES); |
61 MEMINTRIN_SIZE_TABLE | 61 MEMINTRIN_SIZE_TABLE |
62 #undef X | 62 #undef X |
63 #undef do_test_fixed | 63 #undef do_test_fixed |
64 } | 64 } |
65 | 65 |
66 #ifdef X8664_STACK_HACK | |
67 extern "C" int wrapped_main(int argc, char *argv[]) { | |
68 #else // !defined(X8664_STACK_HACK) | |
69 int main(int argc, char *argv[]) { | 66 int main(int argc, char *argv[]) { |
70 #endif // X8664_STACK_HACK | |
71 unsigned TotalTests = 0; | 67 unsigned TotalTests = 0; |
72 unsigned Passes = 0; | 68 unsigned Passes = 0; |
73 unsigned Failures = 0; | 69 unsigned Failures = 0; |
74 testFixedLen(TotalTests, Passes, Failures); | 70 testFixedLen(TotalTests, Passes, Failures); |
75 testVariableLen(TotalTests, Passes, Failures); | 71 testVariableLen(TotalTests, Passes, Failures); |
76 printf("TotalTests=%u Passes=%u Failures=%u\n", TotalTests, Passes, Failures); | 72 printf("TotalTests=%u Passes=%u Failures=%u\n", TotalTests, Passes, Failures); |
77 return Failures; | 73 return Failures; |
78 } | 74 } |
OLD | NEW |