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

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

Issue 2172093002: X87: Reland 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/builtins/x87/builtins-x87.cc ('k') | no next file » | 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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
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 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 RecordComment("Abort message: "); 2803 RecordComment("Abort message: ");
2804 RecordComment(msg); 2804 RecordComment(msg);
2805 } 2805 }
2806 2806
2807 if (FLAG_trap_on_abort) { 2807 if (FLAG_trap_on_abort) {
2808 int3(); 2808 int3();
2809 return; 2809 return;
2810 } 2810 }
2811 #endif 2811 #endif
2812 2812
2813 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(reason)))); 2813 // Check if Abort() has already been initialized.
2814 DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
2815
2816 Move(edx, Smi::FromInt(static_cast<int>(reason)));
2817
2814 // Disable stub call restrictions to always allow calls to abort. 2818 // Disable stub call restrictions to always allow calls to abort.
2815 if (!has_frame_) { 2819 if (!has_frame_) {
2816 // We don't actually want to generate a pile of code for this, so just 2820 // We don't actually want to generate a pile of code for this, so just
2817 // claim there is a stack frame, without generating one. 2821 // claim there is a stack frame, without generating one.
2818 FrameScope scope(this, StackFrame::NONE); 2822 FrameScope scope(this, StackFrame::NONE);
2819 CallRuntime(Runtime::kAbort); 2823 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
2820 } else { 2824 } else {
2821 CallRuntime(Runtime::kAbort); 2825 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
2822 } 2826 }
2823 // will not return here 2827 // will not return here
2824 int3(); 2828 int3();
2825 } 2829 }
2826 2830
2827 2831
2828 void MacroAssembler::LoadInstanceDescriptors(Register map, 2832 void MacroAssembler::LoadInstanceDescriptors(Register map,
2829 Register descriptors) { 2833 Register descriptors) {
2830 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset)); 2834 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset));
2831 } 2835 }
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
3301 mov(eax, dividend); 3305 mov(eax, dividend);
3302 shr(eax, 31); 3306 shr(eax, 31);
3303 add(edx, eax); 3307 add(edx, eax);
3304 } 3308 }
3305 3309
3306 3310
3307 } // namespace internal 3311 } // namespace internal
3308 } // namespace v8 3312 } // namespace v8
3309 3313
3310 #endif // V8_TARGET_ARCH_X87 3314 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/builtins/x87/builtins-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698