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

Side by Side Diff: crosstest/test_global_main.cpp

Issue 1506653002: Subzero: Add Non-SFI support for x86-32. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 11 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_arith_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_global_main.cpp - Driver for tests ----------===// 1 //===- subzero/crosstest/test_global_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 crosstesting global variable access operations. 10 // Driver for crosstesting global variable access operations.
(...skipping 21 matching lines...) Expand all
32 double d; 32 double d;
33 }; 33 };
34 34
35 struct Data SimpleData = {-111, 2.69, 55.19}; 35 struct Data SimpleData = {-111, 2.69, 55.19};
36 36
37 struct Data *ExternName4 = &SimpleData; 37 struct Data *ExternName4 = &SimpleData;
38 38
39 double ExternName5 = 3.44e26; 39 double ExternName5 = 3.44e26;
40 40
41 int main(int argc, char **argv) { 41 int main(int argc, char **argv) {
42 // Prevent pnacl-opt from deleting "unused" globals.
43 if (argc < 0) {
44 std::cout << &ExternName1 << &ExternName2 << &ExternName3 << &SimpleData
45 << &ExternName4 << ExternName5;
46 }
42 size_t TotalTests = 0; 47 size_t TotalTests = 0;
43 size_t Passes = 0; 48 size_t Passes = 0;
44 size_t Failures = 0; 49 size_t Failures = 0;
45 50
46 const uint8_t *SzArray, *LlcArray; 51 const uint8_t *SzArray, *LlcArray;
47 size_t SzArrayLen, LlcArrayLen; 52 size_t SzArrayLen, LlcArrayLen;
48 53
49 size_t NumArrays = getNumArrays(); 54 size_t NumArrays = getNumArrays();
50 for (size_t i = 0; i < NumArrays; ++i) { 55 for (size_t i = 0; i < NumArrays; ++i) {
51 LlcArrayLen = -1; 56 LlcArrayLen = -1;
(...skipping 18 matching lines...) Expand all
70 std::cout << i << ":LlcArray[" << i << "] = " << (int)LlcArray[i] 75 std::cout << i << ":LlcArray[" << i << "] = " << (int)LlcArray[i]
71 << ", SzArray[" << i << "] = " << (int)SzArray[i] << "\n"; 76 << ", SzArray[" << i << "] = " << (int)SzArray[i] << "\n";
72 } 77 }
73 } 78 }
74 } 79 }
75 80
76 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes 81 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes
77 << " Failures=" << Failures << "\n"; 82 << " Failures=" << Failures << "\n";
78 return Failures; 83 return Failures;
79 } 84 }
OLDNEW
« no previous file with comments | « crosstest/test_arith_main.cpp ('k') | crosstest/test_icmp_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698