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

Side by Side Diff: src/compiler/arm64/code-generator-arm64.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/arm/code-generator-arm.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('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/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/arm64/macro-assembler-arm64.h" 8 #include "src/arm64/macro-assembler-arm64.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler/code-generator-impl.h" 10 #include "src/compiler/code-generator-impl.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 if (mode_ > RecordWriteMode::kValueIsPointer) { 285 if (mode_ > RecordWriteMode::kValueIsPointer) {
286 __ JumpIfSmi(value_, exit()); 286 __ JumpIfSmi(value_, exit());
287 } 287 }
288 if (mode_ > RecordWriteMode::kValueIsMap) { 288 if (mode_ > RecordWriteMode::kValueIsMap) {
289 __ CheckPageFlagClear(value_, scratch0_, 289 __ CheckPageFlagClear(value_, scratch0_,
290 MemoryChunk::kPointersToHereAreInterestingMask, 290 MemoryChunk::kPointersToHereAreInterestingMask,
291 exit()); 291 exit());
292 } 292 }
293 SaveFPRegsMode const save_fp_mode = 293 SaveFPRegsMode const save_fp_mode =
294 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; 294 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs;
295 // TODO(turbofan): Once we get frame elision working, we need to save 295 if (!frame()->needs_frame()) {
296 // and restore lr properly here if the frame was elided. 296 // We need to save and restore lr if the frame was elided.
297 __ Push(lr);
298 }
297 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, 299 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_,
298 EMIT_REMEMBERED_SET, save_fp_mode); 300 EMIT_REMEMBERED_SET, save_fp_mode);
299 __ Add(scratch1_, object_, index_); 301 __ Add(scratch1_, object_, index_);
300 __ CallStub(&stub); 302 __ CallStub(&stub);
303 if (!frame()->needs_frame()) {
304 __ Pop(lr);
305 }
301 } 306 }
302 307
303 private: 308 private:
304 Register const object_; 309 Register const object_;
305 Operand const index_; 310 Operand const index_;
306 Register const value_; 311 Register const value_;
307 Register const scratch0_; 312 Register const scratch0_;
308 Register const scratch1_; 313 Register const scratch1_;
309 RecordWriteMode const mode_; 314 RecordWriteMode const mode_;
310 }; 315 };
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 padding_size -= kInstructionSize; 1716 padding_size -= kInstructionSize;
1712 } 1717 }
1713 } 1718 }
1714 } 1719 }
1715 1720
1716 #undef __ 1721 #undef __
1717 1722
1718 } // namespace compiler 1723 } // namespace compiler
1719 } // namespace internal 1724 } // namespace internal
1720 } // namespace v8 1725 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698