Lines Matching refs:selector
18 explicit ArmOperandGenerator(InstructionSelector* selector) in ArmOperandGenerator() argument
19 : OperandGenerator(selector) {} in ArmOperandGenerator()
81 void VisitRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { in VisitRR() argument
82 ArmOperandGenerator g(selector); in VisitRR()
83 selector->Emit(opcode, g.DefineAsRegister(node), in VisitRR()
87 void VisitRRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { in VisitRRR() argument
88 ArmOperandGenerator g(selector); in VisitRRR()
89 selector->Emit(opcode, g.DefineAsRegister(node), in VisitRRR()
94 void VisitRRRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { in VisitRRRR() argument
95 ArmOperandGenerator g(selector); in VisitRRRR()
98 selector->Emit( in VisitRRRR()
103 void VisitRRI(InstructionSelector* selector, ArchOpcode opcode, Node* node) { in VisitRRI() argument
104 ArmOperandGenerator g(selector); in VisitRRI()
106 selector->Emit(opcode, g.DefineAsRegister(node), in VisitRRI()
110 void VisitRRIR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { in VisitRRIR() argument
111 ArmOperandGenerator g(selector); in VisitRRIR()
113 selector->Emit(opcode, g.DefineAsRegister(node), in VisitRRIR()
120 bool TryMatchShift(InstructionSelector* selector, in TryMatchShift() argument
124 ArmOperandGenerator g(selector); in TryMatchShift()
142 bool TryMatchShiftImmediate(InstructionSelector* selector, in TryMatchShiftImmediate() argument
146 ArmOperandGenerator g(selector); in TryMatchShiftImmediate()
159 bool TryMatchROR(InstructionSelector* selector, InstructionCode* opcode_return, in TryMatchROR() argument
163 kMode_Operand2_R_ROR_R>(selector, opcode_return, node, in TryMatchROR()
168 bool TryMatchASR(InstructionSelector* selector, InstructionCode* opcode_return, in TryMatchASR() argument
172 kMode_Operand2_R_ASR_R>(selector, opcode_return, node, in TryMatchASR()
177 bool TryMatchLSL(InstructionSelector* selector, InstructionCode* opcode_return, in TryMatchLSL() argument
181 kMode_Operand2_R_LSL_R>(selector, opcode_return, node, in TryMatchLSL()
185 bool TryMatchLSLImmediate(InstructionSelector* selector, in TryMatchLSLImmediate() argument
191 selector, opcode_return, node, value_return, shift_return); in TryMatchLSLImmediate()
194 bool TryMatchLSR(InstructionSelector* selector, InstructionCode* opcode_return, in TryMatchLSR() argument
198 kMode_Operand2_R_LSR_R>(selector, opcode_return, node, in TryMatchLSR()
203 bool TryMatchShift(InstructionSelector* selector, in TryMatchShift() argument
208 TryMatchASR(selector, opcode_return, node, value_return, shift_return) || in TryMatchShift()
209 TryMatchLSL(selector, opcode_return, node, value_return, shift_return) || in TryMatchShift()
210 TryMatchLSR(selector, opcode_return, node, value_return, shift_return) || in TryMatchShift()
211 TryMatchROR(selector, opcode_return, node, value_return, shift_return)); in TryMatchShift()
215 bool TryMatchImmediateOrShift(InstructionSelector* selector, in TryMatchImmediateOrShift() argument
219 ArmOperandGenerator g(selector); in TryMatchImmediateOrShift()
226 if (TryMatchShift(selector, opcode_return, node, &inputs[0], &inputs[1])) { in TryMatchImmediateOrShift()
234 void VisitBinop(InstructionSelector* selector, Node* node, in VisitBinop() argument
237 ArmOperandGenerator g(selector); in VisitBinop()
256 } else if (TryMatchImmediateOrShift(selector, &opcode, m.right().node(), in VisitBinop()
260 } else if (TryMatchImmediateOrShift(selector, &reverse_opcode, in VisitBinop()
290 selector->EmitDeoptimize(opcode, output_count, outputs, input_count, inputs, in VisitBinop()
294 selector->Emit(opcode, output_count, outputs, input_count, inputs); in VisitBinop()
296 selector->Emit(opcode, output_count, outputs, input_count, inputs); in VisitBinop()
301 void VisitBinop(InstructionSelector* selector, Node* node, in VisitBinop() argument
304 VisitBinop(selector, node, opcode, reverse_opcode, &cont); in VisitBinop()
308 void EmitDiv(InstructionSelector* selector, ArchOpcode div_opcode, in EmitDiv() argument
312 ArmOperandGenerator g(selector); in EmitDiv()
313 if (selector->IsSupported(SUDIV)) { in EmitDiv()
314 selector->Emit(div_opcode, result_operand, left_operand, right_operand); in EmitDiv()
320 selector->Emit(f64i32_opcode, left_double_operand, left_operand); in EmitDiv()
321 selector->Emit(f64i32_opcode, right_double_operand, right_operand); in EmitDiv()
322 selector->Emit(kArmVdivF64, result_double_operand, left_double_operand, in EmitDiv()
324 selector->Emit(i32f64_opcode, result_operand, result_double_operand); in EmitDiv()
328 void VisitDiv(InstructionSelector* selector, Node* node, ArchOpcode div_opcode, in VisitDiv() argument
330 ArmOperandGenerator g(selector); in VisitDiv()
332 EmitDiv(selector, div_opcode, f64i32_opcode, i32f64_opcode, in VisitDiv()
338 void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode div_opcode, in VisitMod() argument
340 ArmOperandGenerator g(selector); in VisitMod()
346 EmitDiv(selector, div_opcode, f64i32_opcode, i32f64_opcode, div_operand, in VisitMod()
348 if (selector->IsSupported(ARMv7)) { in VisitMod()
349 selector->Emit(kArmMls, result_operand, div_operand, right_operand, in VisitMod()
353 selector->Emit(kArmMul, mul_operand, div_operand, right_operand); in VisitMod()
354 selector->Emit(kArmSub | AddressingModeField::encode(kMode_Operand2_R), in VisitMod()
359 void EmitLoad(InstructionSelector* selector, InstructionCode opcode, in EmitLoad() argument
361 ArmOperandGenerator g(selector); in EmitLoad()
370 TryMatchLSLImmediate(selector, &opcode, index, &inputs[1], in EmitLoad()
377 selector->Emit(opcode, 1, output, input_count, inputs); in EmitLoad()
380 void EmitStore(InstructionSelector* selector, InstructionCode opcode, in EmitStore() argument
383 ArmOperandGenerator g(selector); in EmitStore()
389 TryMatchLSLImmediate(selector, &opcode, index, &inputs[2], in EmitStore()
396 selector->Emit(opcode, 0, nullptr, input_count, inputs); in EmitStore()
751 void EmitBic(InstructionSelector* selector, Node* node, Node* left, in EmitBic() argument
753 ArmOperandGenerator g(selector); in EmitBic()
757 if (TryMatchShift(selector, &opcode, right, &value_operand, &shift_operand)) { in EmitBic()
758 selector->Emit(opcode, g.DefineAsRegister(node), g.UseRegister(left), in EmitBic()
762 selector->Emit(opcode | AddressingModeField::encode(kMode_Operand2_R), in EmitBic()
768 void EmitUbfx(InstructionSelector* selector, Node* node, Node* left, in EmitUbfx() argument
772 ArmOperandGenerator g(selector); in EmitUbfx()
773 selector->Emit(kArmUbfx, g.DefineAsRegister(node), g.UseRegister(left), in EmitUbfx()
899 void VisitShift(InstructionSelector* selector, Node* node, in VisitShift() argument
901 ArmOperandGenerator g(selector); in VisitShift()
908 CHECK(try_match_shift(selector, &opcode, node, &inputs[0], &inputs[1])); in VisitShift()
928 selector->EmitDeoptimize(opcode, output_count, outputs, input_count, inputs, in VisitShift()
932 selector->Emit(opcode, output_count, outputs, input_count, inputs); in VisitShift()
934 selector->Emit(opcode, output_count, outputs, input_count, inputs); in VisitShift()
940 void VisitShift(InstructionSelector* selector, Node* node, in VisitShift() argument
943 VisitShift(selector, node, try_match_shift, &cont); in VisitShift()
1077 void VisitWord32PairShift(InstructionSelector* selector, InstructionCode opcode, in VisitWord32PairShift() argument
1079 ArmOperandGenerator g(selector); in VisitWord32PairShift()
1108 selector->Emit(opcode, output_count, outputs, 3, inputs, temp_count, temps); in VisitWord32PairShift()
1271 void EmitInt32MulWithOverflow(InstructionSelector* selector, Node* node, in EmitInt32MulWithOverflow() argument
1273 ArmOperandGenerator g(selector); in EmitInt32MulWithOverflow()
1280 selector->Emit(kArmSmull, 2, outputs, 2, inputs); in EmitInt32MulWithOverflow()
1287 selector->Emit(opcode, g.NoOutput(), temp_operand, result_operand, shift_31, in EmitInt32MulWithOverflow()
1291 selector->EmitDeoptimize(opcode, 0, nullptr, 3, in, cont->kind(), in EmitInt32MulWithOverflow()
1294 selector->Emit(opcode, g.DefineAsRegister(cont->result()), temp_operand, in EmitInt32MulWithOverflow()
1300 selector->Emit(opcode, 0, nullptr, 4, in); in EmitInt32MulWithOverflow()
1554 void VisitCompare(InstructionSelector* selector, InstructionCode opcode, in VisitCompare() argument
1557 ArmOperandGenerator g(selector); in VisitCompare()
1560 selector->Emit(opcode, g.NoOutput(), left, right, in VisitCompare()
1563 selector->EmitDeoptimize(opcode, g.NoOutput(), left, right, cont->kind(), in VisitCompare()
1566 selector->Emit(opcode, g.DefineAsRegister(cont->result()), left, right); in VisitCompare()
1569 selector->Emit(opcode, g.NoOutput(), left, right, in VisitCompare()
1576 void VisitFloat32Compare(InstructionSelector* selector, Node* node, in VisitFloat32Compare() argument
1578 ArmOperandGenerator g(selector); in VisitFloat32Compare()
1581 VisitCompare(selector, kArmVcmpF32, g.UseRegister(m.left().node()), in VisitFloat32Compare()
1585 VisitCompare(selector, kArmVcmpF32, g.UseRegister(m.right().node()), in VisitFloat32Compare()
1588 VisitCompare(selector, kArmVcmpF32, g.UseRegister(m.left().node()), in VisitFloat32Compare()
1595 void VisitFloat64Compare(InstructionSelector* selector, Node* node, in VisitFloat64Compare() argument
1597 ArmOperandGenerator g(selector); in VisitFloat64Compare()
1600 VisitCompare(selector, kArmVcmpF64, g.UseRegister(m.left().node()), in VisitFloat64Compare()
1604 VisitCompare(selector, kArmVcmpF64, g.UseRegister(m.right().node()), in VisitFloat64Compare()
1607 VisitCompare(selector, kArmVcmpF64, g.UseRegister(m.left().node()), in VisitFloat64Compare()
1665 void MaybeReplaceCmpZeroWithFlagSettingBinop(InstructionSelector* selector, in MaybeReplaceCmpZeroWithFlagSettingBinop() argument
1693 if (selector->CanCover(*node, binop)) { in MaybeReplaceCmpZeroWithFlagSettingBinop()
1698 } else if (selector->IsOnlyUserOfNodeInSameBlock(*node, binop)) { in MaybeReplaceCmpZeroWithFlagSettingBinop()
1709 void VisitWordCompare(InstructionSelector* selector, Node* node, in VisitWordCompare() argument
1711 ArmOperandGenerator g(selector); in VisitWordCompare()
1720 if (TryMatchImmediateOrShift(selector, &opcode, m.right().node(), in VisitWordCompare()
1724 } else if (TryMatchImmediateOrShift(selector, &opcode, m.left().node(), in VisitWordCompare()
1759 selector->EmitDeoptimize(opcode, output_count, outputs, input_count, inputs, in VisitWordCompare()
1763 selector->Emit(opcode, output_count, outputs, input_count, inputs); in VisitWordCompare()
1765 selector->Emit(opcode, output_count, outputs, input_count, inputs); in VisitWordCompare()
1770 void VisitWordCompare(InstructionSelector* selector, Node* node, in VisitWordCompare() argument
1781 MaybeReplaceCmpZeroWithFlagSettingBinop(selector, &node, binop, &opcode, in VisitWordCompare()
1792 MaybeReplaceCmpZeroWithFlagSettingBinop(selector, &node, binop, &opcode, in VisitWordCompare()
1797 VisitWordCompare(selector, node, opcode, cont); in VisitWordCompare()
1802 void VisitWordCompareZero(InstructionSelector* selector, Node* user, in VisitWordCompareZero() argument
1806 selector->CanCover(user, value)) { in VisitWordCompareZero()
1815 if (selector->CanCover(user, value)) { in VisitWordCompareZero()
1819 return VisitWordCompare(selector, value, cont); in VisitWordCompareZero()
1822 return VisitWordCompare(selector, value, cont); in VisitWordCompareZero()
1825 return VisitWordCompare(selector, value, cont); in VisitWordCompareZero()
1828 return VisitWordCompare(selector, value, cont); in VisitWordCompareZero()
1831 return VisitWordCompare(selector, value, cont); in VisitWordCompareZero()
1834 return VisitFloat32Compare(selector, value, cont); in VisitWordCompareZero()
1837 return VisitFloat32Compare(selector, value, cont); in VisitWordCompareZero()
1840 return VisitFloat32Compare(selector, value, cont); in VisitWordCompareZero()
1843 return VisitFloat64Compare(selector, value, cont); in VisitWordCompareZero()
1846 return VisitFloat64Compare(selector, value, cont); in VisitWordCompareZero()
1849 return VisitFloat64Compare(selector, value, cont); in VisitWordCompareZero()
1861 if (!result || selector->IsDefined(result)) { in VisitWordCompareZero()
1865 return VisitBinop(selector, node, kArmAdd, kArmAdd, cont); in VisitWordCompareZero()
1868 return VisitBinop(selector, node, kArmSub, kArmRsb, cont); in VisitWordCompareZero()
1875 return EmitInt32MulWithOverflow(selector, node, cont); in VisitWordCompareZero()
1883 return VisitWordCompare(selector, value, kArmCmn, cont); in VisitWordCompareZero()
1885 return VisitWordCompare(selector, value, kArmCmp, cont); in VisitWordCompareZero()
1887 return VisitWordCompare(selector, value, kArmTst, cont); in VisitWordCompareZero()
1889 return VisitBinop(selector, value, kArmOrr, kArmOrr, cont); in VisitWordCompareZero()
1891 return VisitWordCompare(selector, value, kArmTeq, cont); in VisitWordCompareZero()
1893 return VisitShift(selector, value, TryMatchASR, cont); in VisitWordCompareZero()
1895 return VisitShift(selector, value, TryMatchLSL, cont); in VisitWordCompareZero()
1897 return VisitShift(selector, value, TryMatchLSR, cont); in VisitWordCompareZero()
1899 return VisitShift(selector, value, TryMatchROR, cont); in VisitWordCompareZero()
1906 return VisitWordCompare(selector, user, cont); in VisitWordCompareZero()
1910 ArmOperandGenerator g(selector); in VisitWordCompareZero()
1915 selector->Emit(opcode, g.NoOutput(), value_operand, value_operand, in VisitWordCompareZero()
1918 selector->EmitDeoptimize(opcode, g.NoOutput(), value_operand, value_operand, in VisitWordCompareZero()
1921 selector->Emit(opcode, g.DefineAsRegister(cont->result()), value_operand, in VisitWordCompareZero()
1925 selector->Emit(opcode, g.NoOutput(), value_operand, value_operand, in VisitWordCompareZero()