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

Side by Side Diff: test/cctest/compiler/value-helper.h

Issue 798413003: Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Svens smiley. Created 6 years 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 | « test/cctest/compiler/test-typer.cc ('k') | test/cctest/test-assembler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CCTEST_COMPILER_VALUE_HELPER_H_ 5 #ifndef V8_CCTEST_COMPILER_VALUE_HELPER_H_
6 #define V8_CCTEST_COMPILER_VALUE_HELPER_H_ 6 #define V8_CCTEST_COMPILER_VALUE_HELPER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 1.4495e+24f, 5.94015e+25f, 4.43608e+30f, 95 1.4495e+24f, 5.94015e+25f, 4.43608e+30f,
96 2.44502e+33f, 2.61152e+33f, 1.38178e+37f, 96 2.44502e+33f, 2.61152e+33f, 1.38178e+37f,
97 1.71306e+37f, 3.31899e+38f, 3.40282e+38f, 97 1.71306e+37f, 3.31899e+38f, 3.40282e+38f,
98 std::numeric_limits<float>::infinity()}; 98 std::numeric_limits<float>::infinity()};
99 return std::vector<float>(&kValues[0], &kValues[arraysize(kValues)]); 99 return std::vector<float>(&kValues[0], &kValues[arraysize(kValues)]);
100 } 100 }
101 101
102 static std::vector<double> float64_vector() { 102 static std::vector<double> float64_vector() {
103 static const double nan = v8::base::OS::nan_value(); 103 static const double nan = v8::base::OS::nan_value();
104 static const double values[] = { 104 static const double values[] = {
105 0.125, 0.25, 0.375, 0.5, 105 0.125, 0.25, 0.375, 0.5, 1.25, -1.75, 2, 5.125, 6.25, 0.0, -0.0,
106 1.25, -1.75, 2, 5.125, 106 982983.25, 888, 2147483647.0, -999.75, 3.1e7, -2e66, 3e-88,
107 6.25, 0.0, -0.0, 982983.25, 107 -2147483648.0, std::numeric_limits<double>::infinity(),
108 888, 2147483647.0, -999.75, 3.1e7, 108 -std::numeric_limits<double>::infinity(), nan, 2147483647.375,
109 -2e66, 3e-88, -2147483648.0, V8_INFINITY, 109 2147483647.75, 2147483648.0, 2147483648.25, 2147483649.25,
110 -V8_INFINITY, nan, 2147483647.375, 2147483647.75, 110 -2147483647.0, -2147483647.125, -2147483647.875, -2147483648.25,
111 2147483648.0, 2147483648.25, 2147483649.25, -2147483647.0, 111 -2147483649.5};
112 -2147483647.125, -2147483647.875, -2147483648.25, -2147483649.5};
113 return std::vector<double>(&values[0], &values[arraysize(values)]); 112 return std::vector<double>(&values[0], &values[arraysize(values)]);
114 } 113 }
115 114
116 static const std::vector<int32_t> int32_vector() { 115 static const std::vector<int32_t> int32_vector() {
117 std::vector<uint32_t> values = uint32_vector(); 116 std::vector<uint32_t> values = uint32_vector();
118 return std::vector<int32_t>(values.begin(), values.end()); 117 return std::vector<int32_t>(values.begin(), values.end());
119 } 118 }
120 119
121 static const std::vector<uint32_t> uint32_vector() { 120 static const std::vector<uint32_t> uint32_vector() {
122 static const uint32_t kValues[] = { 121 static const uint32_t kValues[] = {
123 0x00000000, 0x00000001, 0xffffffff, 0x1b09788b, 0x04c5fce8, 0xcc0de5bf, 122 0x00000000, 0x00000001, 0xffffffff, 0x1b09788b, 0x04c5fce8, 0xcc0de5bf,
124 // This row is useful for testing lea optimizations on intel. 123 // This row is useful for testing lea optimizations on intel.
125 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000008, 0x00000009, 124 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000008, 0x00000009,
126 0x273a798e, 0x187937a3, 0xece3af83, 0x5495a16b, 0x0b668ecc, 0x11223344, 125 0x273a798e, 0x187937a3, 0xece3af83, 0x5495a16b, 0x0b668ecc, 0x11223344,
127 0x0000009e, 0x00000043, 0x0000af73, 0x0000116b, 0x00658ecc, 0x002b3b4c, 126 0x0000009e, 0x00000043, 0x0000af73, 0x0000116b, 0x00658ecc, 0x002b3b4c,
128 0x88776655, 0x70000000, 0x07200000, 0x7fffffff, 0x56123761, 0x7fffff00, 127 0x88776655, 0x70000000, 0x07200000, 0x7fffffff, 0x56123761, 0x7fffff00,
129 0x761c4761, 0x80000000, 0x88888888, 0xa0000000, 0xdddddddd, 0xe0000000, 128 0x761c4761, 0x80000000, 0x88888888, 0xa0000000, 0xdddddddd, 0xe0000000,
130 0xeeeeeeee, 0xfffffffd, 0xf0000000, 0x007fffff, 0x003fffff, 0x001fffff, 129 0xeeeeeeee, 0xfffffffd, 0xf0000000, 0x007fffff, 0x003fffff, 0x001fffff,
131 0x000fffff, 0x0007ffff, 0x0003ffff, 0x0001ffff, 0x0000ffff, 0x00007fff, 130 0x000fffff, 0x0007ffff, 0x0003ffff, 0x0001ffff, 0x0000ffff, 0x00007fff,
132 0x00003fff, 0x00001fff, 0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff}; 131 0x00003fff, 0x00001fff, 0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff};
133 return std::vector<uint32_t>(&kValues[0], &kValues[arraysize(kValues)]); 132 return std::vector<uint32_t>(&kValues[0], &kValues[arraysize(kValues)]);
134 } 133 }
135 134
136 static const std::vector<double> nan_vector(size_t limit = 0) { 135 static const std::vector<double> nan_vector(size_t limit = 0) {
137 static const double nan = v8::base::OS::nan_value(); 136 static const double nan = v8::base::OS::nan_value();
138 static const double values[] = {-nan, -V8_INFINITY * -0.0, 137 static const double values[] = {
139 -V8_INFINITY * 0.0, V8_INFINITY * -0.0, 138 -nan, -std::numeric_limits<double>::infinity() * -0.0,
140 V8_INFINITY * 0.0, nan}; 139 -std::numeric_limits<double>::infinity() * 0.0,
140 std::numeric_limits<double>::infinity() * -0.0,
141 std::numeric_limits<double>::infinity() * 0.0, nan};
141 return std::vector<double>(&values[0], &values[arraysize(values)]); 142 return std::vector<double>(&values[0], &values[arraysize(values)]);
142 } 143 }
143 144
144 static const std::vector<uint32_t> ror_vector() { 145 static const std::vector<uint32_t> ror_vector() {
145 static const uint32_t kValues[31] = { 146 static const uint32_t kValues[31] = {
146 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 147 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
147 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}; 148 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
148 return std::vector<uint32_t>(&kValues[0], &kValues[arraysize(kValues)]); 149 return std::vector<uint32_t>(&kValues[0], &kValues[arraysize(kValues)]);
149 } 150 }
150 }; 151 };
(...skipping 12 matching lines...) Expand all
163 164
164 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++) 165 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++)
165 166
166 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++) 167 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++)
167 168
168 } // namespace compiler 169 } // namespace compiler
169 } // namespace internal 170 } // namespace internal
170 } // namespace v8 171 } // namespace v8
171 172
172 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_ 173 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-typer.cc ('k') | test/cctest/test-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698