| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 kDoubleRegsSize; | 444 kDoubleRegsSize; |
| 445 | 445 |
| 446 // We use this to keep the value of the fifth argument temporarily. | 446 // We use this to keep the value of the fifth argument temporarily. |
| 447 // Unfortunately we can't store it directly in r8 (used for passing | 447 // Unfortunately we can't store it directly in r8 (used for passing |
| 448 // this on linux), since it is another parameter passing register on windows. | 448 // this on linux), since it is another parameter passing register on windows. |
| 449 Register arg5 = r11; | 449 Register arg5 = r11; |
| 450 | 450 |
| 451 // Get the bailout id from the stack. | 451 // Get the bailout id from the stack. |
| 452 __ movq(arg_reg_3, Operand(rsp, kSavedRegistersAreaSize)); | 452 __ movq(arg_reg_3, Operand(rsp, kSavedRegistersAreaSize)); |
| 453 | 453 |
| 454 // Get the address of the location in the code object if possible | 454 // Get the address of the location in the code object |
| 455 // and compute the fp-to-sp delta in register arg5. | 455 // and compute the fp-to-sp delta in register arg5. |
| 456 if (type() == EAGER || type() == SOFT) { | 456 __ movq(arg_reg_4, |
| 457 __ Set(arg_reg_4, 0); | 457 Operand(rsp, kSavedRegistersAreaSize + 1 * kPointerSize)); |
| 458 __ lea(arg5, Operand(rsp, kSavedRegistersAreaSize + 1 * kPointerSize)); | 458 __ lea(arg5, Operand(rsp, kSavedRegistersAreaSize + 2 * kPointerSize)); |
| 459 } else { | |
| 460 __ movq(arg_reg_4, | |
| 461 Operand(rsp, kSavedRegistersAreaSize + 1 * kPointerSize)); | |
| 462 __ lea(arg5, Operand(rsp, kSavedRegistersAreaSize + 2 * kPointerSize)); | |
| 463 } | |
| 464 | 459 |
| 465 __ subq(arg5, rbp); | 460 __ subq(arg5, rbp); |
| 466 __ neg(arg5); | 461 __ neg(arg5); |
| 467 | 462 |
| 468 // Allocate a new deoptimizer object. | 463 // Allocate a new deoptimizer object. |
| 469 __ PrepareCallCFunction(6); | 464 __ PrepareCallCFunction(6); |
| 470 __ movq(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 465 __ movq(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 471 __ movq(arg_reg_1, rax); | 466 __ movq(arg_reg_1, rax); |
| 472 __ Set(arg_reg_2, type()); | 467 __ Set(arg_reg_2, type()); |
| 473 // Args 3 and 4 are already in the right registers. | 468 // Args 3 and 4 are already in the right registers. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 496 __ pop(Operand(rbx, offset)); | 491 __ pop(Operand(rbx, offset)); |
| 497 } | 492 } |
| 498 | 493 |
| 499 // Fill in the double input registers. | 494 // Fill in the double input registers. |
| 500 int double_regs_offset = FrameDescription::double_registers_offset(); | 495 int double_regs_offset = FrameDescription::double_registers_offset(); |
| 501 for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) { | 496 for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) { |
| 502 int dst_offset = i * kDoubleSize + double_regs_offset; | 497 int dst_offset = i * kDoubleSize + double_regs_offset; |
| 503 __ pop(Operand(rbx, dst_offset)); | 498 __ pop(Operand(rbx, dst_offset)); |
| 504 } | 499 } |
| 505 | 500 |
| 506 // Remove the bailout id from the stack. | 501 // Remove the bailout id and return address from the stack. |
| 507 if (type() == EAGER || type() == SOFT) { | 502 __ addq(rsp, Immediate(2 * kPointerSize)); |
| 508 __ addq(rsp, Immediate(kPointerSize)); | |
| 509 } else { | |
| 510 __ addq(rsp, Immediate(2 * kPointerSize)); | |
| 511 } | |
| 512 | 503 |
| 513 // Compute a pointer to the unwinding limit in register rcx; that is | 504 // Compute a pointer to the unwinding limit in register rcx; that is |
| 514 // the first stack slot not part of the input frame. | 505 // the first stack slot not part of the input frame. |
| 515 __ movq(rcx, Operand(rbx, FrameDescription::frame_size_offset())); | 506 __ movq(rcx, Operand(rbx, FrameDescription::frame_size_offset())); |
| 516 __ addq(rcx, rsp); | 507 __ addq(rcx, rsp); |
| 517 | 508 |
| 518 // Unwind the stack down to - but not including - the unwinding | 509 // Unwind the stack down to - but not including - the unwinding |
| 519 // limit and copy the contents of the activation frame to the input | 510 // limit and copy the contents of the activation frame to the input |
| 520 // frame description. | 511 // frame description. |
| 521 __ lea(rdx, Operand(rbx, FrameDescription::frame_content_offset())); | 512 __ lea(rdx, Operand(rbx, FrameDescription::frame_content_offset())); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 } | 609 } |
| 619 __ bind(&done); | 610 __ bind(&done); |
| 620 } | 611 } |
| 621 | 612 |
| 622 #undef __ | 613 #undef __ |
| 623 | 614 |
| 624 | 615 |
| 625 } } // namespace v8::internal | 616 } } // namespace v8::internal |
| 626 | 617 |
| 627 #endif // V8_TARGET_ARCH_X64 | 618 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |