Index: src/ic/arm/handler-compiler-arm.cc |
diff --git a/src/ic/arm/handler-compiler-arm.cc b/src/ic/arm/handler-compiler-arm.cc |
index 5f2b861d08d9f7834b2e6d8f4e2c5545d158efdf..88b4b1b594741cfbf816c57b89cbd4512abeea14 100644 |
--- a/src/ic/arm/handler-compiler-arm.cc |
+++ b/src/ic/arm/handler-compiler-arm.cc |
@@ -28,6 +28,9 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter( |
{ |
FrameAndConstantPoolScope 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. |
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ __ pop(cp); |
} |
__ Ret(); |
} |
@@ -66,6 +69,8 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( |
{ |
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
+ // Save context register |
+ __ push(cp); |
// Save value register, so we can restore it later. |
__ push(value()); |
@@ -96,7 +101,7 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( |
__ pop(r0); |
// Restore context register. |
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ __ pop(cp); |
} |
__ Ret(); |
} |