Index: src/arm64/code-stubs-arm64.cc |
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc |
index aeefb4f4b82614f5d82674513b2dd056fbc71b29..71da34895740fcb709d9aa8cf9e97b7b20605ded 100644 |
--- a/src/arm64/code-stubs-arm64.cc |
+++ b/src/arm64/code-stubs-arm64.cc |
@@ -1826,10 +1826,12 @@ static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub, |
// Number-of-arguments register must be smi-tagged to call out. |
__ SmiTag(argc); |
__ Push(argc, function, feedback_vector, index); |
+ __ Push(cp); |
DCHECK(feedback_vector.Is(x2) && index.Is(x3)); |
__ CallStub(stub); |
+ __ Pop(cp); |
__ Pop(index, feedback_vector, function, argc); |
__ SmiUntag(argc); |
} |
@@ -2161,9 +2163,9 @@ void CallICStub::Generate(MacroAssembler* masm) { |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
CreateWeakCellStub create_stub(masm->isolate()); |
- __ Push(function); |
+ __ Push(cp, function); |
__ CallStub(&create_stub); |
- __ Pop(function); |
+ __ Pop(cp, function); |
} |
__ B(&call_function); |