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 6712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6723 { | 6723 { |
6724 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64()); | 6724 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64()); |
6725 m.Return(m.Int64Add( | 6725 m.Return(m.Int64Add( |
6726 m.Parameter(0), | 6726 m.Parameter(0), |
6727 m.Word64Shr(m.Parameter(0), m.Int64Constant(4611686018427387888)))); | 6727 m.Word64Shr(m.Parameter(0), m.Int64Constant(4611686018427387888)))); |
6728 int64_t input = 16; | 6728 int64_t input = 16; |
6729 m.Call(input); | 6729 m.Call(input); |
6730 } | 6730 } |
6731 } | 6731 } |
6732 | 6732 |
6733 TEST(Regression5951) { | |
6734 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64()); | |
6735 m.Return(m.Word64And(m.Word64Shr(m.Parameter(0), m.Int64Constant(0)), | |
6736 m.Int64Constant(0xffffffffffffffffl))); | |
6737 int64_t input = 1234; | |
6738 CHECK_EQ(input, m.Call(input)); | |
6739 } | |
6740 | |
6741 #endif // V8_TARGET_ARCH_64_BIT | 6733 #endif // V8_TARGET_ARCH_64_BIT |
6742 | 6734 |
6743 } // namespace compiler | 6735 } // namespace compiler |
6744 } // namespace internal | 6736 } // namespace internal |
6745 } // namespace v8 | 6737 } // namespace v8 |
OLD | NEW |