Index: src/compiler/arm/code-generator-arm.cc |
diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc |
index bf2ff07a77232e0d89d4f4f0ea94b5773e1f638a..574d1ed400592a372b69c040617acc60c3b14fe8 100644 |
--- a/src/compiler/arm/code-generator-arm.cc |
+++ b/src/compiler/arm/code-generator-arm.cc |
@@ -222,12 +222,17 @@ class OutOfLineRecordWrite final : public OutOfLineCode { |
} |
SaveFPRegsMode const save_fp_mode = |
frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
- // TODO(turbofan): Once we get frame elision working, we need to save |
- // and restore lr properly here if the frame was elided. |
+ if (!frame()->needs_frame()) { |
+ // We need to save and restore lr if the frame was elided. |
+ __ Push(lr); |
+ } |
RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
EMIT_REMEMBERED_SET, save_fp_mode); |
__ add(scratch1_, object_, index_); |
__ CallStub(&stub); |
+ if (!frame()->needs_frame()) { |
+ __ Pop(lr); |
+ } |
} |
private: |