| 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 RecordComment("Abort message: "); | 631 RecordComment("Abort message: "); |
| 632 RecordComment(msg); | 632 RecordComment(msg); |
| 633 } | 633 } |
| 634 | 634 |
| 635 if (FLAG_trap_on_abort) { | 635 if (FLAG_trap_on_abort) { |
| 636 int3(); | 636 int3(); |
| 637 return; | 637 return; |
| 638 } | 638 } |
| 639 #endif | 639 #endif |
| 640 | 640 |
| 641 // Check if Abort() has already been initialized. | 641 Move(kScratchRegister, Smi::FromInt(static_cast<int>(reason)), |
| 642 DCHECK(isolate()->builtins()->Abort()->IsHeapObject()); | 642 Assembler::RelocInfoNone()); |
| 643 | 643 Push(kScratchRegister); |
| 644 Move(rdx, Smi::FromInt(static_cast<int>(reason))); | |
| 645 | 644 |
| 646 if (!has_frame_) { | 645 if (!has_frame_) { |
| 647 // We don't actually want to generate a pile of code for this, so just | 646 // We don't actually want to generate a pile of code for this, so just |
| 648 // claim there is a stack frame, without generating one. | 647 // claim there is a stack frame, without generating one. |
| 649 FrameScope scope(this, StackFrame::NONE); | 648 FrameScope scope(this, StackFrame::NONE); |
| 650 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); | 649 CallRuntime(Runtime::kAbort); |
| 651 } else { | 650 } else { |
| 652 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); | 651 CallRuntime(Runtime::kAbort); |
| 653 } | 652 } |
| 654 // Control will not return here. | 653 // Control will not return here. |
| 655 int3(); | 654 int3(); |
| 656 } | 655 } |
| 657 | 656 |
| 658 | 657 |
| 659 void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { | 658 void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { |
| 660 DCHECK(AllowThisStubCall(stub)); // Calls are not allowed in some stubs | 659 DCHECK(AllowThisStubCall(stub)); // Calls are not allowed in some stubs |
| 661 Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id); | 660 Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id); |
| 662 } | 661 } |
| (...skipping 5114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5777 movl(rax, dividend); | 5776 movl(rax, dividend); |
| 5778 shrl(rax, Immediate(31)); | 5777 shrl(rax, Immediate(31)); |
| 5779 addl(rdx, rax); | 5778 addl(rdx, rax); |
| 5780 } | 5779 } |
| 5781 | 5780 |
| 5782 | 5781 |
| 5783 } // namespace internal | 5782 } // namespace internal |
| 5784 } // namespace v8 | 5783 } // namespace v8 |
| 5785 | 5784 |
| 5786 #endif // V8_TARGET_ARCH_X64 | 5785 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |