Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 1fd7c2c94624a1a7e0b8b5426dbbf18c44d146ad..a5c4c5615986437f3b3d60eb4d99a00668531bdc 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -2666,6 +2666,20 @@ void MacroAssembler::Drop(int stack_elements) { |
} |
+void MacroAssembler::DropUnderReturnAddress(int stack_elements, |
+ Register scratch) { |
+ ASSERT(stack_elements > 0); |
+ if (kPointerSize == kInt64Size && stack_elements == 1) { |
+ popq(MemOperand(rsp, 0)); |
+ return; |
+ } |
+ |
+ PopReturnAddressTo(scratch); |
+ Drop(stack_elements); |
+ PushReturnAddressFrom(scratch); |
+} |
+ |
+ |
void MacroAssembler::Push(Register src) { |
if (kPointerSize == kInt64Size) { |
pushq(src); |