OLD | NEW |
1 //===- subzero/crosstest/test_bitmanip_main.cpp - Driver for tests. -------===// | 1 //===- subzero/crosstest/test_bitmanip_main.cpp - Driver for tests. -------===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // Driver for cross testing bit manipulation intrinsics. | 10 // Driver for cross testing bit manipulation intrinsics. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 ++Failures; | 104 ++Failures; |
105 std::cout << "test_" << Funcs[f].Name << (CHAR_BIT * sizeof(Type)) | 105 std::cout << "test_" << Funcs[f].Name << (CHAR_BIT * sizeof(Type)) |
106 << "(" << static_cast<uint64>(Value) | 106 << "(" << static_cast<uint64>(Value) |
107 << "): sz=" << static_cast<uint64>(ResultSz) | 107 << "): sz=" << static_cast<uint64>(ResultSz) |
108 << " llc=" << static_cast<uint64>(ResultLlc) << "\n"; | 108 << " llc=" << static_cast<uint64>(ResultLlc) << "\n"; |
109 } | 109 } |
110 } | 110 } |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 #ifdef X8664_STACK_HACK | |
115 extern "C" int wrapped_main(int argc, char *argv[]) { | |
116 #else // !defined(X8664_STACK_HACK) | |
117 int main(int argc, char *argv[]) { | 114 int main(int argc, char *argv[]) { |
118 #endif // X8664_STACK_HACK | |
119 size_t TotalTests = 0; | 115 size_t TotalTests = 0; |
120 size_t Passes = 0; | 116 size_t Passes = 0; |
121 size_t Failures = 0; | 117 size_t Failures = 0; |
122 | 118 |
123 testBitManip<uint32_t>(TotalTests, Passes, Failures); | 119 testBitManip<uint32_t>(TotalTests, Passes, Failures); |
124 testBitManip<uint64>(TotalTests, Passes, Failures); | 120 testBitManip<uint64>(TotalTests, Passes, Failures); |
125 testByteSwap<uint16_t>(TotalTests, Passes, Failures); | 121 testByteSwap<uint16_t>(TotalTests, Passes, Failures); |
126 testByteSwap<uint32_t>(TotalTests, Passes, Failures); | 122 testByteSwap<uint32_t>(TotalTests, Passes, Failures); |
127 testByteSwap<uint64>(TotalTests, Passes, Failures); | 123 testByteSwap<uint64>(TotalTests, Passes, Failures); |
128 | 124 |
129 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes | 125 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes |
130 << " Failures=" << Failures << "\n"; | 126 << " Failures=" << Failures << "\n"; |
131 return Failures; | 127 return Failures; |
132 } | 128 } |
OLD | NEW |