| 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 6744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6755 for (int j = 0; j < 5; j++) { | 6755 for (int j = 0; j < 5; j++) { |
| 6756 Node* stack_slot = | 6756 Node* stack_slot = |
| 6757 r.StackSlot(MachineRepresentation::kWord32, alignments[i]); | 6757 r.StackSlot(MachineRepresentation::kWord32, alignments[i]); |
| 6758 alignment_counter = r.Int32Add( | 6758 alignment_counter = r.Int32Add( |
| 6759 alignment_counter, | 6759 alignment_counter, |
| 6760 r.Word32And(stack_slot, r.Int32Constant(alignments[i] - 1))); | 6760 r.Word32And(stack_slot, r.Int32Constant(alignments[i] - 1))); |
| 6761 } | 6761 } |
| 6762 } | 6762 } |
| 6763 | 6763 |
| 6764 r.Return(alignment_counter); | 6764 r.Return(alignment_counter); |
| 6765 CHECK_EQ(0, r.Call(1)); | 6765 CHECK_EQ(0, r.Call()); |
| 6766 } | 6766 } |
| 6767 | 6767 |
| 6768 #endif // V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64 | 6768 #endif // V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64 |
| 6769 | 6769 |
| 6770 #if V8_TARGET_ARCH_64_BIT | 6770 #if V8_TARGET_ARCH_64_BIT |
| 6771 | 6771 |
| 6772 TEST(Regression5923) { | 6772 TEST(Regression5923) { |
| 6773 { | 6773 { |
| 6774 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64()); | 6774 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64()); |
| 6775 m.Return(m.Int64Add( | 6775 m.Return(m.Int64Add( |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6839 BufferedRawMachineAssemblerTester<int32_t> m(MachineType::Int32()); | 6839 BufferedRawMachineAssemblerTester<int32_t> m(MachineType::Int32()); |
| 6840 m.Return(m.Word32And(m.Word32Shr(m.Parameter(0), m.Int32Constant(0)), | 6840 m.Return(m.Word32And(m.Word32Shr(m.Parameter(0), m.Int32Constant(0)), |
| 6841 m.Int32Constant(0xffffffff))); | 6841 m.Int32Constant(0xffffffff))); |
| 6842 int32_t input = 1234; | 6842 int32_t input = 1234; |
| 6843 CHECK_EQ(input, m.Call(input)); | 6843 CHECK_EQ(input, m.Call(input)); |
| 6844 } | 6844 } |
| 6845 | 6845 |
| 6846 } // namespace compiler | 6846 } // namespace compiler |
| 6847 } // namespace internal | 6847 } // namespace internal |
| 6848 } // namespace v8 | 6848 } // namespace v8 |
| OLD | NEW |