Lines Matching refs:Mnemonic
202 bool parseOperand(OperandVector &, StringRef Mnemonic);
238 StringRef splitMnemonic(StringRef Mnemonic, unsigned &PredicationCode,
241 void getMnemonicAcceptInfo(StringRef Mnemonic, StringRef FullInst,
334 bool shouldOmitCCOutOperand(StringRef Mnemonic, OperandVector &Operands);
335 bool shouldOmitPredicateOperand(StringRef Mnemonic, OperandVector &Operands);
5054 ARMOperand &Mnemonic = static_cast<ARMOperand &>(*Operands[0]); in parseFPImm() local
5055 bool isFconst = Mnemonic.isToken() && (Mnemonic.getToken() == "fconstd" || in parseFPImm()
5056 Mnemonic.getToken() == "fconsts"); in parseFPImm()
5105 bool ARMAsmParser::parseOperand(OperandVector &Operands, StringRef Mnemonic) { in parseOperand() argument
5111 OperandMatchResultTy ResTy = MatchOperandParserImpl(Operands, Mnemonic); in parseOperand()
5128 bool ExpectLabel = Mnemonic == "b" || Mnemonic == "bl"; in parseOperand()
5138 if (Mnemonic == "vmrs" && in parseOperand()
5220 if (Mnemonic != "ldr") // only parse for ldr pseudo (e.g. ldr r0, =val) in parseOperand()
5317 StringRef ARMAsmParser::splitMnemonic(StringRef Mnemonic, in splitMnemonic() argument
5329 if ((Mnemonic == "movs" && isThumb()) || in splitMnemonic()
5330 Mnemonic == "teq" || Mnemonic == "vceq" || Mnemonic == "svc" || in splitMnemonic()
5331 Mnemonic == "mls" || Mnemonic == "smmls" || Mnemonic == "vcls" || in splitMnemonic()
5332 Mnemonic == "vmls" || Mnemonic == "vnmls" || Mnemonic == "vacge" || in splitMnemonic()
5333 Mnemonic == "vcge" || Mnemonic == "vclt" || Mnemonic == "vacgt" || in splitMnemonic()
5334 Mnemonic == "vaclt" || Mnemonic == "vacle" || Mnemonic == "hlt" || in splitMnemonic()
5335 Mnemonic == "vcgt" || Mnemonic == "vcle" || Mnemonic == "smlal" || in splitMnemonic()
5336 Mnemonic == "umaal" || Mnemonic == "umlal" || Mnemonic == "vabal" || in splitMnemonic()
5337 Mnemonic == "vmlal" || Mnemonic == "vpadal" || Mnemonic == "vqdmlal" || in splitMnemonic()
5338 Mnemonic == "fmuls" || Mnemonic == "vmaxnm" || Mnemonic == "vminnm" || in splitMnemonic()
5339 Mnemonic == "vcvta" || Mnemonic == "vcvtn" || Mnemonic == "vcvtp" || in splitMnemonic()
5340 Mnemonic == "vcvtm" || Mnemonic == "vrinta" || Mnemonic == "vrintn" || in splitMnemonic()
5341 Mnemonic == "vrintp" || Mnemonic == "vrintm" || Mnemonic == "hvc" || in splitMnemonic()
5342 Mnemonic.startswith("vsel")) in splitMnemonic()
5343 return Mnemonic; in splitMnemonic()
5347 if (Mnemonic != "adcs" && Mnemonic != "bics" && Mnemonic != "movs" && in splitMnemonic()
5348 Mnemonic != "muls" && Mnemonic != "smlals" && Mnemonic != "smulls" && in splitMnemonic()
5349 Mnemonic != "umlals" && Mnemonic != "umulls" && Mnemonic != "lsls" && in splitMnemonic()
5350 Mnemonic != "sbcs" && Mnemonic != "rscs") { in splitMnemonic()
5351 unsigned CC = StringSwitch<unsigned>(Mnemonic.substr(Mnemonic.size()-2)) in splitMnemonic()
5371 Mnemonic = Mnemonic.slice(0, Mnemonic.size() - 2); in splitMnemonic()
5378 if (Mnemonic.endswith("s") && in splitMnemonic()
5379 !(Mnemonic == "cps" || Mnemonic == "mls" || in splitMnemonic()
5380 Mnemonic == "mrs" || Mnemonic == "smmls" || Mnemonic == "vabs" || in splitMnemonic()
5381 Mnemonic == "vcls" || Mnemonic == "vmls" || Mnemonic == "vmrs" || in splitMnemonic()
5382 Mnemonic == "vnmls" || Mnemonic == "vqabs" || Mnemonic == "vrecps" || in splitMnemonic()
5383 Mnemonic == "vrsqrts" || Mnemonic == "srs" || Mnemonic == "flds" || in splitMnemonic()
5384 Mnemonic == "fmrs" || Mnemonic == "fsqrts" || Mnemonic == "fsubs" || in splitMnemonic()
5385 Mnemonic == "fsts" || Mnemonic == "fcpys" || Mnemonic == "fdivs" || in splitMnemonic()
5386 Mnemonic == "fmuls" || Mnemonic == "fcmps" || Mnemonic == "fcmpzs" || in splitMnemonic()
5387 Mnemonic == "vfms" || Mnemonic == "vfnms" || Mnemonic == "fconsts" || in splitMnemonic()
5388 (Mnemonic == "movs" && isThumb()))) { in splitMnemonic()
5389 Mnemonic = Mnemonic.slice(0, Mnemonic.size() - 1); in splitMnemonic()
5395 if (Mnemonic.startswith("cps")) { in splitMnemonic()
5398 StringSwitch<unsigned>(Mnemonic.substr(Mnemonic.size()-2, 2)) in splitMnemonic()
5403 Mnemonic = Mnemonic.slice(0, Mnemonic.size()-2); in splitMnemonic()
5409 if (Mnemonic.startswith("it")) { in splitMnemonic()
5410 ITMask = Mnemonic.slice(2, Mnemonic.size()); in splitMnemonic()
5411 Mnemonic = Mnemonic.slice(0, 2); in splitMnemonic()
5414 return Mnemonic; in splitMnemonic()
5421 void ARMAsmParser::getMnemonicAcceptInfo(StringRef Mnemonic, StringRef FullInst, in getMnemonicAcceptInfo() argument
5425 Mnemonic == "and" || Mnemonic == "lsl" || Mnemonic == "lsr" || in getMnemonicAcceptInfo()
5426 Mnemonic == "rrx" || Mnemonic == "ror" || Mnemonic == "sub" || in getMnemonicAcceptInfo()
5427 Mnemonic == "add" || Mnemonic == "adc" || Mnemonic == "mul" || in getMnemonicAcceptInfo()
5428 Mnemonic == "bic" || Mnemonic == "asr" || Mnemonic == "orr" || in getMnemonicAcceptInfo()
5429 Mnemonic == "mvn" || Mnemonic == "rsb" || Mnemonic == "rsc" || in getMnemonicAcceptInfo()
5430 Mnemonic == "orn" || Mnemonic == "sbc" || Mnemonic == "eor" || in getMnemonicAcceptInfo()
5431 Mnemonic == "neg" || Mnemonic == "vfm" || Mnemonic == "vfnm" || in getMnemonicAcceptInfo()
5433 (Mnemonic == "smull" || Mnemonic == "mov" || Mnemonic == "mla" || in getMnemonicAcceptInfo()
5434 Mnemonic == "smlal" || Mnemonic == "umlal" || Mnemonic == "umull")); in getMnemonicAcceptInfo()
5436 if (Mnemonic == "bkpt" || Mnemonic == "cbnz" || Mnemonic == "setend" || in getMnemonicAcceptInfo()
5437 Mnemonic == "cps" || Mnemonic == "it" || Mnemonic == "cbz" || in getMnemonicAcceptInfo()
5438 Mnemonic == "trap" || Mnemonic == "hlt" || Mnemonic == "udf" || in getMnemonicAcceptInfo()
5439 Mnemonic.startswith("crc32") || Mnemonic.startswith("cps") || in getMnemonicAcceptInfo()
5440 Mnemonic.startswith("vsel") || Mnemonic == "vmaxnm" || in getMnemonicAcceptInfo()
5441 Mnemonic == "vminnm" || Mnemonic == "vcvta" || Mnemonic == "vcvtn" || in getMnemonicAcceptInfo()
5442 Mnemonic == "vcvtp" || Mnemonic == "vcvtm" || Mnemonic == "vrinta" || in getMnemonicAcceptInfo()
5443 Mnemonic == "vrintn" || Mnemonic == "vrintp" || Mnemonic == "vrintm" || in getMnemonicAcceptInfo()
5444 Mnemonic.startswith("aes") || Mnemonic == "hvc" || Mnemonic == "setpan" || in getMnemonicAcceptInfo()
5445 Mnemonic.startswith("sha1") || Mnemonic.startswith("sha256") || in getMnemonicAcceptInfo()
5452 Mnemonic != "cdp2" && Mnemonic != "clrex" && Mnemonic != "mcr2" && in getMnemonicAcceptInfo()
5453 Mnemonic != "mcrr2" && Mnemonic != "mrc2" && Mnemonic != "mrrc2" && in getMnemonicAcceptInfo()
5454 Mnemonic != "dmb" && Mnemonic != "dsb" && Mnemonic != "isb" && in getMnemonicAcceptInfo()
5455 Mnemonic != "pld" && Mnemonic != "pli" && Mnemonic != "pldw" && in getMnemonicAcceptInfo()
5456 Mnemonic != "ldc2" && Mnemonic != "ldc2l" && Mnemonic != "stc2" && in getMnemonicAcceptInfo()
5457 Mnemonic != "stc2l" && !Mnemonic.startswith("rfe") && in getMnemonicAcceptInfo()
5458 !Mnemonic.startswith("srs"); in getMnemonicAcceptInfo()
5461 CanAcceptPredicationCode = Mnemonic != "movs"; in getMnemonicAcceptInfo()
5463 CanAcceptPredicationCode = Mnemonic != "nop" && Mnemonic != "movs"; in getMnemonicAcceptInfo()
5468 bool ARMAsmParser::shouldOmitCCOutOperand(StringRef Mnemonic, in shouldOmitCCOutOperand() argument
5481 if (Mnemonic == "mov" && Operands.size() > 4 && !isThumb() && in shouldOmitCCOutOperand()
5489 if (isThumb() && Mnemonic == "add" && Operands.size() == 5 && in shouldOmitCCOutOperand()
5498 if (((isThumb() && Mnemonic == "add") || in shouldOmitCCOutOperand()
5499 (isThumbTwo() && Mnemonic == "sub")) && in shouldOmitCCOutOperand()
5504 ((Mnemonic == "add" && static_cast<ARMOperand &>(*Operands[5]).isReg()) || in shouldOmitCCOutOperand()
5512 if (isThumbTwo() && (Mnemonic == "add" || Mnemonic == "sub") && in shouldOmitCCOutOperand()
5539 if (isThumbTwo() && Mnemonic == "mul" && Operands.size() == 6 && in shouldOmitCCOutOperand()
5559 if (isThumbTwo() && Mnemonic == "mul" && Operands.size() == 5 && in shouldOmitCCOutOperand()
5578 if (isThumb() && (Mnemonic == "add" || Mnemonic == "sub") && in shouldOmitCCOutOperand()
5591 bool ARMAsmParser::shouldOmitPredicateOperand(StringRef Mnemonic, in shouldOmitPredicateOperand() argument
5595 if ((Mnemonic == "vrintz" || Mnemonic == "vrintx" || Mnemonic == "vrintr") && in shouldOmitPredicateOperand()
5623 static bool doesIgnoreDataTypeSuffix(StringRef Mnemonic, StringRef DT) { in doesIgnoreDataTypeSuffix() argument
5624 return Mnemonic.startswith("vldm") || Mnemonic.startswith("vstm"); in doesIgnoreDataTypeSuffix()
5626 static void applyMnemonicAliases(StringRef &Mnemonic, uint64_t Features,
5680 StringRef Mnemonic = Name.slice(Start, Next); in ParseInstruction() local
5687 Mnemonic = splitMnemonic(Mnemonic, PredicationCode, CarrySetting, in ParseInstruction()
5691 if (isThumbOne() && PredicationCode != ARMCC::AL && Mnemonic != "b") { in ParseInstruction()
5696 Operands.push_back(ARMOperand::CreateToken(Mnemonic, NameLoc)); in ParseInstruction()
5703 if (Mnemonic == "it") { in ParseInstruction()
5734 getMnemonicAcceptInfo(Mnemonic, Name, CanAcceptCarrySet, CanAcceptPredicationCode); in ParseInstruction()
5740 return Error(NameLoc, "instruction '" + Mnemonic + in ParseInstruction()
5747 return Error(NameLoc, "instruction '" + Mnemonic + in ParseInstruction()
5753 SMLoc Loc = SMLoc::getFromPointer(NameLoc.getPointer() + Mnemonic.size()); in ParseInstruction()
5760 SMLoc Loc = SMLoc::getFromPointer(NameLoc.getPointer() + Mnemonic.size() + in ParseInstruction()
5771 } else if (Mnemonic == "cps" && isMClass()) { in ParseInstruction()
5784 doesIgnoreDataTypeSuffix(Mnemonic, ExtraToken)) in ParseInstruction()
5807 if (parseOperand(Operands, Mnemonic)) { in ParseInstruction()
5816 if (parseOperand(Operands, Mnemonic)) { in ParseInstruction()
5848 if (!CarrySetting && shouldOmitCCOutOperand(Mnemonic, Operands)) in ParseInstruction()
5854 if (shouldOmitPredicateOperand(Mnemonic, Operands)) in ParseInstruction()
5862 if (!isThumb() && Mnemonic == "blx" && Operands.size() == 3 && in ParseInstruction()
5873 (Mnemonic == "ldrexd" || Mnemonic == "strexd" || Mnemonic == "ldaexd" || in ParseInstruction()
5874 Mnemonic == "stlexd")) { in ParseInstruction()
5875 bool isLoad = (Mnemonic == "ldrexd" || Mnemonic == "ldaexd"); in ParseInstruction()
5909 (Mnemonic == "add" || Mnemonic == "sub" || Mnemonic == "and" || in ParseInstruction()
5910 Mnemonic == "eor" || Mnemonic == "lsl" || Mnemonic == "lsr" || in ParseInstruction()
5911 Mnemonic == "asr" || Mnemonic == "adc" || Mnemonic == "sbc" || in ParseInstruction()
5912 Mnemonic == "ror" || Mnemonic == "orr" || Mnemonic == "bic")) { in ParseInstruction()
5923 if (!Op5.isReg() || !((Mnemonic == "add" && CarrySetting) || Mnemonic == "sub")) { in ParseInstruction()
5925 if (Mnemonic == "add" && !CarrySetting) { in ParseInstruction()
5938 if (isThumbOne() && Operands.size() == 5 && Mnemonic == "add" && !CarrySetting) { in ParseInstruction()
5947 if ((Mnemonic == "ldrd" || Mnemonic == "strd")) { in ParseInstruction()
5971 if (isThumbTwo() && Mnemonic == "sub" && Operands.size() == 6 && in ParseInstruction()