| Index: src/compiler/ppc/instruction-selector-ppc.cc
|
| diff --git a/src/compiler/ppc/instruction-selector-ppc.cc b/src/compiler/ppc/instruction-selector-ppc.cc
|
| index cd9e51a0faf51950600dfa56f64ea4fe8fbff5d7..d0488919b56e97563c373c84308da7b23c46975b 100644
|
| --- a/src/compiler/ppc/instruction-selector-ppc.cc
|
| +++ b/src/compiler/ppc/instruction-selector-ppc.cc
|
| @@ -155,6 +155,9 @@ void VisitBinop(InstructionSelector* selector, Node* node,
|
| if (cont->IsDeoptimize()) {
|
| selector->EmitDeoptimize(opcode, output_count, outputs, input_count, inputs,
|
| cont->reason(), cont->frame_state());
|
| + } else if (cont->IsTrap()) {
|
| + inputs[input_count++] = g.UseImmediate(cont->trap_id());
|
| + selector->Emit(opcode, output_count, outputs, input_count, inputs);
|
| } else {
|
| selector->Emit(opcode, output_count, outputs, input_count, inputs);
|
| }
|
| @@ -1535,9 +1538,12 @@ void VisitCompare(InstructionSelector* selector, InstructionCode opcode,
|
| } else if (cont->IsDeoptimize()) {
|
| selector->EmitDeoptimize(opcode, g.NoOutput(), left, right, cont->reason(),
|
| cont->frame_state());
|
| - } else {
|
| - DCHECK(cont->IsSet());
|
| + } else if (cont->IsSet()) {
|
| selector->Emit(opcode, g.DefineAsRegister(cont->result()), left, right);
|
| + } else {
|
| + DCHECK(cont->IsTrap());
|
| + selector->Emit(opcode, g.NoOutput(), left, right,
|
| + g.UseImmediate(cont->trap_id()));
|
| }
|
| }
|
|
|
| @@ -1788,12 +1794,16 @@ void InstructionSelector::VisitDeoptimizeUnless(Node* node) {
|
| }
|
|
|
| void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) {
|
| - UNREACHABLE();
|
| + FlagsContinuation cont =
|
| + FlagsContinuation::ForTrap(kNotEqual, func_id, node->InputAt(1));
|
| + VisitWord32CompareZero(this, node, node->InputAt(0), &cont);
|
| }
|
|
|
| void InstructionSelector::VisitTrapUnless(Node* node,
|
| Runtime::FunctionId func_id) {
|
| - UNREACHABLE();
|
| + FlagsContinuation cont =
|
| + FlagsContinuation::ForTrap(kEqual, func_id, node->InputAt(1));
|
| + VisitWord32CompareZero(this, node, node->InputAt(0), &cont);
|
| }
|
|
|
| void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
|
|
|