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

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

Issue 1526293002: [turbofan] Fixed a bug in TryTruncateFloatXXToInt64 with INT64_MIN. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 -1.22813e+35f, 66 -1.22813e+35f,
67 -1.20555e+35f, 67 -1.20555e+35f,
68 -1.34584e+34f, 68 -1.34584e+34f,
69 -1.0079e+32f, 69 -1.0079e+32f,
70 -6.49364e+26f, 70 -6.49364e+26f,
71 -3.06077e+25f, 71 -3.06077e+25f,
72 -1.46821e+25f, 72 -1.46821e+25f,
73 -1.17658e+23f, 73 -1.17658e+23f,
74 -1.9617e+22f, 74 -1.9617e+22f,
75 -2.7357e+20f, 75 -2.7357e+20f,
76 -9223372036854775808.0f,
Michael Starzinger 2015/12/16 13:01:29 nit: Placement looks random, can we move it up or
76 -1.48708e+13f, 77 -1.48708e+13f,
77 -1.89633e+12f, 78 -1.89633e+12f,
78 -4.66622e+11f, 79 -4.66622e+11f,
79 -2.22581e+11f, 80 -2.22581e+11f,
80 -1.45381e+10f, 81 -1.45381e+10f,
81 -1.3956e+09f, 82 -1.3956e+09f,
82 -1.32951e+09f, 83 -1.32951e+09f,
83 -1.30721e+09f, 84 -1.30721e+09f,
84 -1.19756e+09f, 85 -1.19756e+09f,
85 -9.26822e+08f, 86 -9.26822e+08f,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 3.31899e+38f, 161 3.31899e+38f,
161 3.40282e+38f, 162 3.40282e+38f,
162 std::numeric_limits<float>::infinity(), 163 std::numeric_limits<float>::infinity(),
163 nan, 164 nan,
164 -nan}; 165 -nan};
165 return std::vector<float>(&kValues[0], &kValues[arraysize(kValues)]); 166 return std::vector<float>(&kValues[0], &kValues[arraysize(kValues)]);
166 } 167 }
167 168
168 static std::vector<double> float64_vector() { 169 static std::vector<double> float64_vector() {
169 static const double nan = std::numeric_limits<double>::quiet_NaN(); 170 static const double nan = std::numeric_limits<double>::quiet_NaN();
170 static const double values[] = {0.125, 171 static const double values[] = {
171 0.25, 172 0.125,
172 0.375, 173 0.25,
173 0.5, 174 0.375,
174 -0.5, 175 0.5,
175 1.25, 176 -0.5,
176 -1.75, 177 1.25,
177 2, 178 -1.75,
178 5.125, 179 2,
179 6.25, 180 5.125,
180 0.0, 181 6.25,
181 -0.0, 182 0.0,
182 982983.25, 183 -0.0,
183 888, 184 982983.25,
184 2147483647.0, 185 888,
185 -999.75, 186 2147483647.0,
186 3.1e7, 187 -999.75,
187 -2e66, 188 3.1e7,
188 2e66, 189 -2e66,
189 3e-88, 190 2e66,
190 -2147483648.0, 191 3e-88,
191 V8_INFINITY, 192 -2147483648.0,
192 -V8_INFINITY, 193 V8_INFINITY,
193 -nan, 194 -V8_INFINITY,
194 nan, 195 -nan,
195 2147483647.375, 196 nan,
196 2147483647.75, 197 2147483647.375,
197 2147483648.0, 198 2147483647.75,
198 2147483648.25, 199 2147483648.0,
199 2147483649.25, 200 2147483648.25,
200 -2147483647.0, 201 2147483649.25,
201 -2147483647.125, 202 -2147483647.0,
202 -2147483647.875, 203 -2147483647.125,
203 -2147483648.25, 204 -2147483647.875,
204 -2147483649.5}; 205 -2147483648.25,
206 -2147483649.5,
207 -9223373136366403584.0f,
208 -9223372036854775808.0f,
209 };
205 return std::vector<double>(&values[0], &values[arraysize(values)]); 210 return std::vector<double>(&values[0], &values[arraysize(values)]);
206 } 211 }
207 212
208 static const std::vector<int32_t> int32_vector() { 213 static const std::vector<int32_t> int32_vector() {
209 std::vector<uint32_t> values = uint32_vector(); 214 std::vector<uint32_t> values = uint32_vector();
210 return std::vector<int32_t>(values.begin(), values.end()); 215 return std::vector<int32_t>(values.begin(), values.end());
211 } 216 }
212 217
213 static const std::vector<uint32_t> uint32_vector() { 218 static const std::vector<uint32_t> uint32_vector() {
214 static const uint32_t kValues[] = { 219 static const uint32_t kValues[] = {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 298
294 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++) 299 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++)
295 300
296 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++) 301 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++)
297 302
298 } // namespace compiler 303 } // namespace compiler
299 } // namespace internal 304 } // namespace internal
300 } // namespace v8 305 } // namespace v8
301 306
302 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_ 307 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_
OLDNEW
« src/compiler/x64/code-generator-x64.cc ('K') | « 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