Index: src/compiler/mips64/code-generator-mips64.cc |
diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc |
index e4560c3843b73a07ac3fd667adb4ebfcd007dfac..d4b32aa3e0c619f55d38a3b098faed43d65997f0 100644 |
--- a/src/compiler/mips64/code-generator-mips64.cc |
+++ b/src/compiler/mips64/code-generator-mips64.cc |
@@ -234,12 +234,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 ra if the frame was elided. |
+ __ Push(ra); |
+ } |
RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
EMIT_REMEMBERED_SET, save_fp_mode); |
__ Daddu(scratch1_, object_, index_); |
__ CallStub(&stub); |
+ if (!frame()->needs_frame()) { |
+ __ Pop(ra); |
+ } |
} |
private: |