Lines Matching refs:Reg
113 RegOp Reg; member
148 Op->Reg.Kind = Kind; in createReg()
149 Op->Reg.Num = Num; in createReg()
200 return Kind == KindReg && Reg.Kind == RegKind; in isReg()
204 return Reg.Num; in getReg()
365 bool parseRegister(Register &Reg);
367 bool parseRegister(Register &Reg, RegisterGroup Group, const unsigned *Regs,
495 bool SystemZAsmParser::parseRegister(Register &Reg) { in parseRegister() argument
496 Reg.StartLoc = Parser.getTok().getLoc(); in parseRegister()
505 return Error(Reg.StartLoc, "invalid register"); in parseRegister()
510 return Error(Reg.StartLoc, "invalid register"); in parseRegister()
514 if (Name.substr(1).getAsInteger(10, Reg.Num)) in parseRegister()
515 return Error(Reg.StartLoc, "invalid register"); in parseRegister()
518 if (Prefix == 'r' && Reg.Num < 16) in parseRegister()
519 Reg.Group = RegGR; in parseRegister()
520 else if (Prefix == 'f' && Reg.Num < 16) in parseRegister()
521 Reg.Group = RegFP; in parseRegister()
522 else if (Prefix == 'v' && Reg.Num < 32) in parseRegister()
523 Reg.Group = RegV; in parseRegister()
524 else if (Prefix == 'a' && Reg.Num < 16) in parseRegister()
525 Reg.Group = RegAccess; in parseRegister()
527 return Error(Reg.StartLoc, "invalid register"); in parseRegister()
529 Reg.EndLoc = Parser.getTok().getLoc(); in parseRegister()
540 bool SystemZAsmParser::parseRegister(Register &Reg, RegisterGroup Group, in parseRegister() argument
542 if (parseRegister(Reg)) in parseRegister()
544 if (Reg.Group != Group && !(Reg.Group == RegFP && Group == RegV)) in parseRegister()
545 return Error(Reg.StartLoc, "invalid operand for instruction"); in parseRegister()
546 if (Regs && Regs[Reg.Num] == 0) in parseRegister()
547 return Error(Reg.StartLoc, "invalid register pair"); in parseRegister()
548 if (Reg.Num == 0 && IsAddress) in parseRegister()
549 return Error(Reg.StartLoc, "%r0 used in an address"); in parseRegister()
551 Reg.Num = Regs[Reg.Num]; in parseRegister()
562 Register Reg; in parseRegister() local
564 if (parseRegister(Reg, Group, Regs, IsAddress)) in parseRegister()
567 Operands.push_back(SystemZOperand::createReg(Kind, Reg.Num, in parseRegister()
568 Reg.StartLoc, Reg.EndLoc)); in parseRegister()
593 Register Reg; in parseAddress() local
594 if (parseRegister(Reg)) in parseAddress()
596 if (Reg.Group == RegV) { in parseAddress()
599 Index = SystemZMC::VR128Regs[Reg.Num]; in parseAddress()
600 } else if (Reg.Group == RegGR) { in parseAddress()
601 if (Reg.Num == 0) in parseAddress()
602 return Error(Reg.StartLoc, "%r0 used in an address"); in parseAddress()
606 Index = Regs[Reg.Num]; in parseAddress()
608 Base = Regs[Reg.Num]; in parseAddress()
610 return Error(Reg.StartLoc, "invalid address register"); in parseAddress()
620 Register Reg; in parseAddress() local
621 if (parseRegister(Reg, RegGR, Regs, RegKind)) in parseAddress()
623 Base = Reg.Num; in parseAddress()
686 Register Reg; in ParseRegister() local
687 if (parseRegister(Reg)) in ParseRegister()
689 if (Reg.Group == RegGR) in ParseRegister()
690 RegNo = SystemZMC::GR64Regs[Reg.Num]; in ParseRegister()
691 else if (Reg.Group == RegFP) in ParseRegister()
692 RegNo = SystemZMC::FP64Regs[Reg.Num]; in ParseRegister()
693 else if (Reg.Group == RegV) in ParseRegister()
694 RegNo = SystemZMC::VR128Regs[Reg.Num]; in ParseRegister()
697 return Error(Reg.StartLoc, "invalid operand for instruction"); in ParseRegister()
698 StartLoc = Reg.StartLoc; in ParseRegister()
699 EndLoc = Reg.EndLoc; in ParseRegister()
755 Register Reg; in parseOperand() local
756 if (parseRegister(Reg)) in parseOperand()
758 Operands.push_back(SystemZOperand::createInvalid(Reg.StartLoc, Reg.EndLoc)); in parseOperand()
839 Register Reg; in parseAccessReg() local
840 if (parseRegister(Reg, RegAccess, nullptr)) in parseAccessReg()
843 Operands.push_back(SystemZOperand::createAccessReg(Reg.Num, in parseAccessReg()
844 Reg.StartLoc, in parseAccessReg()
845 Reg.EndLoc)); in parseAccessReg()