OLD | NEW |
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 #include <limits> | 5 #include <limits> |
6 | 6 |
7 #include "src/compiler/change-lowering.h" | 7 #include "src/compiler/change-lowering.h" |
8 #include "src/compiler/control-builders.h" | 8 #include "src/compiler/control-builders.h" |
9 #include "src/compiler/generic-node-inl.h" | 9 #include "src/compiler/generic-node-inl.h" |
10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 } | 215 } |
216 } | 216 } |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 | 220 |
221 TEST(RunChangeTaggedToFloat64) { | 221 TEST(RunChangeTaggedToFloat64) { |
222 ChangesLoweringTester<int32_t> t(kMachAnyTagged); | 222 ChangesLoweringTester<int32_t> t(kMachAnyTagged); |
223 double result; | 223 double result; |
224 | 224 |
225 t.BuildStoreAndLower(t.simplified()->ChangeTaggedToFloat64(), | 225 t.BuildStoreAndLower( |
226 t.machine()->Store(kMachFloat64, kNoWriteBarrier), | 226 t.simplified()->ChangeTaggedToFloat64(), |
227 &result); | 227 t.machine()->Store(StoreRepresentation(kMachFloat64, kNoWriteBarrier)), |
| 228 &result); |
228 | 229 |
229 if (Pipeline::SupportedTarget()) { | 230 if (Pipeline::SupportedTarget()) { |
230 FOR_INT32_INPUTS(i) { | 231 FOR_INT32_INPUTS(i) { |
231 int32_t input = *i; | 232 int32_t input = *i; |
232 | 233 |
233 if (Smi::IsValid(input)) { | 234 if (Smi::IsValid(input)) { |
234 t.Call(Smi::FromInt(input)); | 235 t.Call(Smi::FromInt(input)); |
235 CHECK_EQ(input, static_cast<int32_t>(result)); | 236 CHECK_EQ(input, static_cast<int32_t>(result)); |
236 } | 237 } |
237 | 238 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 | 403 |
403 input = *i; | 404 input = *i; |
404 Object* result = t.CallWithPotentialGC<Object>(); | 405 Object* result = t.CallWithPotentialGC<Object>(); |
405 t.CheckNumber(input, result); | 406 t.CheckNumber(input, result); |
406 } | 407 } |
407 } | 408 } |
408 } | 409 } |
409 } | 410 } |
410 | 411 |
411 #endif // V8_TURBOFAN_BACKEND | 412 #endif // V8_TURBOFAN_BACKEND |
OLD | NEW |