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 <cmath> | 5 #include <cmath> |
6 #include <functional> | 6 #include <functional> |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
11 #include "src/compiler/generic-node-inl.h" | |
12 #include "test/cctest/cctest.h" | 11 #include "test/cctest/cctest.h" |
13 #include "test/cctest/compiler/codegen-tester.h" | 12 #include "test/cctest/compiler/codegen-tester.h" |
14 #include "test/cctest/compiler/value-helper.h" | 13 #include "test/cctest/compiler/value-helper.h" |
15 | 14 |
16 #if V8_TURBOFAN_TARGET | 15 #if V8_TURBOFAN_TARGET |
17 | 16 |
18 using namespace v8::base; | 17 using namespace v8::base; |
19 | 18 |
20 #define CHECK_UINT32_EQ(x, y) \ | 19 #define CHECK_UINT32_EQ(x, y) \ |
21 CHECK_EQ(static_cast<int32_t>(x), static_cast<int32_t>(y)) | 20 CHECK_EQ(static_cast<int32_t>(x), static_cast<int32_t>(y)) |
(...skipping 4661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4683 m.Float64RoundTiesAway(m.LoadFromPointer(&input, kMachFloat64))); | 4682 m.Float64RoundTiesAway(m.LoadFromPointer(&input, kMachFloat64))); |
4684 m.Return(m.Int32Constant(0)); | 4683 m.Return(m.Int32Constant(0)); |
4685 for (size_t i = 0; i < arraysize(kValues); ++i) { | 4684 for (size_t i = 0; i < arraysize(kValues); ++i) { |
4686 input = kValues[i]; | 4685 input = kValues[i]; |
4687 CHECK_EQ(0, m.Call()); | 4686 CHECK_EQ(0, m.Call()); |
4688 double expected = round(kValues[i]); | 4687 double expected = round(kValues[i]); |
4689 CHECK_EQ(expected, result); | 4688 CHECK_EQ(expected, result); |
4690 } | 4689 } |
4691 } | 4690 } |
4692 #endif // V8_TURBOFAN_TARGET | 4691 #endif // V8_TURBOFAN_TARGET |
OLD | NEW |