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 4024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4035 Move(kScratchRegister, CodeObject(), RelocInfo::EMBEDDED_OBJECT); | 4035 Move(kScratchRegister, CodeObject(), RelocInfo::EMBEDDED_OBJECT); |
4036 Push(kScratchRegister); // Accessed from EditFrame::code_slot. | 4036 Push(kScratchRegister); // Accessed from EditFrame::code_slot. |
4037 | 4037 |
4038 // Save the frame pointer and the context in top. | 4038 // Save the frame pointer and the context in top. |
4039 if (save_rax) { | 4039 if (save_rax) { |
4040 movp(r14, rax); // Backup rax in callee-save register. | 4040 movp(r14, rax); // Backup rax in callee-save register. |
4041 } | 4041 } |
4042 | 4042 |
4043 Store(ExternalReference(Isolate::kCEntryFPAddress, isolate()), rbp); | 4043 Store(ExternalReference(Isolate::kCEntryFPAddress, isolate()), rbp); |
4044 Store(ExternalReference(Isolate::kContextAddress, isolate()), rsi); | 4044 Store(ExternalReference(Isolate::kContextAddress, isolate()), rsi); |
| 4045 Store(ExternalReference(Isolate::kCFunctionAddress, isolate()), rbx); |
4045 } | 4046 } |
4046 | 4047 |
4047 | 4048 |
4048 void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space, | 4049 void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space, |
4049 bool save_doubles) { | 4050 bool save_doubles) { |
4050 #ifdef _WIN64 | 4051 #ifdef _WIN64 |
4051 const int kShadowSpace = 4; | 4052 const int kShadowSpace = 4; |
4052 arg_stack_space += kShadowSpace; | 4053 arg_stack_space += kShadowSpace; |
4053 #endif | 4054 #endif |
4054 // Optionally save all XMM registers. | 4055 // Optionally save all XMM registers. |
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5342 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); | 5343 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); |
5343 movl(rax, dividend); | 5344 movl(rax, dividend); |
5344 shrl(rax, Immediate(31)); | 5345 shrl(rax, Immediate(31)); |
5345 addl(rdx, rax); | 5346 addl(rdx, rax); |
5346 } | 5347 } |
5347 | 5348 |
5348 | 5349 |
5349 } } // namespace v8::internal | 5350 } } // namespace v8::internal |
5350 | 5351 |
5351 #endif // V8_TARGET_ARCH_X64 | 5352 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |