Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index e95e2cf4216542da41260f6a4039a33dc48b20b0..bf431d17dd43d66c1009e3b9c89e671fcae26c7f 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -4081,7 +4081,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) { |
const Register inline_site = r9; |
const Register scratch = r2; |
- const int32_t kDeltaToLoadBoolResult = 3 * kPointerSize; |
+ const int32_t kDeltaToLoadBoolResult = 4 * kPointerSize; |
Label slow, loop, is_instance, is_not_instance, not_js_object; |
@@ -4132,7 +4132,8 @@ void InstanceofStub::Generate(MacroAssembler* masm) { |
__ sub(inline_site, lr, scratch); |
// Get the map location in scratch and patch it. |
__ GetRelocatedValueLocation(inline_site, scratch); |
- __ str(map, MemOperand(scratch)); |
+ __ ldr(scratch, MemOperand(scratch)); |
+ __ str(map, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
} |
// Register mapping: r3 is object map and r4 is function prototype. |