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

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

Issue 1593313010: Revert of [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: 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 | « src/x64/macro-assembler-x64.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[] = { 179 static const double values[] = {-2e66,
180 -2e66, 180 -9223373136366403584.0,
181 -162259276829213363391578010288128.0, // 2^107 181 -9223372036854775808.0, // INT64_MIN
182 -81129638414606681695789005144064.0, // 2^106 182 -2147483649.5,
183 -40564819207303349855093757313024.0, // 2^105 183 -2147483648.25,
184 -40564819207303340847894502572032.0, -9223373136366403584.75, 184 -2147483648.0,
185 -9223373136366403584.5, -9223373136366403584.25, -9223373136366403584.0, 185 -2147483647.875,
186 -9223372036854775808.0, // INT64_MIN 186 -2147483647.125,
187 -4503599627370497.5, 187 -2147483647.0,
188 -4503599627370496.5, // -2^52 - 0.5 188 -999.75,
189 -4503599627370495.5, 189 -2e66,
190 -2251799813685248.5, // 2^51 + 0.5 190 -1.75,
191 -34359738368.75, -34359738368.5, -34359738368.25, 191 -1.0,
192 -4294967295.0, // -2^32 + 1.0 192 -0.5,
193 -2147483649.5, -2147483648.25, -2147483648.0, -2147483647.875, 193 -0.0,
194 -2147483647.125, -2147483647.0, -999.75, -1.75, -1.0, -0.5, -0.0, 0.0, 194 0.0,
195 3e-88, 0.125, 0.25, 0.375, 0.5, 1.0, 1.25, 2, 3.1e7, 5.125, 6.25, 888, 195 3e-88,
196 982983.25, 2147483647.0, 2147483647.375, 2147483647.75, 2147483648.0, 196 0.125,
197 2147483648.25, 2147483649.25, 197 0.25,
198 4294967295.0, // +2^32 + 1.0 198 0.375,
199 34359738368.75, 34359738368.5, 34359738368.25, 199 0.5,
200 2251799813685248.5, // 2^51 + 0.5 200 1.0,
201 4503599627370495.5, 201 1.25,
202 4503599627370496.5, // 2^52 + 0.5 202 2,
203 4503599627370497.5, 203 3.1e7,
204 9223372036854775807.0, // INT64_MAX 204 5.125,
205 9223373136366403584.0, 205 6.25,
206 18446744073709551615.0, // UINT64_MAX 206 888,
207 // 81129638414606681695789005144064.0, 207 982983.25,
208 2e66, V8_INFINITY, -V8_INFINITY, -nan, nan}; 208 2147483647.0,
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};
209 return std::vector<double>(&values[0], &values[arraysize(values)]); 222 return std::vector<double>(&values[0], &values[arraysize(values)]);
210 } 223 }
211 224
212 static const std::vector<int32_t> int32_vector() { 225 static const std::vector<int32_t> int32_vector() {
213 std::vector<uint32_t> values = uint32_vector(); 226 std::vector<uint32_t> values = uint32_vector();
214 return std::vector<int32_t>(values.begin(), values.end()); 227 return std::vector<int32_t>(values.begin(), values.end());
215 } 228 }
216 229
217 static const std::vector<uint32_t> uint32_vector() { 230 static const std::vector<uint32_t> uint32_vector() {
218 static const uint32_t kValues[] = { 231 static const uint32_t kValues[] = {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 310
298 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++) 311 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++)
299 312
300 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++) 313 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++)
301 314
302 } // namespace compiler 315 } // namespace compiler
303 } // namespace internal 316 } // namespace internal
304 } // namespace v8 317 } // namespace v8
305 318
306 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_ 319 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698