Index: src/compiler/x87/instruction-selector-x87.cc |
diff --git a/src/compiler/x87/instruction-selector-x87.cc b/src/compiler/x87/instruction-selector-x87.cc |
index d6db9443b0f8bf8c49b50753ca1885396de43b0c..a78bdb4b2849b5b56bee3828804a3d6cc015e02e 100644 |
--- a/src/compiler/x87/instruction-selector-x87.cc |
+++ b/src/compiler/x87/instruction-selector-x87.cc |
@@ -879,84 +879,7 @@ void InstructionSelector::EmitPrepareArguments(NodeVector* arguments, |
} |
-void InstructionSelector::VisitTailCall(Node* node) { |
- X87OperandGenerator g(this); |
- CallDescriptor const* descriptor = OpParameter<CallDescriptor const*>(node); |
- DCHECK_NE(0, descriptor->flags() & CallDescriptor::kSupportsTailCalls); |
- DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kPatchableCallSite); |
- DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kNeedsNopAfterCall); |
- |
- // TODO(turbofan): Relax restriction for stack parameters. |
- |
- if (linkage()->GetIncomingDescriptor()->CanTailCall(node)) { |
- CallBuffer buffer(zone(), descriptor, nullptr); |
- |
- // Compute InstructionOperands for inputs and outputs. |
- InitializeCallBuffer(node, &buffer, true, true); |
- |
- // Select the appropriate opcode based on the call type. |
- InstructionCode opcode; |
- switch (descriptor->kind()) { |
- case CallDescriptor::kCallCodeObject: |
- opcode = kArchTailCallCodeObject; |
- break; |
- case CallDescriptor::kCallJSFunction: |
- opcode = kArchTailCallJSFunction; |
- break; |
- default: |
- UNREACHABLE(); |
- return; |
- } |
- opcode |= MiscField::encode(descriptor->flags()); |
- |
- // Emit the tailcall instruction. |
- Emit(opcode, 0, nullptr, buffer.instruction_args.size(), |
- &buffer.instruction_args.front()); |
- } else { |
- FrameStateDescriptor* frame_state_descriptor = |
- descriptor->NeedsFrameState() |
- ? GetFrameStateDescriptor( |
- node->InputAt(static_cast<int>(descriptor->InputCount()))) |
- : nullptr; |
- |
- CallBuffer buffer(zone(), descriptor, frame_state_descriptor); |
- |
- // Compute InstructionOperands for inputs and outputs. |
- InitializeCallBuffer(node, &buffer, true, true); |
- |
- // Push any stack arguments. |
- for (Node* input : base::Reversed(buffer.pushed_nodes)) { |
- // TODO(titzer): Handle pushing double parameters. |
- InstructionOperand value = |
- g.CanBeImmediate(input) |
- ? g.UseImmediate(input) |
- : IsSupported(ATOM) ? g.UseRegister(input) : g.Use(input); |
- Emit(kX87Push, g.NoOutput(), value); |
- } |
- |
- // Select the appropriate opcode based on the call type. |
- InstructionCode opcode; |
- switch (descriptor->kind()) { |
- case CallDescriptor::kCallCodeObject: |
- opcode = kArchCallCodeObject; |
- break; |
- case CallDescriptor::kCallJSFunction: |
- opcode = kArchCallJSFunction; |
- break; |
- default: |
- UNREACHABLE(); |
- return; |
- } |
- opcode |= MiscField::encode(descriptor->flags()); |
- |
- // Emit the call instruction. |
- size_t output_count = buffer.outputs.size(); |
- auto* outputs = &buffer.outputs.front(); |
- Emit(opcode, output_count, outputs, buffer.instruction_args.size(), |
- &buffer.instruction_args.front())->MarkAsCall(); |
- Emit(kArchRet, 0, nullptr, output_count, outputs); |
- } |
-} |
+bool InstructionSelector::IsTailCallAddressImmediate() { return true; } |
namespace { |