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

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

Issue 1584663007: [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: reduced generated code. 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 | « test/cctest/compiler/test-run-machops.cc ('k') | test/cctest/wasm/test-run-wasm.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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 3.40282e+38f, 169 3.40282e+38f,
170 std::numeric_limits<float>::infinity(), 170 std::numeric_limits<float>::infinity(),
171 nan, 171 nan,
172 -nan, 172 -nan,
173 }; 173 };
174 return std::vector<float>(&kValues[0], &kValues[arraysize(kValues)]); 174 return std::vector<float>(&kValues[0], &kValues[arraysize(kValues)]);
175 } 175 }
176 176
177 static std::vector<double> float64_vector() { 177 static std::vector<double> float64_vector() {
178 static const double nan = std::numeric_limits<double>::quiet_NaN(); 178 static const double nan = std::numeric_limits<double>::quiet_NaN();
179 static const double values[] = {-2e66, 179 static const double values[] = {
180 -9223373136366403584.0, 180 -2e66,
181 -9223372036854775808.0, // INT64_MIN 181 -162259276829213363391578010288128.0, // 2^107
182 -2147483649.5, 182 -81129638414606681695789005144064.0, // 2^106
183 -2147483648.25, 183 -40564819207303349855093757313024.0, // 2^105
184 -2147483648.0, 184 -40564819207303340847894502572032.0, -9223373136366403584.75,
185 -2147483647.875, 185 -9223373136366403584.5, -9223373136366403584.25, -9223373136366403584.0,
186 -2147483647.125, 186 -9223372036854775808.0, // INT64_MIN
187 -2147483647.0, 187 -4503599627370497.5,
188 -999.75, 188 -4503599627370496.5, // -2^52 - 0.5
189 -2e66, 189 -4503599627370495.5,
190 -1.75, 190 -2251799813685248.5, // 2^51 + 0.5
191 -1.0, 191 -34359738368.75, -34359738368.5, -34359738368.25,
192 -0.5, 192 -4294967295.0, // -2^32 + 1.0
193 -0.0, 193 -2147483649.5, -2147483648.25, -2147483648.0, -2147483647.875,
194 0.0, 194 -2147483647.125, -2147483647.0, -999.75, -1.75, -1.0, -0.5, -0.0, 0.0,
195 3e-88, 195 3e-88, 0.125, 0.25, 0.375, 0.5, 1.0, 1.25, 2, 3.1e7, 5.125, 6.25, 888,
196 0.125, 196 982983.25, 2147483647.0, 2147483647.375, 2147483647.75, 2147483648.0,
197 0.25, 197 2147483648.25, 2147483649.25,
198 0.375, 198 4294967295.0, // +2^32 + 1.0
199 0.5, 199 34359738368.75, 34359738368.5, 34359738368.25,
200 1.0, 200 2251799813685248.5, // 2^51 + 0.5
201 1.25, 201 4503599627370495.5,
202 2, 202 4503599627370496.5, // 2^52 + 0.5
203 3.1e7, 203 4503599627370497.5,
204 5.125, 204 9223372036854775807.0, // INT64_MAX
205 6.25, 205 9223373136366403584.0,
206 888, 206 18446744073709551615.0, // UINT64_MAX
207 982983.25, 207 // 81129638414606681695789005144064.0,
208 2147483647.0, 208 2e66, V8_INFINITY, -V8_INFINITY, -nan, nan};
209 2147483647.375,
210 2147483647.75,
211 2147483648.0,
212 2147483648.25,
213 2147483649.25,
214 9223372036854775807.0, // INT64_MAX
215 9223373136366403584.0,
216 18446744073709551615.0, // UINT64_MAX
217 2e66,
218 V8_INFINITY,
219 -V8_INFINITY,
220 -nan,
221 nan};
222 return std::vector<double>(&values[0], &values[arraysize(values)]); 209 return std::vector<double>(&values[0], &values[arraysize(values)]);
223 } 210 }
224 211
225 static const std::vector<int32_t> int32_vector() { 212 static const std::vector<int32_t> int32_vector() {
226 std::vector<uint32_t> values = uint32_vector(); 213 std::vector<uint32_t> values = uint32_vector();
227 return std::vector<int32_t>(values.begin(), values.end()); 214 return std::vector<int32_t>(values.begin(), values.end());
228 } 215 }
229 216
230 static const std::vector<uint32_t> uint32_vector() { 217 static const std::vector<uint32_t> uint32_vector() {
231 static const uint32_t kValues[] = { 218 static const uint32_t kValues[] = {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 297
311 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++) 298 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++)
312 299
313 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++) 300 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++)
314 301
315 } // namespace compiler 302 } // namespace compiler
316 } // namespace internal 303 } // namespace internal
317 } // namespace v8 304 } // namespace v8
318 305
319 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_ 306 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-run-machops.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698