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 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2791 | 2791 |
2792 void MacroAssembler::Ret() { | 2792 void MacroAssembler::Ret() { |
2793 ret(0); | 2793 ret(0); |
2794 } | 2794 } |
2795 | 2795 |
2796 | 2796 |
2797 void MacroAssembler::Ret(int bytes_dropped, Register scratch) { | 2797 void MacroAssembler::Ret(int bytes_dropped, Register scratch) { |
2798 if (is_uint16(bytes_dropped)) { | 2798 if (is_uint16(bytes_dropped)) { |
2799 ret(bytes_dropped); | 2799 ret(bytes_dropped); |
2800 } else { | 2800 } else { |
2801 pop(scratch); | 2801 PopReturnAddressTo(scratch); |
2802 addq(rsp, Immediate(bytes_dropped)); | 2802 addq(rsp, Immediate(bytes_dropped)); |
2803 push(scratch); | 2803 PushReturnAddressFrom(scratch); |
2804 ret(0); | 2804 ret(0); |
2805 } | 2805 } |
2806 } | 2806 } |
2807 | 2807 |
2808 | 2808 |
2809 void MacroAssembler::FCmp() { | 2809 void MacroAssembler::FCmp() { |
2810 fucomip(); | 2810 fucomip(); |
2811 fstp(0); | 2811 fstp(0); |
2812 } | 2812 } |
2813 | 2813 |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3560 } | 3560 } |
3561 } | 3561 } |
3562 // Get the return address from the stack and restore the frame pointer. | 3562 // Get the return address from the stack and restore the frame pointer. |
3563 movq(rcx, Operand(rbp, 1 * kPointerSize)); | 3563 movq(rcx, Operand(rbp, 1 * kPointerSize)); |
3564 movq(rbp, Operand(rbp, 0 * kPointerSize)); | 3564 movq(rbp, Operand(rbp, 0 * kPointerSize)); |
3565 | 3565 |
3566 // Drop everything up to and including the arguments and the receiver | 3566 // Drop everything up to and including the arguments and the receiver |
3567 // from the caller stack. | 3567 // from the caller stack. |
3568 lea(rsp, Operand(r15, 1 * kPointerSize)); | 3568 lea(rsp, Operand(r15, 1 * kPointerSize)); |
3569 | 3569 |
3570 // Push the return address to get ready to return. | 3570 PushReturnAddressFrom(rcx); |
3571 push(rcx); | |
3572 | 3571 |
3573 LeaveExitFrameEpilogue(); | 3572 LeaveExitFrameEpilogue(); |
3574 } | 3573 } |
3575 | 3574 |
3576 | 3575 |
3577 void MacroAssembler::LeaveApiExitFrame() { | 3576 void MacroAssembler::LeaveApiExitFrame() { |
3578 movq(rsp, rbp); | 3577 movq(rsp, rbp); |
3579 pop(rbp); | 3578 pop(rbp); |
3580 | 3579 |
3581 LeaveExitFrameEpilogue(); | 3580 LeaveExitFrameEpilogue(); |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4694 j(greater, &no_memento_available); | 4693 j(greater, &no_memento_available); |
4695 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize), | 4694 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize), |
4696 Heap::kAllocationMementoMapRootIndex); | 4695 Heap::kAllocationMementoMapRootIndex); |
4697 bind(&no_memento_available); | 4696 bind(&no_memento_available); |
4698 } | 4697 } |
4699 | 4698 |
4700 | 4699 |
4701 } } // namespace v8::internal | 4700 } } // namespace v8::internal |
4702 | 4701 |
4703 #endif // V8_TARGET_ARCH_X64 | 4702 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |