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 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1923 | 1923 |
1924 void MacroAssembler::DebugBreak() { | 1924 void MacroAssembler::DebugBreak() { |
1925 mov(r0, Operand::Zero()); | 1925 mov(r0, Operand::Zero()); |
1926 mov(r1, | 1926 mov(r1, |
1927 Operand(ExternalReference(Runtime::kHandleDebuggerStatement, isolate()))); | 1927 Operand(ExternalReference(Runtime::kHandleDebuggerStatement, isolate()))); |
1928 CEntryStub ces(isolate(), 1); | 1928 CEntryStub ces(isolate(), 1); |
1929 DCHECK(AllowThisStubCall(&ces)); | 1929 DCHECK(AllowThisStubCall(&ces)); |
1930 Call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); | 1930 Call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); |
1931 } | 1931 } |
1932 | 1932 |
| 1933 void MacroAssembler::MaybeDropFrames() { |
| 1934 // Check whether we need to drop frames to restart a function on the stack. |
| 1935 ExternalReference restart_fp = |
| 1936 ExternalReference::debug_restart_fp_address(isolate()); |
| 1937 mov(r1, Operand(restart_fp)); |
| 1938 ldr(r1, MemOperand(r1)); |
| 1939 tst(r1, r1); |
| 1940 Jump(isolate()->builtins()->FrameDropperTrampoline(), RelocInfo::CODE_TARGET, |
| 1941 ne); |
| 1942 } |
1933 | 1943 |
1934 void MacroAssembler::PushStackHandler() { | 1944 void MacroAssembler::PushStackHandler() { |
1935 // Adjust this code if not the case. | 1945 // Adjust this code if not the case. |
1936 STATIC_ASSERT(StackHandlerConstants::kSize == 1 * kPointerSize); | 1946 STATIC_ASSERT(StackHandlerConstants::kSize == 1 * kPointerSize); |
1937 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); | 1947 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); |
1938 | 1948 |
1939 // Link the current handler as the next handler. | 1949 // Link the current handler as the next handler. |
1940 mov(r6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); | 1950 mov(r6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); |
1941 ldr(r5, MemOperand(r6)); | 1951 ldr(r5, MemOperand(r6)); |
1942 push(r5); | 1952 push(r5); |
(...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3868 } | 3878 } |
3869 } | 3879 } |
3870 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3880 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
3871 add(result, result, Operand(dividend, LSR, 31)); | 3881 add(result, result, Operand(dividend, LSR, 31)); |
3872 } | 3882 } |
3873 | 3883 |
3874 } // namespace internal | 3884 } // namespace internal |
3875 } // namespace v8 | 3885 } // namespace v8 |
3876 | 3886 |
3877 #endif // V8_TARGET_ARCH_ARM | 3887 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |