Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 2163603003: Revert of [builtins] Introduce a builtin for Abort(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // Check if Abort() has already been initialized. 2968 mov(r0, Operand(Smi::FromInt(reason)));
2969 DCHECK(isolate()->builtins()->Abort()->IsHeapObject()); 2969 push(r0);
2970
2971 Move(r1, Smi::FromInt(static_cast<int>(reason)));
2972 2970
2973 // Disable stub call restrictions to always allow calls to abort. 2971 // Disable stub call restrictions to always allow calls to abort.
2974 if (!has_frame_) { 2972 if (!has_frame_) {
2975 // 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
2976 // claim there is a stack frame, without generating one. 2974 // claim there is a stack frame, without generating one.
2977 FrameScope scope(this, StackFrame::NONE); 2975 FrameScope scope(this, StackFrame::NONE);
2978 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); 2976 CallRuntime(Runtime::kAbort);
2979 } else { 2977 } else {
2980 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); 2978 CallRuntime(Runtime::kAbort);
2981 } 2979 }
2982 // will not return here 2980 // will not return here
2983 if (is_const_pool_blocked()) { 2981 if (is_const_pool_blocked()) {
2984 // If the calling code cares about the exact number of 2982 // If the calling code cares about the exact number of
2985 // instructions generated, we insert padding here to keep the size 2983 // instructions generated, we insert padding here to keep the size
2986 // of the Abort macro constant. 2984 // of the Abort macro constant.
2987 static const int kExpectedAbortInstructions = 7; 2985 static const int kExpectedAbortInstructions = 7;
2988 int abort_instructions = InstructionsGeneratedSince(&abort_start); 2986 int abort_instructions = InstructionsGeneratedSince(&abort_start);
2989 DCHECK(abort_instructions <= kExpectedAbortInstructions); 2987 DCHECK(abort_instructions <= kExpectedAbortInstructions);
2990 while (abort_instructions++ < kExpectedAbortInstructions) { 2988 while (abort_instructions++ < kExpectedAbortInstructions) {
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
4038 } 4036 }
4039 } 4037 }
4040 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 4038 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
4041 add(result, result, Operand(dividend, LSR, 31)); 4039 add(result, result, Operand(dividend, LSR, 31));
4042 } 4040 }
4043 4041
4044 } // namespace internal 4042 } // namespace internal
4045 } // namespace v8 4043 } // namespace v8
4046 4044
4047 #endif // V8_TARGET_ARCH_ARM 4045 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698