OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_ARM | 9 #if V8_TARGET_ARCH_ARM |
10 | 10 |
(...skipping 3550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3561 int num_double_arguments) { | 3561 int num_double_arguments) { |
3562 DCHECK(has_frame()); | 3562 DCHECK(has_frame()); |
3563 // Make sure that the stack is aligned before calling a C function unless | 3563 // Make sure that the stack is aligned before calling a C function unless |
3564 // running in the simulator. The simulator has its own alignment check which | 3564 // running in the simulator. The simulator has its own alignment check which |
3565 // provides more information. | 3565 // provides more information. |
3566 #if V8_HOST_ARCH_ARM | 3566 #if V8_HOST_ARCH_ARM |
3567 if (emit_debug_code()) { | 3567 if (emit_debug_code()) { |
3568 int frame_alignment = base::OS::ActivationFrameAlignment(); | 3568 int frame_alignment = base::OS::ActivationFrameAlignment(); |
3569 int frame_alignment_mask = frame_alignment - 1; | 3569 int frame_alignment_mask = frame_alignment - 1; |
3570 if (frame_alignment > kPointerSize) { | 3570 if (frame_alignment > kPointerSize) { |
3571 DCHECK(IsPowerOf2(frame_alignment)); | 3571 DCHECK(base::bits::IsPowerOfTwo32(frame_alignment)); |
3572 Label alignment_as_expected; | 3572 Label alignment_as_expected; |
3573 tst(sp, Operand(frame_alignment_mask)); | 3573 tst(sp, Operand(frame_alignment_mask)); |
3574 b(eq, &alignment_as_expected); | 3574 b(eq, &alignment_as_expected); |
3575 // Don't use Check here, as it will call Runtime_Abort possibly | 3575 // Don't use Check here, as it will call Runtime_Abort possibly |
3576 // re-entering here. | 3576 // re-entering here. |
3577 stop("Unexpected alignment"); | 3577 stop("Unexpected alignment"); |
3578 bind(&alignment_as_expected); | 3578 bind(&alignment_as_expected); |
3579 } | 3579 } |
3580 } | 3580 } |
3581 #endif | 3581 #endif |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4103 sub(result, result, Operand(dividend)); | 4103 sub(result, result, Operand(dividend)); |
4104 } | 4104 } |
4105 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); | 4105 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); |
4106 add(result, result, Operand(dividend, LSR, 31)); | 4106 add(result, result, Operand(dividend, LSR, 31)); |
4107 } | 4107 } |
4108 | 4108 |
4109 | 4109 |
4110 } } // namespace v8::internal | 4110 } } // namespace v8::internal |
4111 | 4111 |
4112 #endif // V8_TARGET_ARCH_ARM | 4112 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |