Lines Matching refs:node

29   bool CanBeImmediate(Node* node, InstructionCode opcode) {  in CanBeImmediate()  argument
30 Int32Matcher m(node); in CanBeImmediate()
81 void VisitRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { in VisitRR() argument
83 selector->Emit(opcode, g.DefineAsRegister(node), in VisitRR()
84 g.UseRegister(node->InputAt(0))); in VisitRR()
88 void VisitRRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { in VisitRRR() argument
90 selector->Emit(opcode, g.DefineAsRegister(node), in VisitRRR()
91 g.UseRegister(node->InputAt(0)), in VisitRRR()
92 g.UseRegister(node->InputAt(1))); in VisitRRR()
99 InstructionCode* opcode_return, Node* node, in TryMatchShift() argument
103 if (node->opcode() == kOpcode) { in TryMatchShift()
104 Int32BinopMatcher m(node); in TryMatchShift()
105 *value_return = g.UseRegister(m.left().node()); in TryMatchShift()
108 *shift_return = g.UseImmediate(m.right().node()); in TryMatchShift()
111 *shift_return = g.UseRegister(m.right().node()); in TryMatchShift()
120 Node* node, InstructionOperand* value_return, in TryMatchROR() argument
123 kMode_Operand2_R_ROR_R>(selector, opcode_return, node, in TryMatchROR()
129 Node* node, InstructionOperand* value_return, in TryMatchASR() argument
132 kMode_Operand2_R_ASR_R>(selector, opcode_return, node, in TryMatchASR()
138 Node* node, InstructionOperand* value_return, in TryMatchLSL() argument
141 kMode_Operand2_R_LSL_R>(selector, opcode_return, node, in TryMatchLSL()
147 Node* node, InstructionOperand* value_return, in TryMatchLSR() argument
150 kMode_Operand2_R_LSR_R>(selector, opcode_return, node, in TryMatchLSR()
156 InstructionCode* opcode_return, Node* node, in TryMatchShift() argument
160 TryMatchASR(selector, opcode_return, node, value_return, shift_return) || in TryMatchShift()
161 TryMatchLSL(selector, opcode_return, node, value_return, shift_return) || in TryMatchShift()
162 TryMatchLSR(selector, opcode_return, node, value_return, shift_return) || in TryMatchShift()
163 TryMatchROR(selector, opcode_return, node, value_return, shift_return)); in TryMatchShift()
168 InstructionCode* opcode_return, Node* node, in TryMatchImmediateOrShift() argument
172 if (g.CanBeImmediate(node, *opcode_return)) { in TryMatchImmediateOrShift()
174 inputs[0] = g.UseImmediate(node); in TryMatchImmediateOrShift()
178 if (TryMatchShift(selector, opcode_return, node, &inputs[0], &inputs[1])) { in TryMatchImmediateOrShift()
186 void VisitBinop(InstructionSelector* selector, Node* node, in VisitBinop() argument
190 Int32BinopMatcher m(node); in VisitBinop()
196 if (m.left().node() == m.right().node()) { in VisitBinop()
204 InstructionOperand const input = g.UseRegister(m.left().node()); in VisitBinop()
208 } else if (TryMatchImmediateOrShift(selector, &opcode, m.right().node(), in VisitBinop()
210 inputs[0] = g.UseRegister(m.left().node()); in VisitBinop()
213 m.left().node(), &input_count, in VisitBinop()
215 inputs[0] = g.UseRegister(m.right().node()); in VisitBinop()
220 inputs[input_count++] = g.UseRegister(m.left().node()); in VisitBinop()
221 inputs[input_count++] = g.UseRegister(m.right().node()); in VisitBinop()
229 outputs[output_count++] = g.DefineAsRegister(node); in VisitBinop()
245 void VisitBinop(InstructionSelector* selector, Node* node, in VisitBinop() argument
248 VisitBinop(selector, node, opcode, reverse_opcode, &cont); in VisitBinop()
272 void VisitDiv(InstructionSelector* selector, Node* node, ArchOpcode div_opcode, in VisitDiv() argument
275 Int32BinopMatcher m(node); in VisitDiv()
277 g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitDiv()
278 g.UseRegister(m.right().node())); in VisitDiv()
282 void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode div_opcode, in VisitMod() argument
285 Int32BinopMatcher m(node); in VisitMod()
287 InstructionOperand result_operand = g.DefineAsRegister(node); in VisitMod()
288 InstructionOperand left_operand = g.UseRegister(m.left().node()); in VisitMod()
289 InstructionOperand right_operand = g.UseRegister(m.right().node()); in VisitMod()
305 void InstructionSelector::VisitLoad(Node* node) { in VisitLoad() argument
306 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); in VisitLoad()
308 Node* base = node->InputAt(0); in VisitLoad()
309 Node* index = node->InputAt(1); in VisitLoad()
338 g.DefineAsRegister(node), g.UseRegister(base), g.UseImmediate(index)); in VisitLoad()
341 g.DefineAsRegister(node), g.UseRegister(base), g.UseRegister(index)); in VisitLoad()
346 void InstructionSelector::VisitStore(Node* node) { in VisitStore() argument
348 Node* base = node->InputAt(0); in VisitStore()
349 Node* index = node->InputAt(1); in VisitStore()
350 Node* value = node->InputAt(2); in VisitStore()
352 StoreRepresentation store_rep = StoreRepresentationOf(node->op()); in VisitStore()
422 void InstructionSelector::VisitCheckedLoad(Node* node) { in VisitCheckedLoad() argument
423 CheckedLoadRepresentation load_rep = CheckedLoadRepresentationOf(node->op()); in VisitCheckedLoad()
425 Node* const buffer = node->InputAt(0); in VisitCheckedLoad()
426 Node* const offset = node->InputAt(1); in VisitCheckedLoad()
427 Node* const length = node->InputAt(2); in VisitCheckedLoad()
457 g.DefineAsRegister(node), offset_operand, length_operand, in VisitCheckedLoad()
462 void InstructionSelector::VisitCheckedStore(Node* node) { in VisitCheckedStore() argument
463 MachineRepresentation rep = CheckedStoreRepresentationOf(node->op()); in VisitCheckedStore()
465 Node* const buffer = node->InputAt(0); in VisitCheckedStore()
466 Node* const offset = node->InputAt(1); in VisitCheckedStore()
467 Node* const length = node->InputAt(2); in VisitCheckedStore()
468 Node* const value = node->InputAt(3); in VisitCheckedStore()
505 void EmitBic(InstructionSelector* selector, Node* node, Node* left, in EmitBic() argument
512 selector->Emit(opcode, g.DefineAsRegister(node), g.UseRegister(left), in EmitBic()
517 g.DefineAsRegister(node), g.UseRegister(left), in EmitBic()
522 void EmitUbfx(InstructionSelector* selector, Node* node, Node* left, in EmitUbfx() argument
527 selector->Emit(kArmUbfx, g.DefineAsRegister(node), g.UseRegister(left), in EmitUbfx()
534 void InstructionSelector::VisitWord32And(Node* node) { in VisitWord32And() argument
536 Int32BinopMatcher m(node); in VisitWord32And()
537 if (m.left().IsWord32Xor() && CanCover(node, m.left().node())) { in VisitWord32And()
538 Int32BinopMatcher mleft(m.left().node()); in VisitWord32And()
540 EmitBic(this, node, m.right().node(), mleft.left().node()); in VisitWord32And()
544 if (m.right().IsWord32Xor() && CanCover(node, m.right().node())) { in VisitWord32And()
545 Int32BinopMatcher mright(m.right().node()); in VisitWord32And()
547 EmitBic(this, node, m.left().node(), mright.left().node()); in VisitWord32And()
559 Int32BinopMatcher mleft(m.left().node()); in VisitWord32And()
566 return EmitUbfx(this, node, mleft.left().node(), lsb, in VisitWord32And()
570 return EmitUbfx(this, node, m.left().node(), 0, width); in VisitWord32And()
575 g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitWord32And()
581 Emit(kArmUxth, g.DefineAsRegister(m.node()), in VisitWord32And()
582 g.UseRegister(m.left().node()), g.TempImmediate(0)); in VisitWord32And()
591 Emit(kArmBfc, g.DefineSameAsFirst(node), g.UseRegister(m.left().node()), in VisitWord32And()
597 VisitBinop(this, node, kArmAnd, kArmAnd); in VisitWord32And()
601 void InstructionSelector::VisitWord32Or(Node* node) { in VisitWord32Or() argument
602 VisitBinop(this, node, kArmOrr, kArmOrr); in VisitWord32Or()
606 void InstructionSelector::VisitWord32Xor(Node* node) { in VisitWord32Xor() argument
608 Int32BinopMatcher m(node); in VisitWord32Xor()
613 if (TryMatchShift(this, &opcode, m.left().node(), &value_operand, in VisitWord32Xor()
615 Emit(opcode, g.DefineAsRegister(node), value_operand, shift_operand); in VisitWord32Xor()
619 g.DefineAsRegister(node), g.UseRegister(m.left().node())); in VisitWord32Xor()
622 VisitBinop(this, node, kArmEor, kArmEor); in VisitWord32Xor()
629 void VisitShift(InstructionSelector* selector, Node* node, in VisitShift() argument
638 CHECK(try_match_shift(selector, &opcode, node, &inputs[0], &inputs[1])); in VisitShift()
645 outputs[output_count++] = g.DefineAsRegister(node); in VisitShift()
662 void VisitShift(InstructionSelector* selector, Node* node, in VisitShift() argument
665 VisitShift(selector, node, try_match_shift, &cont); in VisitShift()
671 void InstructionSelector::VisitWord32Shl(Node* node) { in VisitWord32Shl() argument
672 VisitShift(this, node, TryMatchLSL); in VisitWord32Shl()
676 void InstructionSelector::VisitWord32Shr(Node* node) { in VisitWord32Shr() argument
678 Int32BinopMatcher m(node); in VisitWord32Shr()
682 Int32BinopMatcher mleft(m.left().node()); in VisitWord32Shr()
689 return EmitUbfx(this, node, mleft.left().node(), lsb, width); in VisitWord32Shr()
693 VisitShift(this, node, TryMatchLSR); in VisitWord32Shr()
697 void InstructionSelector::VisitWord32Sar(Node* node) { in VisitWord32Sar() argument
699 Int32BinopMatcher m(node); in VisitWord32Sar()
700 if (CanCover(m.node(), m.left().node()) && m.left().IsWord32Shl()) { in VisitWord32Sar()
701 Int32BinopMatcher mleft(m.left().node()); in VisitWord32Sar()
703 Emit(kArmSxth, g.DefineAsRegister(node), in VisitWord32Sar()
704 g.UseRegister(mleft.left().node()), g.TempImmediate(0)); in VisitWord32Sar()
707 Emit(kArmSxtb, g.DefineAsRegister(node), in VisitWord32Sar()
708 g.UseRegister(mleft.left().node()), g.TempImmediate(0)); in VisitWord32Sar()
712 VisitShift(this, node, TryMatchASR); in VisitWord32Sar()
716 void InstructionSelector::VisitWord32Ror(Node* node) { in VisitWord32Ror() argument
717 VisitShift(this, node, TryMatchROR); in VisitWord32Ror()
721 void InstructionSelector::VisitWord32Clz(Node* node) { in VisitWord32Clz() argument
722 VisitRR(this, kArmClz, node); in VisitWord32Clz()
726 void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } in VisitWord32Ctz() argument
729 void InstructionSelector::VisitWord32Popcnt(Node* node) { UNREACHABLE(); } in VisitWord32Popcnt() argument
732 void InstructionSelector::VisitInt32Add(Node* node) { in VisitInt32Add() argument
734 Int32BinopMatcher m(node); in VisitInt32Add()
735 if (CanCover(node, m.left().node())) { in VisitInt32Add()
738 Int32BinopMatcher mleft(m.left().node()); in VisitInt32Add()
739 Emit(kArmMla, g.DefineAsRegister(node), in VisitInt32Add()
740 g.UseRegister(mleft.left().node()), in VisitInt32Add()
741 g.UseRegister(mleft.right().node()), in VisitInt32Add()
742 g.UseRegister(m.right().node())); in VisitInt32Add()
746 Int32BinopMatcher mleft(m.left().node()); in VisitInt32Add()
747 Emit(kArmSmmla, g.DefineAsRegister(node), in VisitInt32Add()
748 g.UseRegister(mleft.left().node()), in VisitInt32Add()
749 g.UseRegister(mleft.right().node()), in VisitInt32Add()
750 g.UseRegister(m.right().node())); in VisitInt32Add()
754 Int32BinopMatcher mleft(m.left().node()); in VisitInt32Add()
756 Emit(kArmUxtab, g.DefineAsRegister(node), in VisitInt32Add()
757 g.UseRegister(m.right().node()), in VisitInt32Add()
758 g.UseRegister(mleft.left().node()), g.TempImmediate(0)); in VisitInt32Add()
761 Emit(kArmUxtah, g.DefineAsRegister(node), in VisitInt32Add()
762 g.UseRegister(m.right().node()), in VisitInt32Add()
763 g.UseRegister(mleft.left().node()), g.TempImmediate(0)); in VisitInt32Add()
768 Int32BinopMatcher mleft(m.left().node()); in VisitInt32Add()
769 if (CanCover(mleft.node(), mleft.left().node()) && in VisitInt32Add()
771 Int32BinopMatcher mleftleft(mleft.left().node()); in VisitInt32Add()
773 Emit(kArmSxtab, g.DefineAsRegister(node), in VisitInt32Add()
774 g.UseRegister(m.right().node()), in VisitInt32Add()
775 g.UseRegister(mleftleft.left().node()), g.TempImmediate(0)); in VisitInt32Add()
778 Emit(kArmSxtah, g.DefineAsRegister(node), in VisitInt32Add()
779 g.UseRegister(m.right().node()), in VisitInt32Add()
780 g.UseRegister(mleftleft.left().node()), g.TempImmediate(0)); in VisitInt32Add()
789 if (CanCover(node, m.right().node())) { in VisitInt32Add()
792 Int32BinopMatcher mright(m.right().node()); in VisitInt32Add()
793 Emit(kArmMla, g.DefineAsRegister(node), in VisitInt32Add()
794 g.UseRegister(mright.left().node()), in VisitInt32Add()
795 g.UseRegister(mright.right().node()), in VisitInt32Add()
796 g.UseRegister(m.left().node())); in VisitInt32Add()
800 Int32BinopMatcher mright(m.right().node()); in VisitInt32Add()
801 Emit(kArmSmmla, g.DefineAsRegister(node), in VisitInt32Add()
802 g.UseRegister(mright.left().node()), in VisitInt32Add()
803 g.UseRegister(mright.right().node()), in VisitInt32Add()
804 g.UseRegister(m.left().node())); in VisitInt32Add()
808 Int32BinopMatcher mright(m.right().node()); in VisitInt32Add()
810 Emit(kArmUxtab, g.DefineAsRegister(node), in VisitInt32Add()
811 g.UseRegister(m.left().node()), in VisitInt32Add()
812 g.UseRegister(mright.left().node()), g.TempImmediate(0)); in VisitInt32Add()
815 Emit(kArmUxtah, g.DefineAsRegister(node), in VisitInt32Add()
816 g.UseRegister(m.left().node()), in VisitInt32Add()
817 g.UseRegister(mright.left().node()), g.TempImmediate(0)); in VisitInt32Add()
822 Int32BinopMatcher mright(m.right().node()); in VisitInt32Add()
823 if (CanCover(mright.node(), mright.left().node()) && in VisitInt32Add()
825 Int32BinopMatcher mrightleft(mright.left().node()); in VisitInt32Add()
827 Emit(kArmSxtab, g.DefineAsRegister(node), in VisitInt32Add()
828 g.UseRegister(m.left().node()), in VisitInt32Add()
829 g.UseRegister(mrightleft.left().node()), g.TempImmediate(0)); in VisitInt32Add()
832 Emit(kArmSxtah, g.DefineAsRegister(node), in VisitInt32Add()
833 g.UseRegister(m.left().node()), in VisitInt32Add()
834 g.UseRegister(mrightleft.left().node()), g.TempImmediate(0)); in VisitInt32Add()
843 VisitBinop(this, node, kArmAdd, kArmAdd); in VisitInt32Add()
847 void InstructionSelector::VisitInt32Sub(Node* node) { in VisitInt32Sub() argument
849 Int32BinopMatcher m(node); in VisitInt32Sub()
851 CanCover(node, m.right().node())) { in VisitInt32Sub()
852 Int32BinopMatcher mright(m.right().node()); in VisitInt32Sub()
853 Emit(kArmMls, g.DefineAsRegister(node), g.UseRegister(mright.left().node()), in VisitInt32Sub()
854 g.UseRegister(mright.right().node()), g.UseRegister(m.left().node())); in VisitInt32Sub()
857 VisitBinop(this, node, kArmSub, kArmRsb); in VisitInt32Sub()
861 void InstructionSelector::VisitInt32Mul(Node* node) { in VisitInt32Mul() argument
863 Int32BinopMatcher m(node); in VisitInt32Mul()
868 g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitInt32Mul()
869 g.UseRegister(m.left().node()), in VisitInt32Mul()
875 g.DefineAsRegister(node), g.UseRegister(m.left().node()), in VisitInt32Mul()
876 g.UseRegister(m.left().node()), in VisitInt32Mul()
881 VisitRRR(this, kArmMul, node); in VisitInt32Mul()
885 void InstructionSelector::VisitInt32MulHigh(Node* node) { in VisitInt32MulHigh() argument
886 VisitRRR(this, kArmSmmul, node); in VisitInt32MulHigh()
890 void InstructionSelector::VisitUint32MulHigh(Node* node) { in VisitUint32MulHigh() argument
892 InstructionOperand outputs[] = {g.TempRegister(), g.DefineAsRegister(node)}; in VisitUint32MulHigh()
893 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0)), in VisitUint32MulHigh()
894 g.UseRegister(node->InputAt(1))}; in VisitUint32MulHigh()
899 void InstructionSelector::VisitInt32Div(Node* node) { in VisitInt32Div() argument
900 VisitDiv(this, node, kArmSdiv, kArmVcvtF64S32, kArmVcvtS32F64); in VisitInt32Div()
904 void InstructionSelector::VisitUint32Div(Node* node) { in VisitUint32Div() argument
905 VisitDiv(this, node, kArmUdiv, kArmVcvtF64U32, kArmVcvtU32F64); in VisitUint32Div()
909 void InstructionSelector::VisitInt32Mod(Node* node) { in VisitInt32Mod() argument
910 VisitMod(this, node, kArmSdiv, kArmVcvtF64S32, kArmVcvtS32F64); in VisitInt32Mod()
914 void InstructionSelector::VisitUint32Mod(Node* node) { in VisitUint32Mod() argument
915 VisitMod(this, node, kArmUdiv, kArmVcvtF64U32, kArmVcvtU32F64); in VisitUint32Mod()
919 void InstructionSelector::VisitChangeFloat32ToFloat64(Node* node) { in VisitChangeFloat32ToFloat64() argument
920 VisitRR(this, kArmVcvtF64F32, node); in VisitChangeFloat32ToFloat64()
924 void InstructionSelector::VisitChangeInt32ToFloat64(Node* node) { in VisitChangeInt32ToFloat64() argument
925 VisitRR(this, kArmVcvtF64S32, node); in VisitChangeInt32ToFloat64()
929 void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { in VisitChangeUint32ToFloat64() argument
930 VisitRR(this, kArmVcvtF64U32, node); in VisitChangeUint32ToFloat64()
934 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { in VisitChangeFloat64ToInt32() argument
935 VisitRR(this, kArmVcvtS32F64, node); in VisitChangeFloat64ToInt32()
939 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { in VisitChangeFloat64ToUint32() argument
940 VisitRR(this, kArmVcvtU32F64, node); in VisitChangeFloat64ToUint32()
944 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { in VisitTruncateFloat64ToFloat32() argument
945 VisitRR(this, kArmVcvtF32F64, node); in VisitTruncateFloat64ToFloat32()
949 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { in VisitTruncateFloat64ToInt32() argument
950 switch (TruncationModeOf(node->op())) { in VisitTruncateFloat64ToInt32()
952 return VisitRR(this, kArchTruncateDoubleToI, node); in VisitTruncateFloat64ToInt32()
954 return VisitRR(this, kArmVcvtS32F64, node); in VisitTruncateFloat64ToInt32()
960 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { in VisitBitcastFloat32ToInt32() argument
961 VisitRR(this, kArmVmovLowU32F64, node); in VisitBitcastFloat32ToInt32()
965 void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { in VisitBitcastInt32ToFloat32() argument
967 Emit(kArmVmovLowF64U32, g.DefineAsRegister(node), in VisitBitcastInt32ToFloat32()
969 g.UseRegister(node->InputAt(0))); in VisitBitcastInt32ToFloat32()
973 void InstructionSelector::VisitFloat32Add(Node* node) { in VisitFloat32Add() argument
975 Float32BinopMatcher m(node); in VisitFloat32Add()
976 if (m.left().IsFloat32Mul() && CanCover(node, m.left().node())) { in VisitFloat32Add()
977 Float32BinopMatcher mleft(m.left().node()); in VisitFloat32Add()
978 Emit(kArmVmlaF32, g.DefineSameAsFirst(node), in VisitFloat32Add()
979 g.UseRegister(m.right().node()), g.UseRegister(mleft.left().node()), in VisitFloat32Add()
980 g.UseRegister(mleft.right().node())); in VisitFloat32Add()
983 if (m.right().IsFloat32Mul() && CanCover(node, m.right().node())) { in VisitFloat32Add()
984 Float32BinopMatcher mright(m.right().node()); in VisitFloat32Add()
985 Emit(kArmVmlaF32, g.DefineSameAsFirst(node), g.UseRegister(m.left().node()), in VisitFloat32Add()
986 g.UseRegister(mright.left().node()), in VisitFloat32Add()
987 g.UseRegister(mright.right().node())); in VisitFloat32Add()
990 VisitRRR(this, kArmVaddF32, node); in VisitFloat32Add()
994 void InstructionSelector::VisitFloat64Add(Node* node) { in VisitFloat64Add() argument
996 Float64BinopMatcher m(node); in VisitFloat64Add()
997 if (m.left().IsFloat64Mul() && CanCover(node, m.left().node())) { in VisitFloat64Add()
998 Float64BinopMatcher mleft(m.left().node()); in VisitFloat64Add()
999 Emit(kArmVmlaF64, g.DefineSameAsFirst(node), in VisitFloat64Add()
1000 g.UseRegister(m.right().node()), g.UseRegister(mleft.left().node()), in VisitFloat64Add()
1001 g.UseRegister(mleft.right().node())); in VisitFloat64Add()
1004 if (m.right().IsFloat64Mul() && CanCover(node, m.right().node())) { in VisitFloat64Add()
1005 Float64BinopMatcher mright(m.right().node()); in VisitFloat64Add()
1006 Emit(kArmVmlaF64, g.DefineSameAsFirst(node), g.UseRegister(m.left().node()), in VisitFloat64Add()
1007 g.UseRegister(mright.left().node()), in VisitFloat64Add()
1008 g.UseRegister(mright.right().node())); in VisitFloat64Add()
1011 VisitRRR(this, kArmVaddF64, node); in VisitFloat64Add()
1015 void InstructionSelector::VisitFloat32Sub(Node* node) { in VisitFloat32Sub() argument
1017 Float32BinopMatcher m(node); in VisitFloat32Sub()
1019 Emit(kArmVnegF32, g.DefineAsRegister(node), in VisitFloat32Sub()
1020 g.UseRegister(m.right().node())); in VisitFloat32Sub()
1023 if (m.right().IsFloat32Mul() && CanCover(node, m.right().node())) { in VisitFloat32Sub()
1024 Float32BinopMatcher mright(m.right().node()); in VisitFloat32Sub()
1025 Emit(kArmVmlsF32, g.DefineSameAsFirst(node), g.UseRegister(m.left().node()), in VisitFloat32Sub()
1026 g.UseRegister(mright.left().node()), in VisitFloat32Sub()
1027 g.UseRegister(mright.right().node())); in VisitFloat32Sub()
1030 VisitRRR(this, kArmVsubF32, node); in VisitFloat32Sub()
1034 void InstructionSelector::VisitFloat64Sub(Node* node) { in VisitFloat64Sub() argument
1036 Float64BinopMatcher m(node); in VisitFloat64Sub()
1039 CanCover(m.node(), m.right().node())) { in VisitFloat64Sub()
1041 CanCover(m.right().node(), m.right().InputAt(0))) { in VisitFloat64Sub()
1044 Emit(kArmVrintpF64, g.DefineAsRegister(node), in VisitFloat64Sub()
1045 g.UseRegister(mright0.right().node())); in VisitFloat64Sub()
1050 Emit(kArmVnegF64, g.DefineAsRegister(node), in VisitFloat64Sub()
1051 g.UseRegister(m.right().node())); in VisitFloat64Sub()
1054 if (m.right().IsFloat64Mul() && CanCover(node, m.right().node())) { in VisitFloat64Sub()
1055 Float64BinopMatcher mright(m.right().node()); in VisitFloat64Sub()
1056 Emit(kArmVmlsF64, g.DefineSameAsFirst(node), g.UseRegister(m.left().node()), in VisitFloat64Sub()
1057 g.UseRegister(mright.left().node()), in VisitFloat64Sub()
1058 g.UseRegister(mright.right().node())); in VisitFloat64Sub()
1061 VisitRRR(this, kArmVsubF64, node); in VisitFloat64Sub()
1065 void InstructionSelector::VisitFloat32Mul(Node* node) { in VisitFloat32Mul() argument
1066 VisitRRR(this, kArmVmulF32, node); in VisitFloat32Mul()
1070 void InstructionSelector::VisitFloat64Mul(Node* node) { in VisitFloat64Mul() argument
1071 VisitRRR(this, kArmVmulF64, node); in VisitFloat64Mul()
1075 void InstructionSelector::VisitFloat32Div(Node* node) { in VisitFloat32Div() argument
1076 VisitRRR(this, kArmVdivF32, node); in VisitFloat32Div()
1080 void InstructionSelector::VisitFloat64Div(Node* node) { in VisitFloat64Div() argument
1081 VisitRRR(this, kArmVdivF64, node); in VisitFloat64Div()
1085 void InstructionSelector::VisitFloat64Mod(Node* node) { in VisitFloat64Mod() argument
1087 Emit(kArmVmodF64, g.DefineAsFixed(node, d0), g.UseFixed(node->InputAt(0), d0), in VisitFloat64Mod()
1088 g.UseFixed(node->InputAt(1), d1))->MarkAsCall(); in VisitFloat64Mod()
1092 void InstructionSelector::VisitFloat32Max(Node* node) { UNREACHABLE(); } in VisitFloat32Max() argument
1095 void InstructionSelector::VisitFloat64Max(Node* node) { UNREACHABLE(); } in VisitFloat64Max() argument
1098 void InstructionSelector::VisitFloat32Min(Node* node) { UNREACHABLE(); } in VisitFloat32Min() argument
1101 void InstructionSelector::VisitFloat64Min(Node* node) { UNREACHABLE(); } in VisitFloat64Min() argument
1104 void InstructionSelector::VisitFloat32Abs(Node* node) { in VisitFloat32Abs() argument
1105 VisitRR(this, kArmVabsF32, node); in VisitFloat32Abs()
1109 void InstructionSelector::VisitFloat64Abs(Node* node) { in VisitFloat64Abs() argument
1110 VisitRR(this, kArmVabsF64, node); in VisitFloat64Abs()
1114 void InstructionSelector::VisitFloat32Sqrt(Node* node) { in VisitFloat32Sqrt() argument
1115 VisitRR(this, kArmVsqrtF32, node); in VisitFloat32Sqrt()
1119 void InstructionSelector::VisitFloat64Sqrt(Node* node) { in VisitFloat64Sqrt() argument
1120 VisitRR(this, kArmVsqrtF64, node); in VisitFloat64Sqrt()
1124 void InstructionSelector::VisitFloat32RoundDown(Node* node) { in VisitFloat32RoundDown() argument
1125 VisitRR(this, kArmVrintmF32, node); in VisitFloat32RoundDown()
1129 void InstructionSelector::VisitFloat64RoundDown(Node* node) { in VisitFloat64RoundDown() argument
1130 VisitRR(this, kArmVrintmF64, node); in VisitFloat64RoundDown()
1134 void InstructionSelector::VisitFloat32RoundUp(Node* node) { in VisitFloat32RoundUp() argument
1135 VisitRR(this, kArmVrintpF32, node); in VisitFloat32RoundUp()
1139 void InstructionSelector::VisitFloat64RoundUp(Node* node) { in VisitFloat64RoundUp() argument
1140 VisitRR(this, kArmVrintpF64, node); in VisitFloat64RoundUp()
1144 void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { in VisitFloat32RoundTruncate() argument
1145 VisitRR(this, kArmVrintzF32, node); in VisitFloat32RoundTruncate()
1149 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { in VisitFloat64RoundTruncate() argument
1150 VisitRR(this, kArmVrintzF64, node); in VisitFloat64RoundTruncate()
1154 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { in VisitFloat64RoundTiesAway() argument
1155 VisitRR(this, kArmVrintaF64, node); in VisitFloat64RoundTiesAway()
1159 void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) { in VisitFloat32RoundTiesEven() argument
1160 VisitRR(this, kArmVrintnF32, node); in VisitFloat32RoundTiesEven()
1164 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { in VisitFloat64RoundTiesEven() argument
1165 VisitRR(this, kArmVrintnF64, node); in VisitFloat64RoundTiesEven()
1171 Node* node) { in EmitPrepareArguments() argument
1183 if (input.node()) { in EmitPrepareArguments()
1186 g.UseRegister(input.node())); in EmitPrepareArguments()
1193 if (input.node() == nullptr) continue; in EmitPrepareArguments()
1194 Emit(kArmPush, g.NoOutput(), g.UseRegister(input.node())); in EmitPrepareArguments()
1222 void VisitFloat32Compare(InstructionSelector* selector, Node* node, in VisitFloat32Compare() argument
1225 Float32BinopMatcher m(node); in VisitFloat32Compare()
1227 VisitCompare(selector, kArmVcmpF32, g.UseRegister(m.left().node()), in VisitFloat32Compare()
1228 g.UseImmediate(m.right().node()), cont); in VisitFloat32Compare()
1231 VisitCompare(selector, kArmVcmpF32, g.UseRegister(m.right().node()), in VisitFloat32Compare()
1232 g.UseImmediate(m.left().node()), cont); in VisitFloat32Compare()
1234 VisitCompare(selector, kArmVcmpF32, g.UseRegister(m.left().node()), in VisitFloat32Compare()
1235 g.UseRegister(m.right().node()), cont); in VisitFloat32Compare()
1241 void VisitFloat64Compare(InstructionSelector* selector, Node* node, in VisitFloat64Compare() argument
1244 Float64BinopMatcher m(node); in VisitFloat64Compare()
1246 VisitCompare(selector, kArmVcmpF64, g.UseRegister(m.left().node()), in VisitFloat64Compare()
1247 g.UseImmediate(m.right().node()), cont); in VisitFloat64Compare()
1250 VisitCompare(selector, kArmVcmpF64, g.UseRegister(m.right().node()), in VisitFloat64Compare()
1251 g.UseImmediate(m.left().node()), cont); in VisitFloat64Compare()
1253 VisitCompare(selector, kArmVcmpF64, g.UseRegister(m.left().node()), in VisitFloat64Compare()
1254 g.UseRegister(m.right().node()), cont); in VisitFloat64Compare()
1260 void VisitWordCompare(InstructionSelector* selector, Node* node, in VisitWordCompare() argument
1263 Int32BinopMatcher m(node); in VisitWordCompare()
1269 if (TryMatchImmediateOrShift(selector, &opcode, m.right().node(), in VisitWordCompare()
1271 inputs[0] = g.UseRegister(m.left().node()); in VisitWordCompare()
1273 } else if (TryMatchImmediateOrShift(selector, &opcode, m.left().node(), in VisitWordCompare()
1275 if (!node->op()->HasProperty(Operator::kCommutative)) cont->Commute(); in VisitWordCompare()
1276 inputs[0] = g.UseRegister(m.right().node()); in VisitWordCompare()
1280 inputs[input_count++] = g.UseRegister(m.left().node()); in VisitWordCompare()
1281 inputs[input_count++] = g.UseRegister(m.right().node()); in VisitWordCompare()
1301 void VisitWordCompare(InstructionSelector* selector, Node* node, in VisitWordCompare() argument
1303 VisitWordCompare(selector, node, kArmCmp, cont); in VisitWordCompare()
1318 value = m.left().node(); in VisitWordCompareZero()
1364 Node* const node = value->InputAt(0); in VisitWordCompareZero() local
1365 Node* const result = NodeProperties::FindProjection(node, 0); in VisitWordCompareZero()
1367 switch (node->opcode()) { in VisitWordCompareZero()
1370 return VisitBinop(selector, node, kArmAdd, kArmAdd, cont); in VisitWordCompareZero()
1373 return VisitBinop(selector, node, kArmSub, kArmRsb, cont); in VisitWordCompareZero()
1428 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { in VisitSwitch() argument
1430 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); in VisitSwitch()
1456 void InstructionSelector::VisitWord32Equal(Node* const node) { in VisitWord32Equal() argument
1457 FlagsContinuation cont(kEqual, node); in VisitWord32Equal()
1458 Int32BinopMatcher m(node); in VisitWord32Equal()
1460 return VisitWordCompareZero(this, m.node(), m.left().node(), &cont); in VisitWord32Equal()
1462 VisitWordCompare(this, node, &cont); in VisitWord32Equal()
1466 void InstructionSelector::VisitInt32LessThan(Node* node) { in VisitInt32LessThan() argument
1467 FlagsContinuation cont(kSignedLessThan, node); in VisitInt32LessThan()
1468 VisitWordCompare(this, node, &cont); in VisitInt32LessThan()
1472 void InstructionSelector::VisitInt32LessThanOrEqual(Node* node) { in VisitInt32LessThanOrEqual() argument
1473 FlagsContinuation cont(kSignedLessThanOrEqual, node); in VisitInt32LessThanOrEqual()
1474 VisitWordCompare(this, node, &cont); in VisitInt32LessThanOrEqual()
1478 void InstructionSelector::VisitUint32LessThan(Node* node) { in VisitUint32LessThan() argument
1479 FlagsContinuation cont(kUnsignedLessThan, node); in VisitUint32LessThan()
1480 VisitWordCompare(this, node, &cont); in VisitUint32LessThan()
1484 void InstructionSelector::VisitUint32LessThanOrEqual(Node* node) { in VisitUint32LessThanOrEqual() argument
1485 FlagsContinuation cont(kUnsignedLessThanOrEqual, node); in VisitUint32LessThanOrEqual()
1486 VisitWordCompare(this, node, &cont); in VisitUint32LessThanOrEqual()
1490 void InstructionSelector::VisitInt32AddWithOverflow(Node* node) { in VisitInt32AddWithOverflow() argument
1491 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { in VisitInt32AddWithOverflow()
1493 return VisitBinop(this, node, kArmAdd, kArmAdd, &cont); in VisitInt32AddWithOverflow()
1496 VisitBinop(this, node, kArmAdd, kArmAdd, &cont); in VisitInt32AddWithOverflow()
1500 void InstructionSelector::VisitInt32SubWithOverflow(Node* node) { in VisitInt32SubWithOverflow() argument
1501 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { in VisitInt32SubWithOverflow()
1503 return VisitBinop(this, node, kArmSub, kArmRsb, &cont); in VisitInt32SubWithOverflow()
1506 VisitBinop(this, node, kArmSub, kArmRsb, &cont); in VisitInt32SubWithOverflow()
1510 void InstructionSelector::VisitFloat32Equal(Node* node) { in VisitFloat32Equal() argument
1511 FlagsContinuation cont(kEqual, node); in VisitFloat32Equal()
1512 VisitFloat32Compare(this, node, &cont); in VisitFloat32Equal()
1516 void InstructionSelector::VisitFloat32LessThan(Node* node) { in VisitFloat32LessThan() argument
1517 FlagsContinuation cont(kFloatLessThan, node); in VisitFloat32LessThan()
1518 VisitFloat32Compare(this, node, &cont); in VisitFloat32LessThan()
1522 void InstructionSelector::VisitFloat32LessThanOrEqual(Node* node) { in VisitFloat32LessThanOrEqual() argument
1523 FlagsContinuation cont(kFloatLessThanOrEqual, node); in VisitFloat32LessThanOrEqual()
1524 VisitFloat32Compare(this, node, &cont); in VisitFloat32LessThanOrEqual()
1528 void InstructionSelector::VisitFloat64Equal(Node* node) { in VisitFloat64Equal() argument
1529 FlagsContinuation cont(kEqual, node); in VisitFloat64Equal()
1530 VisitFloat64Compare(this, node, &cont); in VisitFloat64Equal()
1534 void InstructionSelector::VisitFloat64LessThan(Node* node) { in VisitFloat64LessThan() argument
1535 FlagsContinuation cont(kFloatLessThan, node); in VisitFloat64LessThan()
1536 VisitFloat64Compare(this, node, &cont); in VisitFloat64LessThan()
1540 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { in VisitFloat64LessThanOrEqual() argument
1541 FlagsContinuation cont(kFloatLessThanOrEqual, node); in VisitFloat64LessThanOrEqual()
1542 VisitFloat64Compare(this, node, &cont); in VisitFloat64LessThanOrEqual()
1546 void InstructionSelector::VisitFloat64ExtractLowWord32(Node* node) { in VisitFloat64ExtractLowWord32() argument
1547 VisitRR(this, kArmVmovLowU32F64, node); in VisitFloat64ExtractLowWord32()
1551 void InstructionSelector::VisitFloat64ExtractHighWord32(Node* node) { in VisitFloat64ExtractHighWord32() argument
1552 VisitRR(this, kArmVmovHighU32F64, node); in VisitFloat64ExtractHighWord32()
1556 void InstructionSelector::VisitFloat64InsertLowWord32(Node* node) { in VisitFloat64InsertLowWord32() argument
1558 Node* left = node->InputAt(0); in VisitFloat64InsertLowWord32()
1559 Node* right = node->InputAt(1); in VisitFloat64InsertLowWord32()
1561 CanCover(node, left)) { in VisitFloat64InsertLowWord32()
1563 Emit(kArmVmovF64U32U32, g.DefineAsRegister(node), g.UseRegister(right), in VisitFloat64InsertLowWord32()
1567 Emit(kArmVmovLowF64U32, g.DefineSameAsFirst(node), g.UseRegister(left), in VisitFloat64InsertLowWord32()
1572 void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { in VisitFloat64InsertHighWord32() argument
1574 Node* left = node->InputAt(0); in VisitFloat64InsertHighWord32()
1575 Node* right = node->InputAt(1); in VisitFloat64InsertHighWord32()
1577 CanCover(node, left)) { in VisitFloat64InsertHighWord32()
1579 Emit(kArmVmovF64U32U32, g.DefineAsRegister(node), g.UseRegister(left), in VisitFloat64InsertHighWord32()
1583 Emit(kArmVmovHighF64U32, g.DefineSameAsFirst(node), g.UseRegister(left), in VisitFloat64InsertHighWord32()