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()
88 void VisitRRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { in VisitRRR() argument
89 ArmOperandGenerator g(selector); in VisitRRR()
90 selector->Emit(opcode, g.DefineAsRegister(node), in VisitRRR()
98 bool TryMatchShift(InstructionSelector* selector, in TryMatchShift() argument
102 ArmOperandGenerator g(selector); in TryMatchShift()
119 bool TryMatchROR(InstructionSelector* selector, InstructionCode* opcode_return, in TryMatchROR() argument
123 kMode_Operand2_R_ROR_R>(selector, opcode_return, node, in TryMatchROR()
128 bool TryMatchASR(InstructionSelector* selector, InstructionCode* opcode_return, in TryMatchASR() argument
132 kMode_Operand2_R_ASR_R>(selector, opcode_return, node, in TryMatchASR()
137 bool TryMatchLSL(InstructionSelector* selector, InstructionCode* opcode_return, in TryMatchLSL() argument
141 kMode_Operand2_R_LSL_R>(selector, opcode_return, node, in TryMatchLSL()
146 bool TryMatchLSR(InstructionSelector* selector, InstructionCode* opcode_return, in TryMatchLSR() argument
150 kMode_Operand2_R_LSR_R>(selector, opcode_return, node, in TryMatchLSR()
155 bool TryMatchShift(InstructionSelector* selector, 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()
167 bool TryMatchImmediateOrShift(InstructionSelector* selector, in TryMatchImmediateOrShift() argument
171 ArmOperandGenerator g(selector); 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
189 ArmOperandGenerator g(selector); in VisitBinop()
208 } else if (TryMatchImmediateOrShift(selector, &opcode, m.right().node(), in VisitBinop()
212 } else if (TryMatchImmediateOrShift(selector, &reverse_opcode, in VisitBinop()
240 selector->Emit(cont->Encode(opcode), output_count, outputs, input_count, in VisitBinop()
245 void VisitBinop(InstructionSelector* selector, Node* node, in VisitBinop() argument
248 VisitBinop(selector, node, opcode, reverse_opcode, &cont); in VisitBinop()
252 void EmitDiv(InstructionSelector* selector, ArchOpcode div_opcode, in EmitDiv() argument
256 ArmOperandGenerator g(selector); in EmitDiv()
257 if (selector->IsSupported(SUDIV)) { in EmitDiv()
258 selector->Emit(div_opcode, result_operand, left_operand, right_operand); in EmitDiv()
264 selector->Emit(f64i32_opcode, left_double_operand, left_operand); in EmitDiv()
265 selector->Emit(f64i32_opcode, right_double_operand, right_operand); in EmitDiv()
266 selector->Emit(kArmVdivF64, result_double_operand, left_double_operand, in EmitDiv()
268 selector->Emit(i32f64_opcode, result_operand, result_double_operand); in EmitDiv()
272 void VisitDiv(InstructionSelector* selector, Node* node, ArchOpcode div_opcode, in VisitDiv() argument
274 ArmOperandGenerator g(selector); in VisitDiv()
276 EmitDiv(selector, div_opcode, f64i32_opcode, i32f64_opcode, in VisitDiv()
282 void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode div_opcode, in VisitMod() argument
284 ArmOperandGenerator g(selector); in VisitMod()
290 EmitDiv(selector, div_opcode, f64i32_opcode, i32f64_opcode, div_operand, in VisitMod()
292 if (selector->IsSupported(MLS)) { in VisitMod()
293 selector->Emit(kArmMls, result_operand, div_operand, right_operand, in VisitMod()
297 selector->Emit(kArmMul, mul_operand, div_operand, right_operand); in VisitMod()
298 selector->Emit(kArmSub, result_operand, left_operand, mul_operand); in VisitMod()
505 void EmitBic(InstructionSelector* selector, Node* node, Node* left, in EmitBic() argument
507 ArmOperandGenerator g(selector); in EmitBic()
511 if (TryMatchShift(selector, &opcode, right, &value_operand, &shift_operand)) { in EmitBic()
512 selector->Emit(opcode, g.DefineAsRegister(node), g.UseRegister(left), in EmitBic()
516 selector->Emit(opcode | AddressingModeField::encode(kMode_Operand2_R), in EmitBic()
522 void EmitUbfx(InstructionSelector* selector, Node* node, Node* left, in EmitUbfx() argument
526 ArmOperandGenerator g(selector); in EmitUbfx()
527 selector->Emit(kArmUbfx, g.DefineAsRegister(node), g.UseRegister(left), in EmitUbfx()
629 void VisitShift(InstructionSelector* selector, Node* node, in VisitShift() argument
631 ArmOperandGenerator g(selector); in VisitShift()
638 CHECK(try_match_shift(selector, &opcode, node, &inputs[0], &inputs[1])); in VisitShift()
656 selector->Emit(cont->Encode(opcode), output_count, outputs, input_count, in VisitShift()
662 void VisitShift(InstructionSelector* selector, Node* node, in VisitShift() argument
665 VisitShift(selector, node, try_match_shift, &cont); in VisitShift()
1206 void VisitCompare(InstructionSelector* selector, InstructionCode opcode, in VisitCompare() argument
1209 ArmOperandGenerator g(selector); in VisitCompare()
1212 selector->Emit(opcode, g.NoOutput(), left, right, in VisitCompare()
1216 selector->Emit(opcode, g.DefineAsRegister(cont->result()), left, right); in VisitCompare()
1222 void VisitFloat32Compare(InstructionSelector* selector, Node* node, in VisitFloat32Compare() argument
1224 ArmOperandGenerator g(selector); in VisitFloat32Compare()
1227 VisitCompare(selector, kArmVcmpF32, g.UseRegister(m.left().node()), in VisitFloat32Compare()
1231 VisitCompare(selector, kArmVcmpF32, g.UseRegister(m.right().node()), in VisitFloat32Compare()
1234 VisitCompare(selector, kArmVcmpF32, g.UseRegister(m.left().node()), in VisitFloat32Compare()
1241 void VisitFloat64Compare(InstructionSelector* selector, Node* node, in VisitFloat64Compare() argument
1243 ArmOperandGenerator g(selector); in VisitFloat64Compare()
1246 VisitCompare(selector, kArmVcmpF64, g.UseRegister(m.left().node()), in VisitFloat64Compare()
1250 VisitCompare(selector, kArmVcmpF64, g.UseRegister(m.right().node()), in VisitFloat64Compare()
1253 VisitCompare(selector, kArmVcmpF64, g.UseRegister(m.left().node()), in VisitFloat64Compare()
1260 void VisitWordCompare(InstructionSelector* selector, Node* node, in VisitWordCompare() argument
1262 ArmOperandGenerator g(selector); in VisitWordCompare()
1269 if (TryMatchImmediateOrShift(selector, &opcode, m.right().node(), in VisitWordCompare()
1273 } else if (TryMatchImmediateOrShift(selector, &opcode, m.left().node(), in VisitWordCompare()
1296 selector->Emit(cont->Encode(opcode), output_count, outputs, input_count, in VisitWordCompare()
1301 void VisitWordCompare(InstructionSelector* selector, Node* node, in VisitWordCompare() argument
1303 VisitWordCompare(selector, node, kArmCmp, cont); in VisitWordCompare()
1308 void VisitWordCompareZero(InstructionSelector* selector, Node* user, in VisitWordCompareZero() argument
1310 while (selector->CanCover(user, value)) { in VisitWordCompareZero()
1323 return VisitWordCompare(selector, value, cont); in VisitWordCompareZero()
1327 return VisitWordCompare(selector, value, cont); in VisitWordCompareZero()
1330 return VisitWordCompare(selector, value, cont); in VisitWordCompareZero()
1333 return VisitWordCompare(selector, value, cont); in VisitWordCompareZero()
1336 return VisitWordCompare(selector, value, cont); in VisitWordCompareZero()
1339 return VisitFloat32Compare(selector, value, cont); in VisitWordCompareZero()
1342 return VisitFloat32Compare(selector, value, cont); in VisitWordCompareZero()
1345 return VisitFloat32Compare(selector, value, cont); in VisitWordCompareZero()
1348 return VisitFloat64Compare(selector, value, cont); in VisitWordCompareZero()
1351 return VisitFloat64Compare(selector, value, cont); in VisitWordCompareZero()
1354 return VisitFloat64Compare(selector, value, cont); in VisitWordCompareZero()
1366 if (!result || selector->IsDefined(result)) { in VisitWordCompareZero()
1370 return VisitBinop(selector, node, kArmAdd, kArmAdd, cont); in VisitWordCompareZero()
1373 return VisitBinop(selector, node, kArmSub, kArmRsb, cont); in VisitWordCompareZero()
1381 return VisitWordCompare(selector, value, kArmCmn, cont); in VisitWordCompareZero()
1383 return VisitWordCompare(selector, value, kArmCmp, cont); in VisitWordCompareZero()
1385 return VisitWordCompare(selector, value, kArmTst, cont); in VisitWordCompareZero()
1387 return VisitBinop(selector, value, kArmOrr, kArmOrr, cont); in VisitWordCompareZero()
1389 return VisitWordCompare(selector, value, kArmTeq, cont); in VisitWordCompareZero()
1391 return VisitShift(selector, value, TryMatchASR, cont); in VisitWordCompareZero()
1393 return VisitShift(selector, value, TryMatchLSL, cont); in VisitWordCompareZero()
1395 return VisitShift(selector, value, TryMatchLSR, cont); in VisitWordCompareZero()
1397 return VisitShift(selector, value, TryMatchROR, cont); in VisitWordCompareZero()
1405 ArmOperandGenerator g(selector); in VisitWordCompareZero()
1410 selector->Emit(opcode, g.NoOutput(), value_operand, value_operand, in VisitWordCompareZero()
1413 selector->Emit(opcode, g.DefineAsRegister(cont->result()), value_operand, in VisitWordCompareZero()