Index: src/ic/mips64/handler-compiler-mips64.cc |
diff --git a/src/ic/mips64/handler-compiler-mips64.cc b/src/ic/mips64/handler-compiler-mips64.cc |
index 968effdd7fbcbb06257b1fe5148744c88e543268..da2730aae36bc8bd5e9524b01d3f98c1455e6395 100644 |
--- a/src/ic/mips64/handler-compiler-mips64.cc |
+++ b/src/ic/mips64/handler-compiler-mips64.cc |
@@ -28,6 +28,9 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter( |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
+ // Save context register |
+ __ push(cp); |
+ |
if (accessor_index >= 0) { |
DCHECK(!holder.is(scratch)); |
DCHECK(!receiver.is(scratch)); |
@@ -51,7 +54,7 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter( |
} |
// Restore context register. |
- __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ __ pop(cp); |
} |
__ Ret(); |
} |
@@ -66,8 +69,8 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
- // Save value register, so we can restore it later. |
- __ push(value()); |
+ // Save context and value registers, so we can restore them later. |
+ __ Push(cp, value()); |
if (accessor_index >= 0) { |
DCHECK(!holder.is(scratch)); |
@@ -93,10 +96,8 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( |
} |
// We have to return the passed value, not the return value of the setter. |
- __ pop(v0); |
- |
// Restore context register. |
- __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ __ Pop(cp, v0); |
} |
__ Ret(); |
} |