Index: src/ic/arm64/handler-compiler-arm64.cc |
diff --git a/src/ic/arm64/handler-compiler-arm64.cc b/src/ic/arm64/handler-compiler-arm64.cc |
index 51ae3b50cf1776d25680e75737d1cfcaba6ea134..bdee79a67c03af1e0aedc0be1e45328b35a4a869 100644 |
--- a/src/ic/arm64/handler-compiler-arm64.cc |
+++ b/src/ic/arm64/handler-compiler-arm64.cc |
@@ -245,6 +245,8 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
+ // Save context register |
+ __ Push(cp); |
// Save value register, so we can restore it later. |
__ Push(value()); |
@@ -275,7 +277,7 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( |
__ Pop(x0); |
// Restore context register. |
- __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ __ Pop(cp); |
} |
__ Ret(); |
} |
@@ -287,6 +289,9 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter( |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
+ // Save context register |
+ __ Push(cp); |
+ |
if (accessor_index >= 0) { |
DCHECK(!AreAliased(holder, scratch)); |
DCHECK(!AreAliased(receiver, scratch)); |
@@ -310,7 +315,7 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter( |
} |
// Restore context register. |
- __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ __ Pop(cp); |
} |
__ Ret(); |
} |