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 6760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6771 | 6771 |
6772 TEST(Regression6028) { | 6772 TEST(Regression6028) { |
6773 BufferedRawMachineAssemblerTester<int32_t> m; | 6773 BufferedRawMachineAssemblerTester<int32_t> m; |
6774 m.Return(m.Word32Equal( | 6774 m.Return(m.Word32Equal( |
6775 m.Word32And(m.Int32Constant(0x23), | 6775 m.Word32And(m.Int32Constant(0x23), |
6776 m.Word32Sar(m.Int32Constant(1), m.Int32Constant(18))), | 6776 m.Word32Sar(m.Int32Constant(1), m.Int32Constant(18))), |
6777 m.Int32Constant(0))); | 6777 m.Int32Constant(0))); |
6778 CHECK_EQ(1, m.Call()); | 6778 CHECK_EQ(1, m.Call()); |
6779 } | 6779 } |
6780 | 6780 |
| 6781 TEST(Regression5951_32bit) { |
| 6782 BufferedRawMachineAssemblerTester<int32_t> m(MachineType::Int32()); |
| 6783 m.Return(m.Word32And(m.Word32Shr(m.Parameter(0), m.Int32Constant(0)), |
| 6784 m.Int32Constant(0xffffffff))); |
| 6785 int32_t input = 1234; |
| 6786 CHECK_EQ(input, m.Call(input)); |
| 6787 } |
| 6788 |
6781 } // namespace compiler | 6789 } // namespace compiler |
6782 } // namespace internal | 6790 } // namespace internal |
6783 } // namespace v8 | 6791 } // namespace v8 |
OLD | NEW |