| 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/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
| 9 #include "src/full-codegen/full-codegen.h" | 9 #include "src/full-codegen/full-codegen.h" |
| 10 #include "src/register-configuration.h" | 10 #include "src/register-configuration.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // and compute the fp-to-sp delta in register arg5. | 149 // and compute the fp-to-sp delta in register arg5. |
| 150 __ movp(arg_reg_4, Operand(rsp, kSavedRegistersAreaSize + 1 * kRegisterSize)); | 150 __ movp(arg_reg_4, Operand(rsp, kSavedRegistersAreaSize + 1 * kRegisterSize)); |
| 151 __ leap(arg5, Operand(rsp, kSavedRegistersAreaSize + 1 * kRegisterSize + | 151 __ leap(arg5, Operand(rsp, kSavedRegistersAreaSize + 1 * kRegisterSize + |
| 152 kPCOnStackSize)); | 152 kPCOnStackSize)); |
| 153 | 153 |
| 154 __ subp(arg5, rbp); | 154 __ subp(arg5, rbp); |
| 155 __ negp(arg5); | 155 __ negp(arg5); |
| 156 | 156 |
| 157 // Allocate a new deoptimizer object. | 157 // Allocate a new deoptimizer object. |
| 158 __ PrepareCallCFunction(6); | 158 __ PrepareCallCFunction(6); |
| 159 __ movp(rax, Immediate(0)); |
| 160 Label context_check; |
| 161 __ movp(rdi, Operand(rbp, CommonFrameConstants::kContextOrFrameTypeOffset)); |
| 162 __ JumpIfSmi(rdi, &context_check); |
| 159 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 163 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 164 __ bind(&context_check); |
| 160 __ movp(arg_reg_1, rax); | 165 __ movp(arg_reg_1, rax); |
| 161 __ Set(arg_reg_2, type()); | 166 __ Set(arg_reg_2, type()); |
| 162 // Args 3 and 4 are already in the right registers. | 167 // Args 3 and 4 are already in the right registers. |
| 163 | 168 |
| 164 // On windows put the arguments on the stack (PrepareCallCFunction | 169 // On windows put the arguments on the stack (PrepareCallCFunction |
| 165 // has created space for this). On linux pass the arguments in r8 and r9. | 170 // has created space for this). On linux pass the arguments in r8 and r9. |
| 166 #ifdef _WIN64 | 171 #ifdef _WIN64 |
| 167 __ movq(Operand(rsp, 4 * kRegisterSize), arg5); | 172 __ movq(Operand(rsp, 4 * kRegisterSize), arg5); |
| 168 __ LoadAddress(arg5, ExternalReference::isolate_address(isolate())); | 173 __ LoadAddress(arg5, ExternalReference::isolate_address(isolate())); |
| 169 __ movq(Operand(rsp, 5 * kRegisterSize), arg5); | 174 __ movq(Operand(rsp, 5 * kRegisterSize), arg5); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 332 } |
| 328 | 333 |
| 329 | 334 |
| 330 #undef __ | 335 #undef __ |
| 331 | 336 |
| 332 | 337 |
| 333 } // namespace internal | 338 } // namespace internal |
| 334 } // namespace v8 | 339 } // namespace v8 |
| 335 | 340 |
| 336 #endif // V8_TARGET_ARCH_X64 | 341 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |