Chromium Code Reviews| Index: runtime/vm/assembler_x64.cc |
| =================================================================== |
| --- runtime/vm/assembler_x64.cc (revision 29988) |
| +++ runtime/vm/assembler_x64.cc (working copy) |
| @@ -2667,17 +2667,11 @@ |
| } |
| -void Assembler::LeaveFrameWithPP() { |
| - movq(PP, Address(RBP, -2 * kWordSize)); |
| - LeaveFrame(); |
| -} |
| - |
| - |
| void Assembler::ReturnPatchable() { |
| // This sequence must have a fixed size so that it can be patched by the |
| // debugger. |
| intptr_t start = buffer_.GetPosition(); |
| - LeaveFrameWithPP(); |
| + LeaveDartFrame(); |
| ret(); |
| nop(4); |
| ASSERT((buffer_.GetPosition() - start) == 13); |
| @@ -2825,6 +2819,13 @@ |
| } |
| +void Assembler::LeaveDartFrame() { |
| + // Restore caller's PP register that was pushed in EnterDartFrame. |
| + movq(PP, Address(RBP, (kSavedCallerPpSlotFromFp * kWordSize))); |
| + LeaveFrame(); |
| +} |
| + |
| + |
| // On entry to a function compiled for OSR, the caller's frame pointer, the |
| // stack locals, and any copied parameters are already in place. The frame |
| // pointer is already set up. The PC marker is not correct for the |
| @@ -2862,17 +2863,20 @@ |
| } |
| -void Assembler::EnterStubFrame() { |
| +void Assembler::EnterStubFrame(bool load_pp) { |
| EnterFrame(0); |
| pushq(Immediate(0)); // Push 0 in the saved PC area for stub frames. |
| + pushq(PP); // Save caller's pool pointer |
| + if (load_pp) { |
| + LoadPoolPointer(PP); |
| + } |
| } |
| -void Assembler::EnterStubFrameWithPP() { |
| - EnterFrame(0); |
| - pushq(Immediate(0)); // Push 0 in the saved PC area for stub frames. |
| - pushq(PP); // Save caller's pool pointer |
| - LoadPoolPointer(PP); |
| +void Assembler::LeaveStubFrame() { |
|
zra
2013/11/07 19:28:17
This looks the same as LeaveDartFrame. I can see t
siva
2013/11/07 23:08:19
I have tried to be consistent with how it is done
|
| + // Restore caller's PP register that was pushed in EnterStubFrame. |
| + movq(PP, Address(RBP, (kSavedCallerPpSlotFromFp * kWordSize))); |
| + LeaveFrame(); |
| } |