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

Side by Side Diff: src/compiler/arm/code-generator-arm.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 | « no previous file | src/compiler/arm64/code-generator-arm64.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/arm/macro-assembler-arm.h" 7 #include "src/arm/macro-assembler-arm.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compiler/code-generator-impl.h" 9 #include "src/compiler/code-generator-impl.h"
10 #include "src/compiler/gap-resolver.h" 10 #include "src/compiler/gap-resolver.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 if (mode_ > RecordWriteMode::kValueIsPointer) { 215 if (mode_ > RecordWriteMode::kValueIsPointer) {
216 __ JumpIfSmi(value_, exit()); 216 __ JumpIfSmi(value_, exit());
217 } 217 }
218 if (mode_ > RecordWriteMode::kValueIsMap) { 218 if (mode_ > RecordWriteMode::kValueIsMap) {
219 __ CheckPageFlag(value_, scratch0_, 219 __ CheckPageFlag(value_, scratch0_,
220 MemoryChunk::kPointersToHereAreInterestingMask, eq, 220 MemoryChunk::kPointersToHereAreInterestingMask, eq,
221 exit()); 221 exit());
222 } 222 }
223 SaveFPRegsMode const save_fp_mode = 223 SaveFPRegsMode const save_fp_mode =
224 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; 224 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs;
225 // TODO(turbofan): Once we get frame elision working, we need to save 225 if (!frame()->needs_frame()) {
226 // and restore lr properly here if the frame was elided. 226 // We need to save and restore lr if the frame was elided.
227 __ Push(lr);
228 }
227 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, 229 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_,
228 EMIT_REMEMBERED_SET, save_fp_mode); 230 EMIT_REMEMBERED_SET, save_fp_mode);
229 __ add(scratch1_, object_, index_); 231 __ add(scratch1_, object_, index_);
230 __ CallStub(&stub); 232 __ CallStub(&stub);
233 if (!frame()->needs_frame()) {
234 __ Pop(lr);
235 }
231 } 236 }
232 237
233 private: 238 private:
234 Register const object_; 239 Register const object_;
235 Register const index_; 240 Register const index_;
236 Register const value_; 241 Register const value_;
237 Register const scratch0_; 242 Register const scratch0_;
238 Register const scratch1_; 243 Register const scratch1_;
239 RecordWriteMode const mode_; 244 RecordWriteMode const mode_;
240 }; 245 };
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 padding_size -= v8::internal::Assembler::kInstrSize; 1420 padding_size -= v8::internal::Assembler::kInstrSize;
1416 } 1421 }
1417 } 1422 }
1418 } 1423 }
1419 1424
1420 #undef __ 1425 #undef __
1421 1426
1422 } // namespace compiler 1427 } // namespace compiler
1423 } // namespace internal 1428 } // namespace internal
1424 } // namespace v8 1429 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698