OLD | NEW |
| 1 //===- subzero/crosstest/test_global.cpp - Global variable access tests ---===// |
| 2 // |
| 3 // The Subzero Code Generator |
| 4 // |
| 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. |
| 7 // |
| 8 //===----------------------------------------------------------------------===// |
| 9 // |
| 10 // Implementation for crosstesting global variable access operations. |
| 11 // |
| 12 //===----------------------------------------------------------------------===// |
| 13 |
1 #include <stdint.h> | 14 #include <stdint.h> |
2 #include <cstdlib> | 15 #include <cstdlib> |
3 | 16 |
4 #include "test_global.h" | 17 #include "test_global.h" |
5 | 18 |
6 // Partially initialized array | 19 // Partially initialized array |
7 int ArrayInitPartial[10] = { 60, 70, 80, 90, 100 }; | 20 int ArrayInitPartial[10] = { 60, 70, 80, 90, 100 }; |
8 int ArrayInitFull[] = { 10, 20, 30, 40, 50 }; | 21 int ArrayInitFull[] = { 10, 20, 30, 40, 50 }; |
9 const int ArrayConst[] = { -10, -20, -30 }; | 22 const int ArrayConst[] = { -10, -20, -30 }; |
10 static double ArrayDouble[10] = { 0.5, 1.5, 2.5, 3.5 }; | 23 static double ArrayDouble[10] = { 0.5, 1.5, 2.5, 3.5 }; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 69 } |
57 #if 0 | 70 #if 0 |
58 if (WhichArray >= NumArraysElements) { | 71 if (WhichArray >= NumArraysElements) { |
59 Len = -1; | 72 Len = -1; |
60 return NULL; | 73 return NULL; |
61 } | 74 } |
62 Len = Arrays[WhichArray].ArraySizeInBytes; | 75 Len = Arrays[WhichArray].ArraySizeInBytes; |
63 return Arrays[WhichArray].ArrayAddress; | 76 return Arrays[WhichArray].ArrayAddress; |
64 #endif // 0 | 77 #endif // 0 |
65 } | 78 } |
OLD | NEW |