Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1359)

Side by Side Diff: src/compiler/ppc/code-generator-ppc.cc

Issue 1694263002: [Turbofan] Save and restore lr in OutOfLineRecordWrite when frame is elided. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 if (mode_ > RecordWriteMode::kValueIsPointer) { 176 if (mode_ > RecordWriteMode::kValueIsPointer) {
177 __ JumpIfSmi(value_, exit()); 177 __ JumpIfSmi(value_, exit());
178 } 178 }
179 if (mode_ > RecordWriteMode::kValueIsMap) { 179 if (mode_ > RecordWriteMode::kValueIsMap) {
180 __ CheckPageFlag(value_, scratch0_, 180 __ CheckPageFlag(value_, scratch0_,
181 MemoryChunk::kPointersToHereAreInterestingMask, eq, 181 MemoryChunk::kPointersToHereAreInterestingMask, eq,
182 exit()); 182 exit());
183 } 183 }
184 SaveFPRegsMode const save_fp_mode = 184 SaveFPRegsMode const save_fp_mode =
185 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; 185 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs;
186 // TODO(turbofan): Once we get frame elision working, we need to save 186 if (!frame()->needs_frame()) {
187 // and restore lr properly here if the frame was elided. 187 // We need to save and restore lr if the frame was elided.
188 __ mflr(scratch1_);
189 __ Push(scratch1_);
190 }
188 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, 191 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_,
189 EMIT_REMEMBERED_SET, save_fp_mode); 192 EMIT_REMEMBERED_SET, save_fp_mode);
190 __ add(scratch1_, object_, offset_); 193 __ add(scratch1_, object_, offset_);
191 __ CallStub(&stub); 194 __ CallStub(&stub);
195 if (!frame()->needs_frame()) {
196 // We need to save and restore lr if the frame was elided.
197 __ Pop(scratch1_);
198 __ mtlr(scratch1_);
199 }
192 } 200 }
193 201
194 private: 202 private:
195 Register const object_; 203 Register const object_;
196 Register const offset_; 204 Register const offset_;
197 Register const value_; 205 Register const value_;
198 Register const scratch0_; 206 Register const scratch0_;
199 Register const scratch1_; 207 Register const scratch1_;
200 RecordWriteMode const mode_; 208 RecordWriteMode const mode_;
201 }; 209 };
(...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 padding_size -= v8::internal::Assembler::kInstrSize; 1861 padding_size -= v8::internal::Assembler::kInstrSize;
1854 } 1862 }
1855 } 1863 }
1856 } 1864 }
1857 1865
1858 #undef __ 1866 #undef __
1859 1867
1860 } // namespace compiler 1868 } // namespace compiler
1861 } // namespace internal 1869 } // namespace internal
1862 } // namespace v8 1870 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698