llvm.org GIT mirror llvm / 4643fea
[Mips] formatting through clang-format git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199853 91177308-0d34-0410-b5e6-96231b3b80d8 Jack Carter 6 years ago
1 changed file(s) with 10 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
160160 MipsAsmParser::OperandMatchResultTy
161161 parseLSAImm(SmallVectorImpl &Operands);
162162
163 bool searchSymbolAlias(SmallVectorImpl*> &Operands,
163 bool searchSymbolAlias(SmallVectorImpl *> &Operands,
164164 unsigned RegKind);
165165
166166 bool ParseOperand(SmallVectorImpl &,
462462 return Op;
463463 }
464464
465 static MipsOperand *CreateMem(unsigned Base, const MCExpr *Off,
466 SMLoc S, SMLoc E) {
465 static MipsOperand *CreateMem(unsigned Base, const MCExpr *Off, SMLoc S,
466 SMLoc E) {
467467 MipsOperand *Op = new MipsOperand(k_Memory);
468468 Op->Mem.Base = Base;
469469 Op->Mem.Off = Off;
579579 break;
580580 case Mips::BEQ:
581581 case Mips::BNE:
582 assert (MCID.getNumOperands() == 3 && "unexpected number of operands");
582 assert(MCID.getNumOperands() == 3 && "unexpected number of operands");
583583 Offset = Inst.getOperand(2);
584584 if (!Offset.isImm())
585585 break; // We'll deal with this situation later on when applying fixups.
586586 if (!isIntN(isMicroMips() ? 17 : 18, Offset.getImm()))
587587 return Error(IDLoc, "branch target out of range");
588 if (OffsetToAlignment (Offset.getImm(), 1LL << (isMicroMips() ? 1 : 2)))
588 if (OffsetToAlignment(Offset.getImm(), 1LL << (isMicroMips() ? 1 : 2)))
589589 return Error(IDLoc, "branch to misaligned address");
590590 break;
591591 case Mips::BGEZ:
596596 case Mips::BLTZAL:
597597 case Mips::BC1F:
598598 case Mips::BC1T:
599 assert (MCID.getNumOperands() == 2 && "unexpected number of operands");
599 assert(MCID.getNumOperands() == 2 && "unexpected number of operands");
600600 Offset = Inst.getOperand(1);
601601 if (!Offset.isImm())
602602 break; // We'll deal with this situation later on when applying fixups.
603603 if (!isIntN(isMicroMips() ? 17 : 18, Offset.getImm()))
604604 return Error(IDLoc, "branch target out of range");
605 if (OffsetToAlignment (Offset.getImm(), 1LL << (isMicroMips() ? 1 : 2)))
605 if (OffsetToAlignment(Offset.getImm(), 1LL << (isMicroMips() ? 1 : 2)))
606606 return Error(IDLoc, "branch to misaligned address");
607607 break;
608608 }
21502150 return MatchOperand_ParseFail;
21512151 }
21522152
2153 Operands.push_back(MipsOperand::CreateLSAImm(Expr, S,
2154 Parser.getTok().getLoc()));
2153 Operands.push_back(
2154 MipsOperand::CreateLSAImm(Expr, S, Parser.getTok().getLoc()));
21552155 return MatchOperand_Success;
21562156 }
21572157
23772377 return reportParseError("unexpected token in .set directive");
23782378 Lex(); // Eat comma
23792379
2380 if (Parser.parseExpression(Value))
2380 if (Parser.parseExpression(Value))
23812381 return reportParseError("expected valid expression after comma");
23822382
23832383 // Check if the Name already exists as a symbol.