Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index 88632d03a98889b825dbbf52f9a22795a7a6e061..3199ac6c587ddab5be5fa6b536ed4c78f98d9579 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -1634,9 +1634,11 @@ static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) { |
// Number-of-arguments register must be smi-tagged to call out. |
__ SmiTag(r0); |
__ Push(r3, r2, r1, r0); |
+ __ Push(cp); |
__ CallStub(stub); |
+ __ Pop(cp); |
__ Pop(r3, r2, r1, r0); |
__ SmiUntag(r0); |
} |
@@ -1936,9 +1938,9 @@ void CallICStub::Generate(MacroAssembler* masm) { |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
CreateWeakCellStub create_stub(masm->isolate()); |
- __ Push(r1); |
+ __ Push(cp, r1); |
__ CallStub(&create_stub); |
- __ Pop(r1); |
+ __ Pop(cp, r1); |
} |
__ jmp(&call_function); |