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

Unified Diff: src/compiler/instruction-selector-impl.h

Issue 1455833004: [turbofan]: Implement tail calls with more callee than caller parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improve comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/linkage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector-impl.h
diff --git a/src/compiler/instruction-selector-impl.h b/src/compiler/instruction-selector-impl.h
index 8543aa0b19604dec163c9801a210ec686d0ee691..7136de96b1d6bda3d7216e43e675ca3808eef2b5 100644
--- a/src/compiler/instruction-selector-impl.h
+++ b/src/compiler/instruction-selector-impl.h
@@ -128,9 +128,15 @@ class OperandGenerator {
reg.code(), GetVReg(node)));
}
- InstructionOperand UseExplicit(Register reg) {
+ InstructionOperand UseExplicit(LinkageLocation location) {
MachineType machine_type = InstructionSequence::DefaultRepresentation();
- return ExplicitOperand(LocationOperand::REGISTER, machine_type, reg.code());
+ if (location.IsRegister()) {
+ return ExplicitOperand(LocationOperand::REGISTER, machine_type,
+ location.AsRegister());
+ } else {
+ return ExplicitOperand(LocationOperand::STACK_SLOT, machine_type,
+ location.GetLocation());
+ }
}
InstructionOperand UseImmediate(Node* node) {
@@ -142,6 +148,18 @@ class OperandGenerator {
return Use(node, ToUnallocatedOperand(location, type, GetVReg(node)));
}
+ // Used to force gap moves from the from_location to the to_location
+ // immediately before an instruction.
+ InstructionOperand UsePointerLocation(LinkageLocation to_location,
+ LinkageLocation from_location) {
+ MachineType type = static_cast<MachineType>(kTypeAny | kMachPtr);
+ UnallocatedOperand casted_from_operand =
+ UnallocatedOperand::cast(TempLocation(from_location, type));
+ selector_->Emit(kArchNop, casted_from_operand);
+ return ToUnallocatedOperand(to_location, type,
+ casted_from_operand.virtual_register());
+ }
+
InstructionOperand TempRegister() {
return UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER,
UnallocatedOperand::USED_AT_START,
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698