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 4497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4508 DCHECK_EQ(kFPOnStackSize, ExitFrameConstants::kCallerPCOffset); | 4508 DCHECK_EQ(kFPOnStackSize, ExitFrameConstants::kCallerPCOffset); |
4509 DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); | 4509 DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); |
4510 pushq(rbp); | 4510 pushq(rbp); |
4511 movp(rbp, rsp); | 4511 movp(rbp, rsp); |
4512 | 4512 |
4513 // Reserve room for entry stack pointer and push the code object. | 4513 // Reserve room for entry stack pointer and push the code object. |
4514 Push(Smi::FromInt(frame_type)); | 4514 Push(Smi::FromInt(frame_type)); |
4515 DCHECK_EQ(-2 * kPointerSize, ExitFrameConstants::kSPOffset); | 4515 DCHECK_EQ(-2 * kPointerSize, ExitFrameConstants::kSPOffset); |
4516 Push(Immediate(0)); // Saved entry sp, patched before call. | 4516 Push(Immediate(0)); // Saved entry sp, patched before call. |
4517 Move(kScratchRegister, CodeObject(), RelocInfo::EMBEDDED_OBJECT); | 4517 Move(kScratchRegister, CodeObject(), RelocInfo::EMBEDDED_OBJECT); |
4518 Push(kScratchRegister); // Accessed from EditFrame::code_slot. | 4518 Push(kScratchRegister); // Accessed from ExitFrame::code_slot. |
4519 | 4519 |
4520 // Save the frame pointer and the context in top. | 4520 // Save the frame pointer and the context in top. |
4521 if (save_rax) { | 4521 if (save_rax) { |
4522 movp(r14, rax); // Backup rax in callee-save register. | 4522 movp(r14, rax); // Backup rax in callee-save register. |
4523 } | 4523 } |
4524 | 4524 |
4525 Store(ExternalReference(Isolate::kCEntryFPAddress, isolate()), rbp); | 4525 Store(ExternalReference(Isolate::kCEntryFPAddress, isolate()), rbp); |
4526 Store(ExternalReference(Isolate::kContextAddress, isolate()), rsi); | 4526 Store(ExternalReference(Isolate::kContextAddress, isolate()), rsi); |
4527 Store(ExternalReference(Isolate::kCFunctionAddress, isolate()), rbx); | 4527 Store(ExternalReference(Isolate::kCFunctionAddress, isolate()), rbx); |
4528 } | 4528 } |
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5776 movl(rax, dividend); | 5776 movl(rax, dividend); |
5777 shrl(rax, Immediate(31)); | 5777 shrl(rax, Immediate(31)); |
5778 addl(rdx, rax); | 5778 addl(rdx, rax); |
5779 } | 5779 } |
5780 | 5780 |
5781 | 5781 |
5782 } // namespace internal | 5782 } // namespace internal |
5783 } // namespace v8 | 5783 } // namespace v8 |
5784 | 5784 |
5785 #endif // V8_TARGET_ARCH_X64 | 5785 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |