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

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

Issue 1507703002: [turbofan] Change TruncateFloat64ToUint64 to TryTruncateFloatToUint64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added mips64 implementation, fixed nits. Created 5 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-run-machops.cc ('k') | no next file » | 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/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 1.78831e+21f, 9.20914e+21f, 8.35654e+23f, 92 1.78831e+21f, 9.20914e+21f, 8.35654e+23f,
93 1.4495e+24f, 5.94015e+25f, 4.43608e+30f, 93 1.4495e+24f, 5.94015e+25f, 4.43608e+30f,
94 2.44502e+33f, 2.61152e+33f, 1.38178e+37f, 94 2.44502e+33f, 2.61152e+33f, 1.38178e+37f,
95 1.71306e+37f, 3.31899e+38f, 3.40282e+38f, 95 1.71306e+37f, 3.31899e+38f, 3.40282e+38f,
96 std::numeric_limits<float>::infinity()}; 96 std::numeric_limits<float>::infinity()};
97 return std::vector<float>(&kValues[0], &kValues[arraysize(kValues)]); 97 return std::vector<float>(&kValues[0], &kValues[arraysize(kValues)]);
98 } 98 }
99 99
100 static std::vector<double> float64_vector() { 100 static std::vector<double> float64_vector() {
101 static const double nan = std::numeric_limits<double>::quiet_NaN(); 101 static const double nan = std::numeric_limits<double>::quiet_NaN();
102 static const double values[] = { 102 static const double values[] = {0.125,
103 0.125, 0.25, 0.375, 0.5, 1.25, -1.75, 2, 5.125, 6.25, 0.0, -0.0, 103 0.25,
104 982983.25, 888, 2147483647.0, -999.75, 3.1e7, -2e66, 3e-88, 104 0.375,
105 -2147483648.0, V8_INFINITY, -V8_INFINITY, -nan, nan, 2147483647.375, 105 0.5,
106 2147483647.75, 2147483648.0, 2147483648.25, 2147483649.25, 106 1.25,
107 -2147483647.0, -2147483647.125, -2147483647.875, -2147483648.25, 107 -1.75,
108 -2147483649.5}; 108 2,
109 5.125,
110 6.25,
111 0.0,
112 -0.0,
113 982983.25,
114 888,
115 2147483647.0,
116 -999.75,
117 3.1e7,
118 -2e66,
119 2e66,
120 3e-88,
121 -2147483648.0,
122 V8_INFINITY,
123 -V8_INFINITY,
124 -nan,
125 nan,
126 2147483647.375,
127 2147483647.75,
128 2147483648.0,
129 2147483648.25,
130 2147483649.25,
131 -2147483647.0,
132 -2147483647.125,
133 -2147483647.875,
134 -2147483648.25,
135 -2147483649.5};
109 return std::vector<double>(&values[0], &values[arraysize(values)]); 136 return std::vector<double>(&values[0], &values[arraysize(values)]);
110 } 137 }
111 138
112 static const std::vector<int32_t> int32_vector() { 139 static const std::vector<int32_t> int32_vector() {
113 std::vector<uint32_t> values = uint32_vector(); 140 std::vector<uint32_t> values = uint32_vector();
114 return std::vector<int32_t>(values.begin(), values.end()); 141 return std::vector<int32_t>(values.begin(), values.end());
115 } 142 }
116 143
117 static const std::vector<uint32_t> uint32_vector() { 144 static const std::vector<uint32_t> uint32_vector() {
118 static const uint32_t kValues[] = { 145 static const uint32_t kValues[] = {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 224
198 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++) 225 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++)
199 226
200 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++) 227 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++)
201 228
202 } // namespace compiler 229 } // namespace compiler
203 } // namespace internal 230 } // namespace internal
204 } // namespace v8 231 } // namespace v8
205 232
206 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_ 233 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-run-machops.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698