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 2947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2958 RecordComment("Abort message: "); | 2958 RecordComment("Abort message: "); |
2959 RecordComment(msg); | 2959 RecordComment(msg); |
2960 } | 2960 } |
2961 | 2961 |
2962 if (FLAG_trap_on_abort) { | 2962 if (FLAG_trap_on_abort) { |
2963 stop(msg); | 2963 stop(msg); |
2964 return; | 2964 return; |
2965 } | 2965 } |
2966 #endif | 2966 #endif |
2967 | 2967 |
2968 mov(r0, Operand(Smi::FromInt(reason))); | 2968 // Check if Abort() has already been initialized. |
2969 push(r0); | 2969 DCHECK(isolate()->builtins()->Abort()->IsHeapObject()); |
2970 | 2970 Move(r1, Smi::FromInt(static_cast<int>(reason))); |
Michael Starzinger
2016/07/18 08:51:11
nit: Empty newline after "Move" for readability.
ahaas
2016/07/18 09:04:16
Done
| |
2971 // Disable stub call restrictions to always allow calls to abort. | 2971 // Disable stub call restrictions to always allow calls to abort. |
2972 if (!has_frame_) { | 2972 if (!has_frame_) { |
2973 // We don't actually want to generate a pile of code for this, so just | 2973 // We don't actually want to generate a pile of code for this, so just |
2974 // claim there is a stack frame, without generating one. | 2974 // claim there is a stack frame, without generating one. |
2975 FrameScope scope(this, StackFrame::NONE); | 2975 FrameScope scope(this, StackFrame::NONE); |
2976 CallRuntime(Runtime::kAbort); | 2976 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); |
2977 } else { | 2977 } else { |
2978 CallRuntime(Runtime::kAbort); | 2978 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); |
2979 } | 2979 } |
2980 // will not return here | 2980 // will not return here |
2981 if (is_const_pool_blocked()) { | 2981 if (is_const_pool_blocked()) { |
2982 // If the calling code cares about the exact number of | 2982 // If the calling code cares about the exact number of |
2983 // instructions generated, we insert padding here to keep the size | 2983 // instructions generated, we insert padding here to keep the size |
2984 // of the Abort macro constant. | 2984 // of the Abort macro constant. |
2985 static const int kExpectedAbortInstructions = 7; | 2985 static const int kExpectedAbortInstructions = 7; |
2986 int abort_instructions = InstructionsGeneratedSince(&abort_start); | 2986 int abort_instructions = InstructionsGeneratedSince(&abort_start); |
2987 DCHECK(abort_instructions <= kExpectedAbortInstructions); | 2987 DCHECK(abort_instructions <= kExpectedAbortInstructions); |
2988 while (abort_instructions++ < kExpectedAbortInstructions) { | 2988 while (abort_instructions++ < kExpectedAbortInstructions) { |
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4036 } | 4036 } |
4037 } | 4037 } |
4038 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 4038 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
4039 add(result, result, Operand(dividend, LSR, 31)); | 4039 add(result, result, Operand(dividend, LSR, 31)); |
4040 } | 4040 } |
4041 | 4041 |
4042 } // namespace internal | 4042 } // namespace internal |
4043 } // namespace v8 | 4043 } // namespace v8 |
4044 | 4044 |
4045 #endif // V8_TARGET_ARCH_ARM | 4045 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |