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

Side by Side Diff: crosstest/test_fcmp_main.cpp

Issue 1359193003: Subzero. Enables (most) crosstests for ARM32. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « crosstest/test_cast_main.cpp ('k') | crosstest/test_icmp_main.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/crosstest/test_fcmp_main.cpp - Driver for tests ------------===// 1 //===- subzero/crosstest/test_fcmp_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 the fcmp bitcode instruction 10 // Driver for cross testing the fcmp bitcode instruction
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 std::cout << Funcs[f].Name << "Double(" << Value1Double << ", " 109 std::cout << Funcs[f].Name << "Double(" << Value1Double << ", "
110 << Value2Double << "): sz=" << ResultSz 110 << Value2Double << "): sz=" << ResultSz
111 << " llc=" << ResultLlc << "\n"; 111 << " llc=" << ResultLlc << "\n";
112 } 112 }
113 } 113 }
114 } 114 }
115 } 115 }
116 } 116 }
117 117
118 void testsVector(size_t &TotalTests, size_t &Passes, size_t &Failures) { 118 void testsVector(size_t &TotalTests, size_t &Passes, size_t &Failures) {
119 #ifndef ARM32
120 // TODO(jpp): remove this once vector support is implemented.
119 typedef v4si32 (*FuncTypeVector)(v4f32, v4f32); 121 typedef v4si32 (*FuncTypeVector)(v4f32, v4f32);
120 static struct { 122 static struct {
121 const char *Name; 123 const char *Name;
122 FuncTypeVector FuncVectorSz; 124 FuncTypeVector FuncVectorSz;
123 FuncTypeVector FuncVectorLlc; 125 FuncTypeVector FuncVectorLlc;
124 } Funcs[] = { 126 } Funcs[] = {
125 #define X(cmp) \ 127 #define X(cmp) \
126 { "fcmp" STR(cmp), Subzero_fcmp##cmp##Vector, fcmp##cmp##Vector } \ 128 { "fcmp" STR(cmp), Subzero_fcmp##cmp##Vector, fcmp##cmp##Vector } \
127 , 129 ,
128 FCMP_TABLE 130 FCMP_TABLE
(...skipping 21 matching lines...) Expand all
150 ++Passes; 152 ++Passes;
151 } else { 153 } else {
152 ++Failures; 154 ++Failures;
153 std::cout << Funcs[f].Name << "Vector(" << vectAsString<v4f32>(Value1) 155 std::cout << Funcs[f].Name << "Vector(" << vectAsString<v4f32>(Value1)
154 << ", " << vectAsString<v4f32>(Value2) 156 << ", " << vectAsString<v4f32>(Value2)
155 << "): sz=" << vectAsString<v4si32>(ResultSz) 157 << "): sz=" << vectAsString<v4si32>(ResultSz)
156 << " llc=" << vectAsString<v4si32>(ResultLlc) << "\n"; 158 << " llc=" << vectAsString<v4si32>(ResultLlc) << "\n";
157 } 159 }
158 } 160 }
159 } 161 }
162 #endif // ARM32
160 } 163 }
161 164
162 #ifdef X8664_STACK_HACK 165 #ifdef X8664_STACK_HACK
163 extern "C" int wrapped_main(int argc, char *argv[]) { 166 extern "C" int wrapped_main(int argc, char *argv[]) {
164 #else // !defined(X8664_STACK_HACK) 167 #else // !defined(X8664_STACK_HACK)
165 int main(int argc, char *argv[]) { 168 int main(int argc, char *argv[]) {
166 #endif // X8664_STACK_HACK 169 #endif // X8664_STACK_HACK
167 size_t TotalTests = 0; 170 size_t TotalTests = 0;
168 size_t Passes = 0; 171 size_t Passes = 0;
169 size_t Failures = 0; 172 size_t Failures = 0;
170 173
171 initializeValues(); 174 initializeValues();
172 175
173 testsScalar(TotalTests, Passes, Failures); 176 testsScalar(TotalTests, Passes, Failures);
174 testsVector(TotalTests, Passes, Failures); 177 testsVector(TotalTests, Passes, Failures);
175 178
176 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes 179 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes
177 << " Failures=" << Failures << "\n"; 180 << " Failures=" << Failures << "\n";
178 return Failures; 181 return Failures;
179 } 182 }
OLDNEW
« no previous file with comments | « crosstest/test_cast_main.cpp ('k') | crosstest/test_icmp_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698