| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 __ movq(Operand(rsp, 4 * kPointerSize), arg5); | 674 __ movq(Operand(rsp, 4 * kPointerSize), arg5); |
| 675 __ LoadAddress(arg5, ExternalReference::isolate_address()); | 675 __ LoadAddress(arg5, ExternalReference::isolate_address()); |
| 676 __ movq(Operand(rsp, 5 * kPointerSize), arg5); | 676 __ movq(Operand(rsp, 5 * kPointerSize), arg5); |
| 677 #else | 677 #else |
| 678 __ movq(r8, arg5); | 678 __ movq(r8, arg5); |
| 679 __ LoadAddress(r9, ExternalReference::isolate_address()); | 679 __ LoadAddress(r9, ExternalReference::isolate_address()); |
| 680 #endif | 680 #endif |
| 681 | 681 |
| 682 Isolate* isolate = masm()->isolate(); | 682 Isolate* isolate = masm()->isolate(); |
| 683 | 683 |
| 684 { | 684 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6); |
| 685 AllowExternalCallThatCantCauseGC scope(masm()); | |
| 686 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6); | |
| 687 } | |
| 688 // Preserve deoptimizer object in register rax and get the input | 685 // Preserve deoptimizer object in register rax and get the input |
| 689 // frame descriptor pointer. | 686 // frame descriptor pointer. |
| 690 __ movq(rbx, Operand(rax, Deoptimizer::input_offset())); | 687 __ movq(rbx, Operand(rax, Deoptimizer::input_offset())); |
| 691 | 688 |
| 692 // Fill in the input registers. | 689 // Fill in the input registers. |
| 693 for (int i = kNumberOfRegisters -1; i >= 0; i--) { | 690 for (int i = kNumberOfRegisters -1; i >= 0; i--) { |
| 694 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); | 691 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); |
| 695 __ pop(Operand(rbx, offset)); | 692 __ pop(Operand(rbx, offset)); |
| 696 } | 693 } |
| 697 | 694 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 723 __ pop(Operand(rdx, 0)); | 720 __ pop(Operand(rdx, 0)); |
| 724 __ addq(rdx, Immediate(sizeof(intptr_t))); | 721 __ addq(rdx, Immediate(sizeof(intptr_t))); |
| 725 __ cmpq(rcx, rsp); | 722 __ cmpq(rcx, rsp); |
| 726 __ j(not_equal, &pop_loop); | 723 __ j(not_equal, &pop_loop); |
| 727 | 724 |
| 728 // Compute the output frame in the deoptimizer. | 725 // Compute the output frame in the deoptimizer. |
| 729 __ push(rax); | 726 __ push(rax); |
| 730 __ PrepareCallCFunction(2); | 727 __ PrepareCallCFunction(2); |
| 731 __ movq(arg1, rax); | 728 __ movq(arg1, rax); |
| 732 __ LoadAddress(arg2, ExternalReference::isolate_address()); | 729 __ LoadAddress(arg2, ExternalReference::isolate_address()); |
| 733 { | 730 __ CallCFunction( |
| 734 AllowExternalCallThatCantCauseGC scope(masm()); | 731 ExternalReference::compute_output_frames_function(isolate), 2); |
| 735 __ CallCFunction( | |
| 736 ExternalReference::compute_output_frames_function(isolate), 2); | |
| 737 } | |
| 738 __ pop(rax); | 732 __ pop(rax); |
| 739 | 733 |
| 740 // Replace the current frame with the output frames. | 734 // Replace the current frame with the output frames. |
| 741 Label outer_push_loop, inner_push_loop; | 735 Label outer_push_loop, inner_push_loop; |
| 742 // Outer loop state: rax = current FrameDescription**, rdx = one past the | 736 // Outer loop state: rax = current FrameDescription**, rdx = one past the |
| 743 // last FrameDescription**. | 737 // last FrameDescription**. |
| 744 __ movl(rdx, Operand(rax, Deoptimizer::output_count_offset())); | 738 __ movl(rdx, Operand(rax, Deoptimizer::output_count_offset())); |
| 745 __ movq(rax, Operand(rax, Deoptimizer::output_offset())); | 739 __ movq(rax, Operand(rax, Deoptimizer::output_offset())); |
| 746 __ lea(rdx, Operand(rax, rdx, times_8, 0)); | 740 __ lea(rdx, Operand(rax, rdx, times_8, 0)); |
| 747 __ bind(&outer_push_loop); | 741 __ bind(&outer_push_loop); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 } | 806 } |
| 813 __ bind(&done); | 807 __ bind(&done); |
| 814 } | 808 } |
| 815 | 809 |
| 816 #undef __ | 810 #undef __ |
| 817 | 811 |
| 818 | 812 |
| 819 } } // namespace v8::internal | 813 } } // namespace v8::internal |
| 820 | 814 |
| 821 #endif // V8_TARGET_ARCH_X64 | 815 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |