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

Side by Side Diff: src/arm64/macro-assembler-arm64.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 | « src/arm/macro-assembler-arm.cc ('k') | src/builtins/arm/builtins-arm.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 4635 matching lines...) Expand 10 before | Expand all | Expand 10 after
4646 4646
4647 // We need some scratch registers for the MacroAssembler, so make sure we have 4647 // We need some scratch registers for the MacroAssembler, so make sure we have
4648 // some. This is safe here because Abort never returns. 4648 // some. This is safe here because Abort never returns.
4649 RegList old_tmp_list = TmpList()->list(); 4649 RegList old_tmp_list = TmpList()->list();
4650 TmpList()->Combine(MacroAssembler::DefaultTmpList()); 4650 TmpList()->Combine(MacroAssembler::DefaultTmpList());
4651 4651
4652 if (use_real_aborts()) { 4652 if (use_real_aborts()) {
4653 // Avoid infinite recursion; Push contains some assertions that use Abort. 4653 // Avoid infinite recursion; Push contains some assertions that use Abort.
4654 NoUseRealAbortsScope no_real_aborts(this); 4654 NoUseRealAbortsScope no_real_aborts(this);
4655 4655
4656 // Check if Abort() has already been initialized. 4656 Mov(x0, Smi::FromInt(reason));
4657 DCHECK(isolate()->builtins()->Abort()->IsHeapObject()); 4657 Push(x0);
4658
4659 Move(x1, Smi::FromInt(static_cast<int>(reason)));
4660 4658
4661 if (!has_frame_) { 4659 if (!has_frame_) {
4662 // We don't actually want to generate a pile of code for this, so just 4660 // We don't actually want to generate a pile of code for this, so just
4663 // claim there is a stack frame, without generating one. 4661 // claim there is a stack frame, without generating one.
4664 FrameScope scope(this, StackFrame::NONE); 4662 FrameScope scope(this, StackFrame::NONE);
4665 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); 4663 CallRuntime(Runtime::kAbort);
4666 } else { 4664 } else {
4667 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); 4665 CallRuntime(Runtime::kAbort);
4668 } 4666 }
4669 } else { 4667 } else {
4670 // Load the string to pass to Printf. 4668 // Load the string to pass to Printf.
4671 Label msg_address; 4669 Label msg_address;
4672 Adr(x0, &msg_address); 4670 Adr(x0, &msg_address);
4673 4671
4674 // Call Printf directly to report the error. 4672 // Call Printf directly to report the error.
4675 CallPrintf(); 4673 CallPrintf();
4676 4674
4677 // We need a way to stop execution on both the simulator and real hardware, 4675 // We need a way to stop execution on both the simulator and real hardware,
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
5153 } 5151 }
5154 5152
5155 5153
5156 #undef __ 5154 #undef __
5157 5155
5158 5156
5159 } // namespace internal 5157 } // namespace internal
5160 } // namespace v8 5158 } // namespace v8
5161 5159
5162 #endif // V8_TARGET_ARCH_ARM64 5160 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/builtins/arm/builtins-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698