Lines Matching refs:node
27 InstructionOperand UseOperand(Node* node, InstructionCode opcode) { in UseOperand() argument
28 if (CanBeImmediate(node, opcode)) { in UseOperand()
29 return UseImmediate(node); in UseOperand()
31 return UseRegister(node); in UseOperand()
34 bool CanBeImmediate(Node* node, InstructionCode opcode) { in CanBeImmediate() argument
36 if (node->opcode() == IrOpcode::kInt32Constant) in CanBeImmediate()
37 value = OpParameter<int32_t>(node); in CanBeImmediate()
38 else if (node->opcode() == IrOpcode::kInt64Constant) in CanBeImmediate()
39 value = OpParameter<int64_t>(node); in CanBeImmediate()
70 Node* node) { in VisitRR() argument
72 selector->Emit(opcode, g.DefineAsRegister(node), in VisitRR()
73 g.UseRegister(node->InputAt(0))); in VisitRR()
78 Node* node) { in VisitRRR() argument
80 selector->Emit(opcode, g.DefineAsRegister(node), in VisitRRR()
81 g.UseRegister(node->InputAt(0)), in VisitRRR()
82 g.UseRegister(node->InputAt(1))); in VisitRRR()
87 Node* node) { in VisitRRO() argument
89 selector->Emit(opcode, g.DefineAsRegister(node), in VisitRRO()
90 g.UseRegister(node->InputAt(0)), in VisitRRO()
91 g.UseOperand(node->InputAt(1), opcode)); in VisitRRO()
95 static void VisitBinop(InstructionSelector* selector, Node* node, in VisitBinop() argument
98 Int32BinopMatcher m(node); in VisitBinop()
104 inputs[input_count++] = g.UseRegister(m.left().node()); in VisitBinop()
105 inputs[input_count++] = g.UseOperand(m.right().node(), opcode); in VisitBinop()
112 outputs[output_count++] = g.DefineAsRegister(node); in VisitBinop()
127 static void VisitBinop(InstructionSelector* selector, Node* node, in VisitBinop() argument
130 VisitBinop(selector, node, opcode, &cont); in VisitBinop()
134 void InstructionSelector::VisitLoad(Node* node) { in VisitLoad() argument
135 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); in VisitLoad()
137 Node* base = node->InputAt(0); in VisitLoad()
138 Node* index = node->InputAt(1); in VisitLoad()
169 g.DefineAsRegister(node), g.UseRegister(base), g.UseImmediate(index)); in VisitLoad()
176 g.DefineAsRegister(node), addr_reg, g.TempImmediate(0)); in VisitLoad()
181 void InstructionSelector::VisitStore(Node* node) { in VisitStore() argument
183 Node* base = node->InputAt(0); in VisitStore()
184 Node* index = node->InputAt(1); in VisitStore()
185 Node* value = node->InputAt(2); in VisitStore()
187 StoreRepresentation store_rep = StoreRepresentationOf(node->op()); in VisitStore()
264 void InstructionSelector::VisitWord32And(Node* node) { in VisitWord32And() argument
266 Int32BinopMatcher m(node); in VisitWord32And()
267 if (m.left().IsWord32Shr() && CanCover(node, m.left().node()) && in VisitWord32And()
278 Int32BinopMatcher mleft(m.left().node()); in VisitWord32And()
289 Emit(kMips64Ext, g.DefineAsRegister(node), in VisitWord32And()
290 g.UseRegister(mleft.left().node()), g.TempImmediate(lsb), in VisitWord32And()
304 Emit(kMips64Ins, g.DefineSameAsFirst(node), in VisitWord32And()
305 g.UseRegister(m.left().node()), g.TempImmediate(0), in VisitWord32And()
310 VisitBinop(this, node, kMips64And); in VisitWord32And()
314 void InstructionSelector::VisitWord64And(Node* node) { in VisitWord64And() argument
316 Int64BinopMatcher m(node); in VisitWord64And()
317 if (m.left().IsWord64Shr() && CanCover(node, m.left().node()) && in VisitWord64And()
328 Int64BinopMatcher mleft(m.left().node()); in VisitWord64And()
339 Emit(kMips64Dext, g.DefineAsRegister(node), in VisitWord64And()
340 g.UseRegister(mleft.left().node()), g.TempImmediate(lsb), in VisitWord64And()
355 Emit(kMips64Dins, g.DefineSameAsFirst(node), in VisitWord64And()
356 g.UseRegister(m.left().node()), g.TempImmediate(0), in VisitWord64And()
361 VisitBinop(this, node, kMips64And); in VisitWord64And()
365 void InstructionSelector::VisitWord32Or(Node* node) { in VisitWord32Or() argument
366 VisitBinop(this, node, kMips64Or); in VisitWord32Or()
370 void InstructionSelector::VisitWord64Or(Node* node) { in VisitWord64Or() argument
371 VisitBinop(this, node, kMips64Or); in VisitWord64Or()
375 void InstructionSelector::VisitWord32Xor(Node* node) { in VisitWord32Xor() argument
376 Int32BinopMatcher m(node); in VisitWord32Xor()
377 if (m.left().IsWord32Or() && CanCover(node, m.left().node()) && in VisitWord32Xor()
379 Int32BinopMatcher mleft(m.left().node()); in VisitWord32Xor()
382 Emit(kMips64Nor, g.DefineAsRegister(node), in VisitWord32Xor()
383 g.UseRegister(mleft.left().node()), in VisitWord32Xor()
384 g.UseRegister(mleft.right().node())); in VisitWord32Xor()
391 Emit(kMips64Nor, g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitWord32Xor()
395 VisitBinop(this, node, kMips64Xor); in VisitWord32Xor()
399 void InstructionSelector::VisitWord64Xor(Node* node) { in VisitWord64Xor() argument
400 Int64BinopMatcher m(node); in VisitWord64Xor()
401 if (m.left().IsWord64Or() && CanCover(node, m.left().node()) && in VisitWord64Xor()
403 Int64BinopMatcher mleft(m.left().node()); in VisitWord64Xor()
406 Emit(kMips64Nor, g.DefineAsRegister(node), in VisitWord64Xor()
407 g.UseRegister(mleft.left().node()), in VisitWord64Xor()
408 g.UseRegister(mleft.right().node())); in VisitWord64Xor()
415 Emit(kMips64Nor, g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitWord64Xor()
419 VisitBinop(this, node, kMips64Xor); in VisitWord64Xor()
423 void InstructionSelector::VisitWord32Shl(Node* node) { in VisitWord32Shl() argument
424 Int32BinopMatcher m(node); in VisitWord32Shl()
425 if (m.left().IsWord32And() && CanCover(node, m.left().node()) && in VisitWord32Shl()
428 Int32BinopMatcher mleft(m.left().node()); in VisitWord32Shl()
442 Emit(kMips64Shl, g.DefineAsRegister(node), in VisitWord32Shl()
443 g.UseRegister(mleft.left().node()), in VisitWord32Shl()
444 g.UseImmediate(m.right().node())); in VisitWord32Shl()
450 VisitRRO(this, kMips64Shl, node); in VisitWord32Shl()
454 void InstructionSelector::VisitWord32Shr(Node* node) { in VisitWord32Shr() argument
455 Int32BinopMatcher m(node); in VisitWord32Shr()
458 Int32BinopMatcher mleft(m.left().node()); in VisitWord32Shr()
468 Emit(kMips64Ext, g.DefineAsRegister(node), in VisitWord32Shr()
469 g.UseRegister(mleft.left().node()), g.TempImmediate(lsb), in VisitWord32Shr()
475 VisitRRO(this, kMips64Shr, node); in VisitWord32Shr()
479 void InstructionSelector::VisitWord32Sar(Node* node) { in VisitWord32Sar() argument
480 VisitRRO(this, kMips64Sar, node); in VisitWord32Sar()
484 void InstructionSelector::VisitWord64Shl(Node* node) { in VisitWord64Shl() argument
486 Int64BinopMatcher m(node); in VisitWord64Shl()
491 Emit(kMips64Dshl, g.DefineSameAsFirst(node), in VisitWord64Shl()
492 g.UseRegister(m.left().node()->InputAt(0)), in VisitWord64Shl()
493 g.UseImmediate(m.right().node())); in VisitWord64Shl()
496 if (m.left().IsWord64And() && CanCover(node, m.left().node()) && in VisitWord64Shl()
500 Int64BinopMatcher mleft(m.left().node()); in VisitWord64Shl()
513 Emit(kMips64Dshl, g.DefineAsRegister(node), in VisitWord64Shl()
514 g.UseRegister(mleft.left().node()), in VisitWord64Shl()
515 g.UseImmediate(m.right().node())); in VisitWord64Shl()
521 VisitRRO(this, kMips64Dshl, node); in VisitWord64Shl()
525 void InstructionSelector::VisitWord64Shr(Node* node) { in VisitWord64Shr() argument
526 Int64BinopMatcher m(node); in VisitWord64Shr()
529 Int64BinopMatcher mleft(m.left().node()); in VisitWord64Shr()
539 Emit(kMips64Dext, g.DefineAsRegister(node), in VisitWord64Shr()
540 g.UseRegister(mleft.left().node()), g.TempImmediate(lsb), in VisitWord64Shr()
546 VisitRRO(this, kMips64Dshr, node); in VisitWord64Shr()
550 void InstructionSelector::VisitWord64Sar(Node* node) { in VisitWord64Sar() argument
551 VisitRRO(this, kMips64Dsar, node); in VisitWord64Sar()
555 void InstructionSelector::VisitWord32Ror(Node* node) { in VisitWord32Ror() argument
556 VisitRRO(this, kMips64Ror, node); in VisitWord32Ror()
560 void InstructionSelector::VisitWord32Clz(Node* node) { in VisitWord32Clz() argument
561 VisitRR(this, kMips64Clz, node); in VisitWord32Clz()
565 void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } in VisitWord32Ctz() argument
568 void InstructionSelector::VisitWord64Ctz(Node* node) { UNREACHABLE(); } in VisitWord64Ctz() argument
571 void InstructionSelector::VisitWord32Popcnt(Node* node) { UNREACHABLE(); } in VisitWord32Popcnt() argument
574 void InstructionSelector::VisitWord64Popcnt(Node* node) { UNREACHABLE(); } in VisitWord64Popcnt() argument
577 void InstructionSelector::VisitWord64Ror(Node* node) { in VisitWord64Ror() argument
578 VisitRRO(this, kMips64Dror, node); in VisitWord64Ror()
582 void InstructionSelector::VisitWord64Clz(Node* node) { in VisitWord64Clz() argument
583 VisitRR(this, kMips64Dclz, node); in VisitWord64Clz()
587 void InstructionSelector::VisitInt32Add(Node* node) { in VisitInt32Add() argument
590 VisitBinop(this, node, kMips64Add); in VisitInt32Add()
594 void InstructionSelector::VisitInt64Add(Node* node) { in VisitInt64Add() argument
597 VisitBinop(this, node, kMips64Dadd); in VisitInt64Add()
601 void InstructionSelector::VisitInt32Sub(Node* node) { in VisitInt32Sub() argument
602 VisitBinop(this, node, kMips64Sub); in VisitInt32Sub()
606 void InstructionSelector::VisitInt64Sub(Node* node) { in VisitInt64Sub() argument
607 VisitBinop(this, node, kMips64Dsub); in VisitInt64Sub()
611 void InstructionSelector::VisitInt32Mul(Node* node) { in VisitInt32Mul() argument
613 Int32BinopMatcher m(node); in VisitInt32Mul()
618 g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitInt32Mul()
625 g.UseRegister(m.left().node()), in VisitInt32Mul()
628 g.DefineAsRegister(node), g.UseRegister(m.left().node()), temp); in VisitInt32Mul()
634 g.UseRegister(m.left().node()), in VisitInt32Mul()
637 g.DefineAsRegister(node), temp, g.UseRegister(m.left().node())); in VisitInt32Mul()
641 Node* left = node->InputAt(0); in VisitInt32Mul()
642 Node* right = node->InputAt(1); in VisitInt32Mul()
643 if (CanCover(node, left) && CanCover(node, right)) { in VisitInt32Mul()
649 Emit(kMips64DMulHigh, g.DefineSameAsFirst(node), in VisitInt32Mul()
650 g.UseRegister(leftInput.left().node()), in VisitInt32Mul()
651 g.UseRegister(rightInput.left().node())); in VisitInt32Mul()
656 VisitRRR(this, kMips64Mul, node); in VisitInt32Mul()
660 void InstructionSelector::VisitInt32MulHigh(Node* node) { in VisitInt32MulHigh() argument
661 VisitRRR(this, kMips64MulHigh, node); in VisitInt32MulHigh()
665 void InstructionSelector::VisitUint32MulHigh(Node* node) { in VisitUint32MulHigh() argument
666 VisitRRR(this, kMips64MulHighU, node); in VisitUint32MulHigh()
670 void InstructionSelector::VisitInt64Mul(Node* node) { in VisitInt64Mul() argument
672 Int64BinopMatcher m(node); in VisitInt64Mul()
678 g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitInt64Mul()
685 g.UseRegister(m.left().node()), in VisitInt64Mul()
688 g.DefineAsRegister(node), g.UseRegister(m.left().node()), temp); in VisitInt64Mul()
694 g.UseRegister(m.left().node()), in VisitInt64Mul()
697 g.DefineAsRegister(node), temp, g.UseRegister(m.left().node())); in VisitInt64Mul()
701 Emit(kMips64Dmul, g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitInt64Mul()
702 g.UseRegister(m.right().node())); in VisitInt64Mul()
706 void InstructionSelector::VisitInt32Div(Node* node) { in VisitInt32Div() argument
708 Int32BinopMatcher m(node); in VisitInt32Div()
709 Node* left = node->InputAt(0); in VisitInt32Div()
710 Node* right = node->InputAt(1); in VisitInt32Div()
711 if (CanCover(node, left) && CanCover(node, right)) { in VisitInt32Div()
717 Emit(kMips64Ddiv, g.DefineSameAsFirst(node), in VisitInt32Div()
718 g.UseRegister(leftInput.left().node()), in VisitInt32Div()
719 g.UseRegister(rightInput.left().node())); in VisitInt32Div()
724 Emit(kMips64Div, g.DefineSameAsFirst(node), g.UseRegister(m.left().node()), in VisitInt32Div()
725 g.UseRegister(m.right().node())); in VisitInt32Div()
729 void InstructionSelector::VisitUint32Div(Node* node) { in VisitUint32Div() argument
731 Int32BinopMatcher m(node); in VisitUint32Div()
732 Emit(kMips64DivU, g.DefineSameAsFirst(node), g.UseRegister(m.left().node()), in VisitUint32Div()
733 g.UseRegister(m.right().node())); in VisitUint32Div()
737 void InstructionSelector::VisitInt32Mod(Node* node) { in VisitInt32Mod() argument
739 Int32BinopMatcher m(node); in VisitInt32Mod()
740 Node* left = node->InputAt(0); in VisitInt32Mod()
741 Node* right = node->InputAt(1); in VisitInt32Mod()
742 if (CanCover(node, left) && CanCover(node, right)) { in VisitInt32Mod()
748 Emit(kMips64Dmod, g.DefineSameAsFirst(node), in VisitInt32Mod()
749 g.UseRegister(leftInput.left().node()), in VisitInt32Mod()
750 g.UseRegister(rightInput.left().node())); in VisitInt32Mod()
755 Emit(kMips64Mod, g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitInt32Mod()
756 g.UseRegister(m.right().node())); in VisitInt32Mod()
760 void InstructionSelector::VisitUint32Mod(Node* node) { in VisitUint32Mod() argument
762 Int32BinopMatcher m(node); in VisitUint32Mod()
763 Emit(kMips64ModU, g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitUint32Mod()
764 g.UseRegister(m.right().node())); in VisitUint32Mod()
768 void InstructionSelector::VisitInt64Div(Node* node) { in VisitInt64Div() argument
770 Int64BinopMatcher m(node); in VisitInt64Div()
771 Emit(kMips64Ddiv, g.DefineSameAsFirst(node), g.UseRegister(m.left().node()), in VisitInt64Div()
772 g.UseRegister(m.right().node())); in VisitInt64Div()
776 void InstructionSelector::VisitUint64Div(Node* node) { in VisitUint64Div() argument
778 Int64BinopMatcher m(node); in VisitUint64Div()
779 Emit(kMips64DdivU, g.DefineSameAsFirst(node), g.UseRegister(m.left().node()), in VisitUint64Div()
780 g.UseRegister(m.right().node())); in VisitUint64Div()
784 void InstructionSelector::VisitInt64Mod(Node* node) { in VisitInt64Mod() argument
786 Int64BinopMatcher m(node); in VisitInt64Mod()
787 Emit(kMips64Dmod, g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitInt64Mod()
788 g.UseRegister(m.right().node())); in VisitInt64Mod()
792 void InstructionSelector::VisitUint64Mod(Node* node) { in VisitUint64Mod() argument
794 Int64BinopMatcher m(node); in VisitUint64Mod()
795 Emit(kMips64DmodU, g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitUint64Mod()
796 g.UseRegister(m.right().node())); in VisitUint64Mod()
800 void InstructionSelector::VisitChangeFloat32ToFloat64(Node* node) { in VisitChangeFloat32ToFloat64() argument
801 VisitRR(this, kMips64CvtDS, node); in VisitChangeFloat32ToFloat64()
805 void InstructionSelector::VisitChangeInt32ToFloat64(Node* node) { in VisitChangeInt32ToFloat64() argument
806 VisitRR(this, kMips64CvtDW, node); in VisitChangeInt32ToFloat64()
810 void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { in VisitChangeUint32ToFloat64() argument
811 VisitRR(this, kMips64CvtDUw, node); in VisitChangeUint32ToFloat64()
815 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { in VisitChangeFloat64ToInt32() argument
817 Node* value = node->InputAt(0); in VisitChangeFloat64ToInt32()
820 if (CanCover(node, value)) { in VisitChangeFloat64ToInt32()
823 Emit(kMips64FloorWD, g.DefineAsRegister(node), in VisitChangeFloat64ToInt32()
827 Emit(kMips64CeilWD, g.DefineAsRegister(node), in VisitChangeFloat64ToInt32()
831 Emit(kMips64RoundWD, g.DefineAsRegister(node), in VisitChangeFloat64ToInt32()
835 Emit(kMips64TruncWD, g.DefineAsRegister(node), in VisitChangeFloat64ToInt32()
847 Emit(kMips64FloorWS, g.DefineAsRegister(node), in VisitChangeFloat64ToInt32()
851 Emit(kMips64CeilWS, g.DefineAsRegister(node), in VisitChangeFloat64ToInt32()
855 Emit(kMips64RoundWS, g.DefineAsRegister(node), in VisitChangeFloat64ToInt32()
859 Emit(kMips64TruncWS, g.DefineAsRegister(node), in VisitChangeFloat64ToInt32()
863 Emit(kMips64TruncWS, g.DefineAsRegister(node), in VisitChangeFloat64ToInt32()
869 Emit(kMips64TruncWS, g.DefineAsRegister(node), in VisitChangeFloat64ToInt32()
875 VisitRR(this, kMips64TruncWD, node); in VisitChangeFloat64ToInt32()
879 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { in VisitChangeFloat64ToUint32() argument
880 VisitRR(this, kMips64TruncUwD, node); in VisitChangeFloat64ToUint32()
884 void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { in VisitTryTruncateFloat32ToInt64() argument
886 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; in VisitTryTruncateFloat32ToInt64()
889 outputs[output_count++] = g.DefineAsRegister(node); in VisitTryTruncateFloat32ToInt64()
891 Node* success_output = NodeProperties::FindProjection(node, 1); in VisitTryTruncateFloat32ToInt64()
900 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { in VisitTryTruncateFloat64ToInt64() argument
902 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; in VisitTryTruncateFloat64ToInt64()
905 outputs[output_count++] = g.DefineAsRegister(node); in VisitTryTruncateFloat64ToInt64()
907 Node* success_output = NodeProperties::FindProjection(node, 1); in VisitTryTruncateFloat64ToInt64()
916 void InstructionSelector::VisitTryTruncateFloat32ToUint64(Node* node) { in VisitTryTruncateFloat32ToUint64() argument
918 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; in VisitTryTruncateFloat32ToUint64()
921 outputs[output_count++] = g.DefineAsRegister(node); in VisitTryTruncateFloat32ToUint64()
923 Node* success_output = NodeProperties::FindProjection(node, 1); in VisitTryTruncateFloat32ToUint64()
932 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { in VisitTryTruncateFloat64ToUint64() argument
935 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; in VisitTryTruncateFloat64ToUint64()
938 outputs[output_count++] = g.DefineAsRegister(node); in VisitTryTruncateFloat64ToUint64()
940 Node* success_output = NodeProperties::FindProjection(node, 1); in VisitTryTruncateFloat64ToUint64()
949 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { in VisitChangeInt32ToInt64() argument
951 Emit(kMips64Shl, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), in VisitChangeInt32ToInt64()
956 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) { in VisitChangeUint32ToUint64() argument
958 Emit(kMips64Dext, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), in VisitChangeUint32ToUint64()
963 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { in VisitTruncateInt64ToInt32() argument
965 Node* value = node->InputAt(0); in VisitTruncateInt64ToInt32()
966 if (CanCover(node, value)) { in VisitTruncateInt64ToInt32()
972 Emit(kMips64Dsar, g.DefineSameAsFirst(node), in VisitTruncateInt64ToInt32()
973 g.UseRegister(m.left().node()), in VisitTruncateInt64ToInt32()
974 g.UseImmediate(m.right().node())); in VisitTruncateInt64ToInt32()
983 Emit(kMips64Ext, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), in VisitTruncateInt64ToInt32()
988 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { in VisitTruncateFloat64ToFloat32() argument
990 Node* value = node->InputAt(0); in VisitTruncateFloat64ToFloat32()
993 if (CanCover(node, value) && in VisitTruncateFloat64ToFloat32()
995 Emit(kMips64CvtSW, g.DefineAsRegister(node), in VisitTruncateFloat64ToFloat32()
999 VisitRR(this, kMips64CvtSD, node); in VisitTruncateFloat64ToFloat32()
1003 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { in VisitTruncateFloat64ToInt32() argument
1004 switch (TruncationModeOf(node->op())) { in VisitTruncateFloat64ToInt32()
1006 return VisitRR(this, kArchTruncateDoubleToI, node); in VisitTruncateFloat64ToInt32()
1008 return VisitRR(this, kMips64TruncWD, node); in VisitTruncateFloat64ToInt32()
1014 void InstructionSelector::VisitRoundInt64ToFloat32(Node* node) { in VisitRoundInt64ToFloat32() argument
1015 VisitRR(this, kMips64CvtSL, node); in VisitRoundInt64ToFloat32()
1019 void InstructionSelector::VisitRoundInt64ToFloat64(Node* node) { in VisitRoundInt64ToFloat64() argument
1020 VisitRR(this, kMips64CvtDL, node); in VisitRoundInt64ToFloat64()
1024 void InstructionSelector::VisitRoundUint64ToFloat32(Node* node) { in VisitRoundUint64ToFloat32() argument
1025 VisitRR(this, kMips64CvtSUl, node); in VisitRoundUint64ToFloat32()
1029 void InstructionSelector::VisitRoundUint64ToFloat64(Node* node) { in VisitRoundUint64ToFloat64() argument
1030 VisitRR(this, kMips64CvtDUl, node); in VisitRoundUint64ToFloat64()
1034 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { in VisitBitcastFloat32ToInt32() argument
1035 VisitRR(this, kMips64Float64ExtractLowWord32, node); in VisitBitcastFloat32ToInt32()
1039 void InstructionSelector::VisitBitcastFloat64ToInt64(Node* node) { in VisitBitcastFloat64ToInt64() argument
1040 VisitRR(this, kMips64BitcastDL, node); in VisitBitcastFloat64ToInt64()
1044 void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { in VisitBitcastInt32ToFloat32() argument
1046 Emit(kMips64Float64InsertLowWord32, g.DefineAsRegister(node), in VisitBitcastInt32ToFloat32()
1048 g.UseRegister(node->InputAt(0))); in VisitBitcastInt32ToFloat32()
1052 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { in VisitBitcastInt64ToFloat64() argument
1053 VisitRR(this, kMips64BitcastLD, node); in VisitBitcastInt64ToFloat64()
1057 void InstructionSelector::VisitFloat32Add(Node* node) { in VisitFloat32Add() argument
1058 VisitRRR(this, kMips64AddS, node); in VisitFloat32Add()
1062 void InstructionSelector::VisitFloat64Add(Node* node) { in VisitFloat64Add() argument
1063 VisitRRR(this, kMips64AddD, node); in VisitFloat64Add()
1067 void InstructionSelector::VisitFloat32Sub(Node* node) { in VisitFloat32Sub() argument
1068 VisitRRR(this, kMips64SubS, node); in VisitFloat32Sub()
1072 void InstructionSelector::VisitFloat64Sub(Node* node) { in VisitFloat64Sub() argument
1074 Float64BinopMatcher m(node); in VisitFloat64Sub()
1076 CanCover(m.node(), m.right().node())) { in VisitFloat64Sub()
1078 CanCover(m.right().node(), m.right().InputAt(0))) { in VisitFloat64Sub()
1081 Emit(kMips64Float64RoundUp, g.DefineAsRegister(node), in VisitFloat64Sub()
1082 g.UseRegister(mright0.right().node())); in VisitFloat64Sub()
1087 VisitRRR(this, kMips64SubD, node); in VisitFloat64Sub()
1091 void InstructionSelector::VisitFloat32Mul(Node* node) { in VisitFloat32Mul() argument
1092 VisitRRR(this, kMips64MulS, node); in VisitFloat32Mul()
1096 void InstructionSelector::VisitFloat64Mul(Node* node) { in VisitFloat64Mul() argument
1097 VisitRRR(this, kMips64MulD, node); in VisitFloat64Mul()
1101 void InstructionSelector::VisitFloat32Div(Node* node) { in VisitFloat32Div() argument
1102 VisitRRR(this, kMips64DivS, node); in VisitFloat32Div()
1106 void InstructionSelector::VisitFloat64Div(Node* node) { in VisitFloat64Div() argument
1107 VisitRRR(this, kMips64DivD, node); in VisitFloat64Div()
1111 void InstructionSelector::VisitFloat64Mod(Node* node) { in VisitFloat64Mod() argument
1113 Emit(kMips64ModD, g.DefineAsFixed(node, f0), in VisitFloat64Mod()
1114 g.UseFixed(node->InputAt(0), f12), in VisitFloat64Mod()
1115 g.UseFixed(node->InputAt(1), f14))->MarkAsCall(); in VisitFloat64Mod()
1119 void InstructionSelector::VisitFloat32Max(Node* node) { in VisitFloat32Max() argument
1122 Emit(kMips64Float32Max, g.DefineAsRegister(node), in VisitFloat32Max()
1123 g.UseUniqueRegister(node->InputAt(0)), in VisitFloat32Max()
1124 g.UseUniqueRegister(node->InputAt(1))); in VisitFloat32Max()
1128 Emit(kMips64Float32Max, g.DefineSameAsFirst(node), in VisitFloat32Max()
1129 g.UseRegister(node->InputAt(1)), g.UseRegister(node->InputAt(0))); in VisitFloat32Max()
1134 void InstructionSelector::VisitFloat64Max(Node* node) { in VisitFloat64Max() argument
1137 Emit(kMips64Float64Max, g.DefineAsRegister(node), in VisitFloat64Max()
1138 g.UseUniqueRegister(node->InputAt(0)), in VisitFloat64Max()
1139 g.UseUniqueRegister(node->InputAt(1))); in VisitFloat64Max()
1143 Emit(kMips64Float64Max, g.DefineSameAsFirst(node), in VisitFloat64Max()
1144 g.UseRegister(node->InputAt(1)), g.UseRegister(node->InputAt(0))); in VisitFloat64Max()
1149 void InstructionSelector::VisitFloat32Min(Node* node) { in VisitFloat32Min() argument
1152 Emit(kMips64Float32Min, g.DefineAsRegister(node), in VisitFloat32Min()
1153 g.UseUniqueRegister(node->InputAt(0)), in VisitFloat32Min()
1154 g.UseUniqueRegister(node->InputAt(1))); in VisitFloat32Min()
1158 Emit(kMips64Float32Min, g.DefineSameAsFirst(node), in VisitFloat32Min()
1159 g.UseRegister(node->InputAt(1)), g.UseRegister(node->InputAt(0))); in VisitFloat32Min()
1164 void InstructionSelector::VisitFloat64Min(Node* node) { in VisitFloat64Min() argument
1167 Emit(kMips64Float64Min, g.DefineAsRegister(node), in VisitFloat64Min()
1168 g.UseUniqueRegister(node->InputAt(0)), in VisitFloat64Min()
1169 g.UseUniqueRegister(node->InputAt(1))); in VisitFloat64Min()
1173 Emit(kMips64Float64Min, g.DefineSameAsFirst(node), in VisitFloat64Min()
1174 g.UseRegister(node->InputAt(1)), g.UseRegister(node->InputAt(0))); in VisitFloat64Min()
1179 void InstructionSelector::VisitFloat32Abs(Node* node) { in VisitFloat32Abs() argument
1180 VisitRR(this, kMips64AbsS, node); in VisitFloat32Abs()
1184 void InstructionSelector::VisitFloat64Abs(Node* node) { in VisitFloat64Abs() argument
1185 VisitRR(this, kMips64AbsD, node); in VisitFloat64Abs()
1189 void InstructionSelector::VisitFloat32Sqrt(Node* node) { in VisitFloat32Sqrt() argument
1190 VisitRR(this, kMips64SqrtS, node); in VisitFloat32Sqrt()
1194 void InstructionSelector::VisitFloat64Sqrt(Node* node) { in VisitFloat64Sqrt() argument
1195 VisitRR(this, kMips64SqrtD, node); in VisitFloat64Sqrt()
1199 void InstructionSelector::VisitFloat32RoundDown(Node* node) { in VisitFloat32RoundDown() argument
1200 VisitRR(this, kMips64Float32RoundDown, node); in VisitFloat32RoundDown()
1204 void InstructionSelector::VisitFloat64RoundDown(Node* node) { in VisitFloat64RoundDown() argument
1205 VisitRR(this, kMips64Float64RoundDown, node); in VisitFloat64RoundDown()
1209 void InstructionSelector::VisitFloat32RoundUp(Node* node) { in VisitFloat32RoundUp() argument
1210 VisitRR(this, kMips64Float32RoundUp, node); in VisitFloat32RoundUp()
1214 void InstructionSelector::VisitFloat64RoundUp(Node* node) { in VisitFloat64RoundUp() argument
1215 VisitRR(this, kMips64Float64RoundUp, node); in VisitFloat64RoundUp()
1219 void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { in VisitFloat32RoundTruncate() argument
1220 VisitRR(this, kMips64Float32RoundTruncate, node); in VisitFloat32RoundTruncate()
1224 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { in VisitFloat64RoundTruncate() argument
1225 VisitRR(this, kMips64Float64RoundTruncate, node); in VisitFloat64RoundTruncate()
1229 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { in VisitFloat64RoundTiesAway() argument
1234 void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) { in VisitFloat32RoundTiesEven() argument
1235 VisitRR(this, kMips64Float32RoundTiesEven, node); in VisitFloat32RoundTiesEven()
1239 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { in VisitFloat64RoundTiesEven() argument
1240 VisitRR(this, kMips64Float64RoundTiesEven, node); in VisitFloat64RoundTiesEven()
1246 Node* node) { in EmitPrepareArguments() argument
1258 Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(input.node()), in EmitPrepareArguments()
1270 if (input.node()) { in EmitPrepareArguments()
1271 Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(input.node()), in EmitPrepareArguments()
1282 void InstructionSelector::VisitCheckedLoad(Node* node) { in VisitCheckedLoad() argument
1283 CheckedLoadRepresentation load_rep = CheckedLoadRepresentationOf(node->op()); in VisitCheckedLoad()
1285 Node* const buffer = node->InputAt(0); in VisitCheckedLoad()
1286 Node* const offset = node->InputAt(1); in VisitCheckedLoad()
1287 Node* const length = node->InputAt(2); in VisitCheckedLoad()
1325 g.DefineAsRegister(node), offset_operand, length_operand, in VisitCheckedLoad()
1330 void InstructionSelector::VisitCheckedStore(Node* node) { in VisitCheckedStore() argument
1331 MachineRepresentation rep = CheckedStoreRepresentationOf(node->op()); in VisitCheckedStore()
1333 Node* const buffer = node->InputAt(0); in VisitCheckedStore()
1334 Node* const offset = node->InputAt(1); in VisitCheckedStore()
1335 Node* const length = node->InputAt(2); in VisitCheckedStore()
1336 Node* const value = node->InputAt(3); in VisitCheckedStore()
1398 void VisitFloat32Compare(InstructionSelector* selector, Node* node, in VisitFloat32Compare() argument
1401 Float32BinopMatcher m(node); in VisitFloat32Compare()
1404 lhs = m.left().IsZero() ? g.UseImmediate(m.left().node()) in VisitFloat32Compare()
1405 : g.UseRegister(m.left().node()); in VisitFloat32Compare()
1406 rhs = m.right().IsZero() ? g.UseImmediate(m.right().node()) in VisitFloat32Compare()
1407 : g.UseRegister(m.right().node()); in VisitFloat32Compare()
1413 void VisitFloat64Compare(InstructionSelector* selector, Node* node, in VisitFloat64Compare() argument
1416 Float64BinopMatcher m(node); in VisitFloat64Compare()
1419 lhs = m.left().IsZero() ? g.UseImmediate(m.left().node()) in VisitFloat64Compare()
1420 : g.UseRegister(m.left().node()); in VisitFloat64Compare()
1421 rhs = m.right().IsZero() ? g.UseImmediate(m.right().node()) in VisitFloat64Compare()
1422 : g.UseRegister(m.right().node()); in VisitFloat64Compare()
1428 void VisitWordCompare(InstructionSelector* selector, Node* node, in VisitWordCompare() argument
1432 Node* left = node->InputAt(0); in VisitWordCompare()
1433 Node* right = node->InputAt(1); in VisitWordCompare()
1490 void VisitWord32Compare(InstructionSelector* selector, Node* node, in VisitWord32Compare() argument
1492 VisitWordCompare(selector, node, kMips64Cmp, cont, false); in VisitWord32Compare()
1496 void VisitWord64Compare(InstructionSelector* selector, Node* node, in VisitWord64Compare() argument
1498 VisitWordCompare(selector, node, kMips64Cmp, cont, false); in VisitWord64Compare()
1530 value = m.left().node(); in VisitWordCompareZero()
1555 value = m.left().node(); in VisitWordCompareZero()
1601 Node* const node = value->InputAt(0); in VisitWordCompareZero() local
1602 Node* const result = NodeProperties::FindProjection(node, 0); in VisitWordCompareZero()
1604 switch (node->opcode()) { in VisitWordCompareZero()
1607 return VisitBinop(selector, node, kMips64Dadd, cont); in VisitWordCompareZero()
1610 return VisitBinop(selector, node, kMips64Dsub, cont); in VisitWordCompareZero()
1613 return VisitBinop(selector, node, kMips64DaddOvf, cont); in VisitWordCompareZero()
1616 return VisitBinop(selector, node, kMips64DsubOvf, cont); in VisitWordCompareZero()
1644 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { in VisitSwitch() argument
1646 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); in VisitSwitch()
1672 void InstructionSelector::VisitWord32Equal(Node* const node) { in VisitWord32Equal() argument
1673 FlagsContinuation cont(kEqual, node); in VisitWord32Equal()
1674 Int32BinopMatcher m(node); in VisitWord32Equal()
1676 return VisitWordCompareZero(this, m.node(), m.left().node(), &cont); in VisitWord32Equal()
1679 VisitWord32Compare(this, node, &cont); in VisitWord32Equal()
1683 void InstructionSelector::VisitInt32LessThan(Node* node) { in VisitInt32LessThan() argument
1684 FlagsContinuation cont(kSignedLessThan, node); in VisitInt32LessThan()
1685 VisitWord32Compare(this, node, &cont); in VisitInt32LessThan()
1689 void InstructionSelector::VisitInt32LessThanOrEqual(Node* node) { in VisitInt32LessThanOrEqual() argument
1690 FlagsContinuation cont(kSignedLessThanOrEqual, node); in VisitInt32LessThanOrEqual()
1691 VisitWord32Compare(this, node, &cont); in VisitInt32LessThanOrEqual()
1695 void InstructionSelector::VisitUint32LessThan(Node* node) { in VisitUint32LessThan() argument
1696 FlagsContinuation cont(kUnsignedLessThan, node); in VisitUint32LessThan()
1697 VisitWord32Compare(this, node, &cont); in VisitUint32LessThan()
1701 void InstructionSelector::VisitUint32LessThanOrEqual(Node* node) { in VisitUint32LessThanOrEqual() argument
1702 FlagsContinuation cont(kUnsignedLessThanOrEqual, node); in VisitUint32LessThanOrEqual()
1703 VisitWord32Compare(this, node, &cont); in VisitUint32LessThanOrEqual()
1707 void InstructionSelector::VisitInt32AddWithOverflow(Node* node) { in VisitInt32AddWithOverflow() argument
1708 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { in VisitInt32AddWithOverflow()
1710 return VisitBinop(this, node, kMips64Dadd, &cont); in VisitInt32AddWithOverflow()
1713 VisitBinop(this, node, kMips64Dadd, &cont); in VisitInt32AddWithOverflow()
1717 void InstructionSelector::VisitInt32SubWithOverflow(Node* node) { in VisitInt32SubWithOverflow() argument
1718 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { in VisitInt32SubWithOverflow()
1720 return VisitBinop(this, node, kMips64Dsub, &cont); in VisitInt32SubWithOverflow()
1723 VisitBinop(this, node, kMips64Dsub, &cont); in VisitInt32SubWithOverflow()
1727 void InstructionSelector::VisitInt64AddWithOverflow(Node* node) { in VisitInt64AddWithOverflow() argument
1728 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { in VisitInt64AddWithOverflow()
1730 return VisitBinop(this, node, kMips64DaddOvf, &cont); in VisitInt64AddWithOverflow()
1733 VisitBinop(this, node, kMips64DaddOvf, &cont); in VisitInt64AddWithOverflow()
1737 void InstructionSelector::VisitInt64SubWithOverflow(Node* node) { in VisitInt64SubWithOverflow() argument
1738 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { in VisitInt64SubWithOverflow()
1740 return VisitBinop(this, node, kMips64DsubOvf, &cont); in VisitInt64SubWithOverflow()
1743 VisitBinop(this, node, kMips64DsubOvf, &cont); in VisitInt64SubWithOverflow()
1747 void InstructionSelector::VisitWord64Equal(Node* const node) { in VisitWord64Equal() argument
1748 FlagsContinuation cont(kEqual, node); in VisitWord64Equal()
1749 Int64BinopMatcher m(node); in VisitWord64Equal()
1751 return VisitWordCompareZero(this, m.node(), m.left().node(), &cont); in VisitWord64Equal()
1754 VisitWord64Compare(this, node, &cont); in VisitWord64Equal()
1758 void InstructionSelector::VisitInt64LessThan(Node* node) { in VisitInt64LessThan() argument
1759 FlagsContinuation cont(kSignedLessThan, node); in VisitInt64LessThan()
1760 VisitWord64Compare(this, node, &cont); in VisitInt64LessThan()
1764 void InstructionSelector::VisitInt64LessThanOrEqual(Node* node) { in VisitInt64LessThanOrEqual() argument
1765 FlagsContinuation cont(kSignedLessThanOrEqual, node); in VisitInt64LessThanOrEqual()
1766 VisitWord64Compare(this, node, &cont); in VisitInt64LessThanOrEqual()
1770 void InstructionSelector::VisitUint64LessThan(Node* node) { in VisitUint64LessThan() argument
1771 FlagsContinuation cont(kUnsignedLessThan, node); in VisitUint64LessThan()
1772 VisitWord64Compare(this, node, &cont); in VisitUint64LessThan()
1776 void InstructionSelector::VisitUint64LessThanOrEqual(Node* node) { in VisitUint64LessThanOrEqual() argument
1777 FlagsContinuation cont(kUnsignedLessThanOrEqual, node); in VisitUint64LessThanOrEqual()
1778 VisitWord64Compare(this, node, &cont); in VisitUint64LessThanOrEqual()
1782 void InstructionSelector::VisitFloat32Equal(Node* node) { in VisitFloat32Equal() argument
1783 FlagsContinuation cont(kEqual, node); in VisitFloat32Equal()
1784 VisitFloat32Compare(this, node, &cont); in VisitFloat32Equal()
1788 void InstructionSelector::VisitFloat32LessThan(Node* node) { in VisitFloat32LessThan() argument
1789 FlagsContinuation cont(kUnsignedLessThan, node); in VisitFloat32LessThan()
1790 VisitFloat32Compare(this, node, &cont); in VisitFloat32LessThan()
1794 void InstructionSelector::VisitFloat32LessThanOrEqual(Node* node) { in VisitFloat32LessThanOrEqual() argument
1795 FlagsContinuation cont(kUnsignedLessThanOrEqual, node); in VisitFloat32LessThanOrEqual()
1796 VisitFloat32Compare(this, node, &cont); in VisitFloat32LessThanOrEqual()
1800 void InstructionSelector::VisitFloat64Equal(Node* node) { in VisitFloat64Equal() argument
1801 FlagsContinuation cont(kEqual, node); in VisitFloat64Equal()
1802 VisitFloat64Compare(this, node, &cont); in VisitFloat64Equal()
1806 void InstructionSelector::VisitFloat64LessThan(Node* node) { in VisitFloat64LessThan() argument
1807 FlagsContinuation cont(kUnsignedLessThan, node); in VisitFloat64LessThan()
1808 VisitFloat64Compare(this, node, &cont); in VisitFloat64LessThan()
1812 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { in VisitFloat64LessThanOrEqual() argument
1813 FlagsContinuation cont(kUnsignedLessThanOrEqual, node); in VisitFloat64LessThanOrEqual()
1814 VisitFloat64Compare(this, node, &cont); in VisitFloat64LessThanOrEqual()
1818 void InstructionSelector::VisitFloat64ExtractLowWord32(Node* node) { in VisitFloat64ExtractLowWord32() argument
1819 VisitRR(this, kMips64Float64ExtractLowWord32, node); in VisitFloat64ExtractLowWord32()
1823 void InstructionSelector::VisitFloat64ExtractHighWord32(Node* node) { in VisitFloat64ExtractHighWord32() argument
1824 VisitRR(this, kMips64Float64ExtractHighWord32, node); in VisitFloat64ExtractHighWord32()
1828 void InstructionSelector::VisitFloat64InsertLowWord32(Node* node) { in VisitFloat64InsertLowWord32() argument
1830 Node* left = node->InputAt(0); in VisitFloat64InsertLowWord32()
1831 Node* right = node->InputAt(1); in VisitFloat64InsertLowWord32()
1832 Emit(kMips64Float64InsertLowWord32, g.DefineSameAsFirst(node), in VisitFloat64InsertLowWord32()
1837 void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { in VisitFloat64InsertHighWord32() argument
1839 Node* left = node->InputAt(0); in VisitFloat64InsertHighWord32()
1840 Node* right = node->InputAt(1); in VisitFloat64InsertHighWord32()
1841 Emit(kMips64Float64InsertHighWord32, g.DefineSameAsFirst(node), in VisitFloat64InsertHighWord32()