Lines Matching refs:Op

58   unsigned validateTargetOperandClass(MCParsedAsmOperand &Op,
321 auto Op = make_unique<SparcOperand>(k_Token); in CreateToken() local
322 Op->Tok.Data = Str.data(); in CreateToken()
323 Op->Tok.Length = Str.size(); in CreateToken()
324 Op->StartLoc = S; in CreateToken()
325 Op->EndLoc = S; in CreateToken()
326 return Op; in CreateToken()
331 auto Op = make_unique<SparcOperand>(k_Register); in CreateReg() local
332 Op->Reg.RegNum = RegNum; in CreateReg()
333 Op->Reg.Kind = (SparcOperand::RegisterKind)Kind; in CreateReg()
334 Op->StartLoc = S; in CreateReg()
335 Op->EndLoc = E; in CreateReg()
336 return Op; in CreateReg()
341 auto Op = make_unique<SparcOperand>(k_Immediate); in CreateImm() local
342 Op->Imm.Val = Val; in CreateImm()
343 Op->StartLoc = S; in CreateImm()
344 Op->EndLoc = E; in CreateImm()
345 return Op; in CreateImm()
348 static bool MorphToIntPairReg(SparcOperand &Op) { in MorphToIntPairReg() argument
349 unsigned Reg = Op.getReg(); in MorphToIntPairReg()
350 assert(Op.Reg.Kind == rk_IntReg); in MorphToIntPairReg()
362 Op.Reg.RegNum = IntPairRegs[regIdx / 2]; in MorphToIntPairReg()
363 Op.Reg.Kind = rk_IntPairReg; in MorphToIntPairReg()
367 static bool MorphToDoubleReg(SparcOperand &Op) { in MorphToDoubleReg() argument
368 unsigned Reg = Op.getReg(); in MorphToDoubleReg()
369 assert(Op.Reg.Kind == rk_FloatReg); in MorphToDoubleReg()
373 Op.Reg.RegNum = DoubleRegs[regIdx / 2]; in MorphToDoubleReg()
374 Op.Reg.Kind = rk_DoubleReg; in MorphToDoubleReg()
378 static bool MorphToQuadReg(SparcOperand &Op) { in MorphToQuadReg() argument
379 unsigned Reg = Op.getReg(); in MorphToQuadReg()
381 switch (Op.Reg.Kind) { in MorphToQuadReg()
396 Op.Reg.RegNum = Reg; in MorphToQuadReg()
397 Op.Reg.Kind = rk_QuadReg; in MorphToQuadReg()
402 MorphToMEMrr(unsigned Base, std::unique_ptr<SparcOperand> Op) { in MorphToMEMrr() argument
403 unsigned offsetReg = Op->getReg(); in MorphToMEMrr()
404 Op->Kind = k_MemoryReg; in MorphToMEMrr()
405 Op->Mem.Base = Base; in MorphToMEMrr()
406 Op->Mem.OffsetReg = offsetReg; in MorphToMEMrr()
407 Op->Mem.Off = nullptr; in MorphToMEMrr()
408 return Op; in MorphToMEMrr()
413 auto Op = make_unique<SparcOperand>(k_MemoryReg); in CreateMEMr() local
414 Op->Mem.Base = Base; in CreateMEMr()
415 Op->Mem.OffsetReg = Sparc::G0; // always 0 in CreateMEMr()
416 Op->Mem.Off = nullptr; in CreateMEMr()
417 Op->StartLoc = S; in CreateMEMr()
418 Op->EndLoc = E; in CreateMEMr()
419 return Op; in CreateMEMr()
423 MorphToMEMri(unsigned Base, std::unique_ptr<SparcOperand> Op) { in MorphToMEMri() argument
424 const MCExpr *Imm = Op->getImm(); in MorphToMEMri()
425 Op->Kind = k_MemoryImm; in MorphToMEMri()
426 Op->Mem.Base = Base; in MorphToMEMri()
427 Op->Mem.OffsetReg = 0; in MorphToMEMri()
428 Op->Mem.Off = Imm; in MorphToMEMri()
429 return Op; in MorphToMEMri()
761 std::unique_ptr<SparcOperand> Op; in parseOperand() local
762 ResTy = parseSparcAsmOperand(Op, false); in parseOperand()
763 if (ResTy != MatchOperand_Success || !Op) in parseOperand()
765 Operands.push_back(std::move(Op)); in parseOperand()
770 std::unique_ptr<SparcOperand> Op; in parseOperand() local
772 ResTy = parseSparcAsmOperand(Op, (Mnemonic == "call")); in parseOperand()
773 if (ResTy != MatchOperand_Success || !Op) in parseOperand()
777 Operands.push_back(std::move(Op)); in parseOperand()
783 SparcAsmParser::parseSparcAsmOperand(std::unique_ptr<SparcOperand> &Op, in parseSparcAsmOperand() argument
790 Op = nullptr; in parseSparcAsmOperand()
804 Op = SparcOperand::CreateReg(RegNo, RegKind, S, E); in parseSparcAsmOperand()
807 Op = SparcOperand::CreateToken("%psr", S); in parseSparcAsmOperand()
810 Op = SparcOperand::CreateToken("%fsr", S); in parseSparcAsmOperand()
813 Op = SparcOperand::CreateToken("%wim", S); in parseSparcAsmOperand()
816 Op = SparcOperand::CreateToken("%tbr", S); in parseSparcAsmOperand()
820 Op = SparcOperand::CreateToken("%xcc", S); in parseSparcAsmOperand()
822 Op = SparcOperand::CreateToken("%icc", S); in parseSparcAsmOperand()
829 Op = SparcOperand::CreateImm(EVal, S, E); in parseSparcAsmOperand()
838 Op = SparcOperand::CreateImm(EVal, S, E); in parseSparcAsmOperand()
853 Op = SparcOperand::CreateImm(Res, S, E); in parseSparcAsmOperand()
858 return (Op) ? MatchOperand_Success : MatchOperand_ParseFail; in parseSparcAsmOperand()
1200 SparcOperand &Op = (SparcOperand &)GOp; in validateTargetOperandClass() local
1201 if (Op.isFloatOrDoubleReg()) { in validateTargetOperandClass()
1205 if (!Op.isFloatReg() || SparcOperand::MorphToDoubleReg(Op)) in validateTargetOperandClass()
1209 if (SparcOperand::MorphToQuadReg(Op)) in validateTargetOperandClass()
1214 if (Op.isIntReg() && Kind == MCK_IntPair) { in validateTargetOperandClass()
1215 if (SparcOperand::MorphToIntPairReg(Op)) in validateTargetOperandClass()