Index: src/compiler/x64/instruction-selector-x64.cc |
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc |
index 0689eb9adc63c029f69af82f3426cd1a4aea6ea6..9c1985961a2a82d91a28f05549b9176d108c9aca 100644 |
--- a/src/compiler/x64/instruction-selector-x64.cc |
+++ b/src/compiler/x64/instruction-selector-x64.cc |
@@ -940,7 +940,7 @@ void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { |
} |
-void InstructionSelector::VisitCall(Node* node) { |
+void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) { |
X64OperandGenerator g(this); |
const CallDescriptor* descriptor = OpParameter<const CallDescriptor*>(node); |
@@ -966,6 +966,13 @@ void InstructionSelector::VisitCall(Node* node) { |
Emit(kX64Push, g.NoOutput(), value); |
} |
+ // Pass label of exception handler block. |
+ CallDescriptor::Flags flags = descriptor->flags(); |
+ if (handler != nullptr) { |
+ flags |= CallDescriptor::kHasExceptionHandler; |
+ buffer.instruction_args.push_back(g.Label(handler)); |
+ } |
+ |
// Select the appropriate opcode based on the call type. |
InstructionCode opcode; |
switch (descriptor->kind()) { |
@@ -980,7 +987,7 @@ void InstructionSelector::VisitCall(Node* node) { |
UNREACHABLE(); |
return; |
} |
- opcode |= MiscField::encode(descriptor->flags()); |
+ opcode |= MiscField::encode(flags); |
// Emit the call instruction. |
InstructionOperand* first_output = |