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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
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 4017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4028 Move(kScratchRegister, CodeObject(), RelocInfo::EMBEDDED_OBJECT); | 4028 Move(kScratchRegister, CodeObject(), RelocInfo::EMBEDDED_OBJECT); |
4029 Push(kScratchRegister); // Accessed from EditFrame::code_slot. | 4029 Push(kScratchRegister); // Accessed from EditFrame::code_slot. |
4030 | 4030 |
4031 // Save the frame pointer and the context in top. | 4031 // Save the frame pointer and the context in top. |
4032 if (save_rax) { | 4032 if (save_rax) { |
4033 movp(r14, rax); // Backup rax in callee-save register. | 4033 movp(r14, rax); // Backup rax in callee-save register. |
4034 } | 4034 } |
4035 | 4035 |
4036 Store(ExternalReference(Isolate::kCEntryFPAddress, isolate()), rbp); | 4036 Store(ExternalReference(Isolate::kCEntryFPAddress, isolate()), rbp); |
4037 Store(ExternalReference(Isolate::kContextAddress, isolate()), rsi); | 4037 Store(ExternalReference(Isolate::kContextAddress, isolate()), rsi); |
| 4038 Store(ExternalReference(Isolate::kCFunctionAddress, isolate()), rbx); |
4038 } | 4039 } |
4039 | 4040 |
4040 | 4041 |
4041 void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space, | 4042 void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space, |
4042 bool save_doubles) { | 4043 bool save_doubles) { |
4043 #ifdef _WIN64 | 4044 #ifdef _WIN64 |
4044 const int kShadowSpace = 4; | 4045 const int kShadowSpace = 4; |
4045 arg_stack_space += kShadowSpace; | 4046 arg_stack_space += kShadowSpace; |
4046 #endif | 4047 #endif |
4047 // Optionally save all XMM registers. | 4048 // Optionally save all XMM registers. |
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5335 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); | 5336 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); |
5336 movl(rax, dividend); | 5337 movl(rax, dividend); |
5337 shrl(rax, Immediate(31)); | 5338 shrl(rax, Immediate(31)); |
5338 addl(rdx, rax); | 5339 addl(rdx, rax); |
5339 } | 5340 } |
5340 | 5341 |
5341 | 5342 |
5342 } } // namespace v8::internal | 5343 } } // namespace v8::internal |
5343 | 5344 |
5344 #endif // V8_TARGET_ARCH_X64 | 5345 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |