OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this | 1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // 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/base/ieee754.h" | 10 #include "src/base/ieee754.h" |
(...skipping 6691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6702 r.Goto(&merge); | 6702 r.Goto(&merge); |
6703 r.Bind(&flabel); | 6703 r.Bind(&flabel); |
6704 Node* fb = r.Int32Constant(0); | 6704 Node* fb = r.Int32Constant(0); |
6705 r.Goto(&merge); | 6705 r.Goto(&merge); |
6706 r.Bind(&merge); | 6706 r.Bind(&merge); |
6707 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb); | 6707 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb); |
6708 r.Return(phi); | 6708 r.Return(phi); |
6709 CHECK_EQ(1, r.Call(1)); | 6709 CHECK_EQ(1, r.Call(1)); |
6710 } | 6710 } |
6711 | 6711 |
| 6712 #if V8_TARGET_ARCH_64_BIT |
| 6713 |
| 6714 TEST(Regression5923) { |
| 6715 { |
| 6716 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64()); |
| 6717 m.Return(m.Int64Add( |
| 6718 m.Word64Shr(m.Parameter(0), m.Int64Constant(4611686018427387888)), |
| 6719 m.Parameter(0))); |
| 6720 int64_t input = 16; |
| 6721 m.Call(input); |
| 6722 } |
| 6723 { |
| 6724 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64()); |
| 6725 m.Return(m.Int64Add( |
| 6726 m.Parameter(0), |
| 6727 m.Word64Shr(m.Parameter(0), m.Int64Constant(4611686018427387888)))); |
| 6728 int64_t input = 16; |
| 6729 m.Call(input); |
| 6730 } |
| 6731 } |
| 6732 |
| 6733 #endif // V8_TARGET_ARCH_64_BIT |
| 6734 |
6712 } // namespace compiler | 6735 } // namespace compiler |
6713 } // namespace internal | 6736 } // namespace internal |
6714 } // namespace v8 | 6737 } // namespace v8 |
OLD | NEW |