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

Side by Side Diff: src/compiler/linkage.cc

Issue 1426943010: [turbofan] Spill rsi and rdi in their existing locations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/linkage.h ('k') | src/compiler/register-allocator.h » ('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/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler.h" 6 #include "src/compiler.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/frame.h" 8 #include "src/compiler/frame.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/node.h" 10 #include "src/compiler/node.h"
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // Local variable stored in this (callee) stack. 559 // Local variable stored in this (callee) stack.
560 int spill_index = 560 int spill_index =
561 index - first_stack_slot + StandardFrameConstants::kFixedSlotCount; 561 index - first_stack_slot + StandardFrameConstants::kFixedSlotCount;
562 return LinkageLocation::ForCalleeFrameSlot(spill_index); 562 return LinkageLocation::ForCalleeFrameSlot(spill_index);
563 } else { 563 } else {
564 // Parameter. Use the assigned location from the incoming call descriptor. 564 // Parameter. Use the assigned location from the incoming call descriptor.
565 int parameter_index = 1 + index; // skip index 0, which is the target. 565 int parameter_index = 1 + index; // skip index 0, which is the target.
566 return incoming_->GetInputLocation(parameter_index); 566 return incoming_->GetInputLocation(parameter_index);
567 } 567 }
568 } 568 }
569
570
571 bool Linkage::ParameterHasSecondaryLocation(int index) const {
572 if (incoming_->kind() != CallDescriptor::kCallJSFunction) return false;
573 LinkageLocation loc = GetParameterLocation(index);
574 return (loc == regloc(kJSFunctionRegister) ||
575 loc == regloc(kContextRegister));
576 }
577
578 LinkageLocation Linkage::GetParameterSecondaryLocation(int index) const {
579 DCHECK(ParameterHasSecondaryLocation(index));
580 LinkageLocation loc = GetParameterLocation(index);
581
582 if (loc == regloc(kJSFunctionRegister)) {
583 return LinkageLocation::ForCalleeFrameSlot(Frame::kJSFunctionSlot);
584 } else {
585 DCHECK(loc == regloc(kContextRegister));
586 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot);
587 }
588 }
589
590
569 } // namespace compiler 591 } // namespace compiler
570 } // namespace internal 592 } // namespace internal
571 } // namespace v8 593 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/linkage.h ('k') | src/compiler/register-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698