24#define DEBUG_TYPE "m68k-asm-parser"
30 cl::desc(
"Enable specifying registers without the % prefix"),
39#define GET_ASSEMBLER_HEADER
40#include "M68kGenAsmMatcher.inc"
65 setAvailableFeatures(ComputeAvailableFeatures(STI.
getFeatureBits()));
68 unsigned validateTargetOperandClass(MCParsedAsmOperand &
Op,
69 unsigned Kind)
override;
70 bool parseRegister(MCRegister &
Reg, SMLoc &StartLoc, SMLoc &EndLoc)
override;
71 ParseStatus tryParseRegister(MCRegister &
Reg, SMLoc &StartLoc,
72 SMLoc &EndLoc)
override;
73 bool parseInstruction(ParseInstructionInfo &Info, StringRef Name,
75 bool matchAndEmitInstruction(SMLoc IDLoc,
unsigned &Opcode,
78 bool MatchingInlineAsm)
override;
89 RegIndirectDisplacement,
90 RegIndirectDisplacementIndex,
107 const MCExpr *OuterDisp;
108 const MCExpr *InnerDisp;
112 uint8_t AtLeast68020 : 1;
115 M68kMemOp(Kind Op) : Op(Op) {}
117 void print(raw_ostream &OS)
const;
122 typedef MCParsedAsmOperand Base;
139 template <
unsigned N>
bool isAddrN()
const;
142 M68kOperand(KindTy Kind, SMLoc Start, SMLoc End)
143 : Base(), Kind(Kind), Start(Start), End(End) {}
145 SMLoc getStartLoc()
const override {
return Start; }
146 SMLoc getEndLoc()
const override {
return End; }
148 void print(raw_ostream &OS,
const MCAsmInfo &MAI)
const override;
150 bool isMem()
const override {
return false; }
151 bool isMemOp()
const {
return Kind == KindTy::MemOp; }
153 static void addExpr(MCInst &Inst,
const MCExpr *Expr);
156 bool isReg()
const override;
159 bool isFPDReg()
const;
160 bool isFPCReg()
const;
161 MCRegister
getReg()
const override;
162 void addRegOperands(MCInst &Inst,
unsigned N)
const;
164 static std::unique_ptr<M68kOperand> createMemOp(M68kMemOp MemOp, SMLoc Start,
168 bool isToken()
const override;
170 static std::unique_ptr<M68kOperand> createToken(StringRef Token, SMLoc Start,
174 bool isImm()
const override;
175 void addImmOperands(MCInst &Inst,
unsigned N)
const;
177 static std::unique_ptr<M68kOperand> createImm(
const MCExpr *Expr, SMLoc Start,
181 bool isTrapImm()
const;
183 bool isBkptImm()
const;
186 bool isMoveMask()
const;
187 void addMoveMaskOperands(MCInst &Inst,
unsigned N)
const;
191 bool isAddr8()
const {
return isAddrN<8>(); }
192 bool isAddr16()
const {
return isAddrN<16>(); }
193 bool isAddr32()
const {
return isAddrN<32>(); }
194 void addAddrOperands(MCInst &Inst,
unsigned N)
const;
198 void addARIOperands(MCInst &Inst,
unsigned N)
const;
202 void addARIDOperands(MCInst &Inst,
unsigned N)
const;
206 void addARIIOperands(MCInst &Inst,
unsigned N)
const;
209 bool isARIPD()
const;
210 void addARIPDOperands(MCInst &Inst,
unsigned N)
const;
213 bool isARIPI()
const;
214 void addARIPIOperands(MCInst &Inst,
unsigned N)
const;
218 void addPCDOperands(MCInst &Inst,
unsigned N)
const;
222 void addPCIOperands(MCInst &Inst,
unsigned N)
const;
225 bool isPCIBD()
const;
226 bool isPCIBD32()
const;
227 bool isPCIBD16()
const;
228 void addPCIBDOperands(MCInst &Inst,
unsigned N)
const;
237#define GET_REGISTER_MATCHER
238#define GET_MATCHER_IMPLEMENTATION
239#include "M68kGenAsmMatcher.inc"
242 static unsigned RegistersByIndex[] = {
243 M68k::D0, M68k::D1, M68k::D2, M68k::D3, M68k::D4, M68k::D5,
244 M68k::D6, M68k::D7, M68k::A0, M68k::A1, M68k::A2, M68k::A3,
245 M68k::A4, M68k::A5, M68k::A6, M68k::SP, M68k::FP0, M68k::FP1,
246 M68k::FP2, M68k::FP3, M68k::FP4, M68k::FP5, M68k::FP6, M68k::FP7};
248 sizeof(RegistersByIndex) /
sizeof(RegistersByIndex[0]));
249 return RegistersByIndex[RegisterIndex];
285 OS <<
"RegMask(" <<
format(
"%04x", RegMask) <<
")";
288 OS <<
'%' << OuterReg;
290 case Kind::RegIndirect:
291 OS <<
"(%" << OuterReg <<
')';
293 case Kind::RegPostIncrement:
294 OS <<
"(%" << OuterReg <<
")+";
296 case Kind::RegPreDecrement:
297 OS <<
"-(%" << OuterReg <<
")";
299 case Kind::RegIndirectDisplacement:
300 OS << OuterDisp <<
"(%" << OuterReg <<
")";
302 case Kind::RegIndirectDisplacementIndex:
303 OS << OuterDisp <<
"(%" << OuterReg <<
", " << InnerReg <<
", " << InnerDisp
309void M68kOperand::addExpr(MCInst &Inst,
const MCExpr *Expr) {
319bool M68kOperand::isReg()
const {
320 return Kind == KindTy::MemOp && MemOp.Op == M68kMemOp::Kind::Reg;
323MCRegister M68kOperand::getReg()
const {
325 return MemOp.OuterReg;
328void M68kOperand::addRegOperands(MCInst &Inst,
unsigned N)
const {
330 assert((
N == 1) &&
"can only handle one register operand");
335std::unique_ptr<M68kOperand> M68kOperand::createMemOp(M68kMemOp MemOp,
336 SMLoc Start, SMLoc End) {
337 auto Op = std::make_unique<M68kOperand>(KindTy::MemOp, Start, End);
343bool M68kOperand::isToken()
const {
return Kind == KindTy::Token; }
344StringRef M68kOperand::getToken()
const {
349std::unique_ptr<M68kOperand> M68kOperand::createToken(StringRef Token,
350 SMLoc Start, SMLoc End) {
351 auto Op = std::make_unique<M68kOperand>(KindTy::Token, Start, End);
357bool M68kOperand::isImm()
const {
return Kind == KindTy::Imm; }
358void M68kOperand::addImmOperands(MCInst &Inst,
unsigned N)
const {
359 assert(isImm() &&
"wrong operand kind");
360 assert((
N == 1) &&
"can only handle one register operand");
362 M68kOperand::addExpr(Inst, Expr);
365std::unique_ptr<M68kOperand> M68kOperand::createImm(
const MCExpr *Expr,
366 SMLoc Start, SMLoc End) {
367 auto Op = std::make_unique<M68kOperand>(KindTy::Imm, Start, End);
372bool M68kOperand::isTrapImm()
const {
374 if (!isImm() || !Expr->evaluateAsAbsolute(
Value))
380bool M68kOperand::isBkptImm()
const {
382 if (!isImm() || !Expr->evaluateAsAbsolute(
Value))
389bool M68kOperand::isMoveMask()
const {
393 if (MemOp.Op == M68kMemOp::Kind::RegMask)
396 if (MemOp.Op != M68kMemOp::Kind::Reg)
404void M68kOperand::addMoveMaskOperands(MCInst &Inst,
unsigned N)
const {
405 assert(isMoveMask() &&
"wrong operand kind");
406 assert((
N == 1) &&
"can only handle one immediate operand");
408 uint16_t MoveMask = MemOp.RegMask;
409 if (MemOp.Op == M68kMemOp::Kind::Reg)
416bool M68kOperand::isAddr()
const {
417 return isMemOp() && MemOp.Op == M68kMemOp::Kind::Addr;
421template <
unsigned N>
bool M68kOperand::isAddrN()
const {
424 if (MemOp.OuterDisp->evaluateAsAbsolute(Res))
430void M68kOperand::addAddrOperands(MCInst &Inst,
unsigned N)
const {
431 M68kOperand::addExpr(Inst, MemOp.OuterDisp);
435bool M68kOperand::isARI()
const {
436 return isMemOp() && MemOp.Op == M68kMemOp::Kind::RegIndirect &&
437 M68k::AR32RegClass.contains(MemOp.OuterReg);
439void M68kOperand::addARIOperands(MCInst &Inst,
unsigned N)
const {
444bool M68kOperand::isARID()
const {
445 return isMemOp() && MemOp.Op == M68kMemOp::Kind::RegIndirectDisplacement &&
446 M68k::AR32RegClass.contains(MemOp.OuterReg);
448void M68kOperand::addARIDOperands(MCInst &Inst,
unsigned N)
const {
449 M68kOperand::addExpr(Inst, MemOp.OuterDisp);
454bool M68kOperand::isARII()
const {
456 MemOp.Op == M68kMemOp::Kind::RegIndirectDisplacementIndex &&
457 M68k::AR32RegClass.contains(MemOp.OuterReg);
459void M68kOperand::addARIIOperands(MCInst &Inst,
unsigned N)
const {
460 M68kOperand::addExpr(Inst, MemOp.OuterDisp);
466bool M68kOperand::isARIPD()
const {
467 return isMemOp() && MemOp.Op == M68kMemOp::Kind::RegPreDecrement &&
468 M68k::AR32RegClass.contains(MemOp.OuterReg);
470void M68kOperand::addARIPDOperands(MCInst &Inst,
unsigned N)
const {
475bool M68kOperand::isARIPI()
const {
476 return isMemOp() && MemOp.Op == M68kMemOp::Kind::RegPostIncrement &&
477 M68k::AR32RegClass.contains(MemOp.OuterReg);
479void M68kOperand::addARIPIOperands(MCInst &Inst,
unsigned N)
const {
484bool M68kOperand::isPCD()
const {
485 return isMemOp() && MemOp.Op == M68kMemOp::Kind::RegIndirectDisplacement &&
486 MemOp.OuterReg == M68k::PC && !MemOp.AtLeast68020;
488void M68kOperand::addPCDOperands(MCInst &Inst,
unsigned N)
const {
489 M68kOperand::addExpr(Inst, MemOp.OuterDisp);
493bool M68kOperand::isPCI()
const {
495 MemOp.Op == M68kMemOp::Kind::RegIndirectDisplacementIndex &&
496 MemOp.OuterReg == M68k::PC && MemOp.Scale == 1 && !MemOp.AtLeast68020;
498void M68kOperand::addPCIOperands(MCInst &Inst,
unsigned N)
const {
499 M68kOperand::addExpr(Inst, MemOp.OuterDisp);
506bool M68kOperand::isPCIBD()
const {
507 return isMemOp() && MemOp.AtLeast68020 &&
508 (MemOp.Op == M68kMemOp::Kind::RegIndirectDisplacementIndex ||
509 MemOp.Op == M68kMemOp::Kind::RegIndirectDisplacement) &&
510 MemOp.OuterReg == M68k::PC;
512bool M68kOperand::isPCIBD32()
const {
516 (!MemOp.InnerReg.isValid() ||
517 getM68kMCRegisterClass(M68k::XR32RegClassID)
520bool M68kOperand::isPCIBD16()
const {
522 getM68kMCRegisterClass(M68k::XR16RegClassID).contains(MemOp.InnerReg);
524void M68kOperand::addPCIBDOperands(MCInst &Inst,
unsigned N)
const {
525 M68kOperand::addExpr(Inst, MemOp.OuterDisp);
531 bool SP,
bool FPDR =
false,
581bool M68kOperand::isAReg()
const {
587bool M68kOperand::isDReg()
const {
593bool M68kOperand::isFPDReg()
const {
600bool M68kOperand::isFPCReg()
const {
607unsigned M68kAsmParser::validateTargetOperandClass(MCParsedAsmOperand &
Op,
609 M68kOperand &Operand = (M68kOperand &)
Op;
614 if (Operand.isReg() &&
616 return Match_Success;
622 if (Operand.isReg() &&
624 return Match_Success;
629 if (Operand.isReg() &&
631 return Match_Success;
638 if (Operand.isReg() &&
640 return Match_Success;
645 if (Operand.isReg() &&
646 ((Operand.getReg() == M68k::A0) || (Operand.getReg() == M68k::A1))) {
647 return Match_Success;
652 if (Operand.isReg() &&
653 ((Operand.getReg() == M68k::D0) || (Operand.getReg() == M68k::D1))) {
654 return Match_Success;
659 if (Operand.isReg() &&
660 ((Operand.getReg() == M68k::D0) || (Operand.getReg() == M68k::D1) ||
661 (Operand.getReg() == M68k::A0) || (Operand.getReg() == M68k::A1))) {
662 return Match_Success;
667 return Match_InvalidOperand;
670bool M68kAsmParser::parseRegisterName(MCRegister &RegNo, SMLoc Loc,
671 StringRef RegisterName) {
672 auto RegisterNameLower = RegisterName.
lower();
675 if (RegisterNameLower ==
"ccr") {
678 }
else if (RegisterNameLower ==
"sr") {
684 if (RegisterNameLower.size() == 2) {
686 switch (RegisterNameLower[0]) {
689 if (isdigit(RegisterNameLower[1])) {
690 unsigned IndexOffset = (RegisterNameLower[0] ==
'a') ? 8 : 0;
691 unsigned RegIndex = (unsigned)(RegisterNameLower[1] -
'0');
701 if (RegisterNameLower[1] ==
'p') {
704 }
else if (RegisterNameLower[1] ==
'r') {
711 if (RegisterNameLower[1] ==
'c') {
717 }
else if (StringRef(RegisterNameLower).
starts_with(
"fp") &&
718 RegisterNameLower.size() > 2) {
719 auto RegIndex = unsigned(RegisterNameLower[2] -
'0');
720 if (RegIndex < 8 && RegisterNameLower.size() == 3) {
726 RegNo = StringSwitch<unsigned>(RegisterNameLower)
727 .Cases({
"fpc",
"fpcr"}, M68k::FPC)
728 .Cases({
"fps",
"fpsr"}, M68k::FPS)
729 .Cases({
"fpi",
"fpiar"}, M68k::FPIAR)
731 assert(RegNo != M68k::NoRegister &&
732 "Unrecognized FP control register name");
740ParseStatus M68kAsmParser::parseRegister(MCRegister &RegNo,
741 bool WithSizeSuffix) {
742 bool HasPercent =
false;
743 AsmToken PercentToken;
749 PercentToken = Lex();
756 getLexer().UnLex(PercentToken);
767 RegisterName = RegisterName.
drop_back(2);
770 if (!parseRegisterName(RegNo, Parser.
getLexer().
getLoc(), RegisterName)) {
772 getLexer().UnLex(PercentToken);
777 RegNo = MRI->
getSubReg(RegNo, M68k::MxSubRegIndex16Lo);
783bool M68kAsmParser::parseRegister(MCRegister &
Reg, SMLoc &StartLoc,
785 ParseStatus
Result = tryParseRegister(
Reg, StartLoc, EndLoc);
787 return Error(StartLoc,
"expected register");
792ParseStatus M68kAsmParser::tryParseRegister(MCRegister &
Reg, SMLoc &StartLoc,
794 StartLoc = getLexer().getLoc();
796 EndLoc = getLexer().getLoc();
800bool M68kAsmParser::isExpr() {
816 SMLoc
Start = getLexer().getLoc();
822 if (getParser().parseExpression(Expr, End))
825 Operands.push_back(M68kOperand::createImm(Expr, Start, End));
830 SMLoc
Start = getLexer().getLoc();
834 MemOp.AtLeast68020 = STI->hasFeature(M68k::FeatureISA20);
843 bool HasDisplacement =
false;
847 }
else if (isExpr()) {
850 HasDisplacement =
true;
854 if (HasDisplacement) {
855 MemOp.Op = M68kMemOp::Kind::Addr;
857 M68kOperand::createMemOp(MemOp, Start, getLexer().getLoc()));
861 return Error(getLexer().getLoc(),
"expected (");
868 if (!HasDisplacement && isExpr()) {
871 HasDisplacement =
true;
875 MemOp.Op = M68kMemOp::Kind::Addr;
877 M68kOperand::createMemOp(MemOp, Start, getLexer().getLoc()));
884 Result = parseRegister(MemOp.OuterReg);
889 return Error(getLexer().getLoc(),
"expected register");
896 Result = parseRegister(MemOp.InnerReg,
true);
901 return Error(getLexer().getLoc(),
"expected register");
906 const auto &ScaleTok = Parser.
Lex();
908 return Error(getLexer().getLoc(),
"expected scale");
909 int64_t ScaleVal = ScaleTok.getIntVal();
910 if (ScaleVal < 1 || ScaleVal > 8 || !
isPowerOf2_32(ScaleVal))
911 return Error(ScaleTok.getLoc(),
"expected scale to be 1, 2, 4, or 8");
912 MemOp.Scale =
static_cast<uint8_t
>(ScaleVal);
921 return Error(getLexer().getLoc(),
"expected )");
930 SMLoc End = getLexer().getLoc();
932 unsigned OpCount = IsPD + IsPI + (
HasIndex || HasDisplacement);
934 return Error(Start,
"only one of post-increment, pre-decrement or "
935 "displacement can be used");
938 MemOp.Op = M68kMemOp::Kind::RegPreDecrement;
940 MemOp.Op = M68kMemOp::Kind::RegPostIncrement;
941 }
else if (HasIndex) {
942 MemOp.Op = M68kMemOp::Kind::RegIndirectDisplacementIndex;
943 }
else if (HasDisplacement) {
944 MemOp.Op = M68kMemOp::Kind::RegIndirectDisplacement;
946 MemOp.Op = M68kMemOp::Kind::RegIndirect;
949 Operands.push_back(M68kOperand::createMemOp(MemOp, Start, End));
954 SMLoc
Start = getLexer().getLoc();
955 M68kMemOp MemOp(M68kMemOp::Kind::RegMask);
959 bool IsFirstRegister =
960 (MemOp.Op == M68kMemOp::Kind::RegMask) && (MemOp.RegMask == 0);
962 MCRegister FirstRegister;
963 ParseStatus
Result = parseRegister(FirstRegister);
964 if (IsFirstRegister &&
Result.isNoMatch())
967 return Error(getLexer().getLoc(),
"expected start register");
969 MCRegister LastRegister = FirstRegister;
971 Result = parseRegister(LastRegister);
973 return Error(getLexer().getLoc(),
"expected end register");
979 uint16_t NumNewBits = LastRegisterIndex - FirstRegisterIndex + 1;
980 uint16_t NewMaskBits = ((1 << NumNewBits) - 1) << FirstRegisterIndex;
982 if (IsFirstRegister && (FirstRegister == LastRegister)) {
985 MemOp.Op = M68kMemOp::Kind::Reg;
986 MemOp.OuterReg = FirstRegister;
988 if (MemOp.Op == M68kMemOp::Kind::Reg) {
991 MemOp.Op = M68kMemOp::Kind::RegMask;
994 if (MemOp.RegMask == 0)
995 return Error(getLexer().getLoc(),
996 "special registers cannot be used in register masks");
999 if ((FirstRegisterIndex >= 16) || (LastRegisterIndex >= 16))
1000 return Error(getLexer().getLoc(),
1001 "special registers cannot be used in register masks");
1003 if (NewMaskBits & MemOp.RegMask)
1004 return Error(getLexer().getLoc(),
"conflicting masked registers");
1006 MemOp.RegMask |= NewMaskBits;
1014 M68kOperand::createMemOp(MemOp, Start, getLexer().getLoc()));
1018void M68kAsmParser::eatComma() {
1024bool M68kAsmParser::parseInstruction(ParseInstructionInfo &Info, StringRef Name,
1026 SMLoc
Start = getLexer().getLoc();
1027 Operands.push_back(M68kOperand::createToken(Name, Start, Start));
1037 ParseStatus MatchResult = MatchOperandParserImpl(
Operands, Name);
1042 SMLoc Loc = getLexer().getLoc();
1044 return Error(Loc,
"unexpected token parsing operands");
1053 uint64_t
const &ErrorInfo) {
1054 SMLoc ErrorLoc = Loc;
1055 char const *Diag = 0;
1057 if (ErrorInfo != ~0U) {
1058 if (ErrorInfo >=
Operands.size()) {
1059 Diag =
"too few operands for instruction.";
1061 auto const &
Op = (M68kOperand
const &)*
Operands[ErrorInfo];
1062 if (
Op.getStartLoc() != SMLoc()) {
1063 ErrorLoc =
Op.getStartLoc();
1069 Diag =
"invalid operand for instruction";
1072 return Error(ErrorLoc, Diag);
1075bool M68kAsmParser::missingFeature(SMLoc Loc, uint64_t
const &ErrorInfo) {
1076 return Error(Loc,
"instruction requires a CPU feature not currently enabled");
1079bool M68kAsmParser::emit(MCInst &Inst, SMLoc Loc, MCStreamer &Out)
const {
1086bool M68kAsmParser::matchAndEmitInstruction(SMLoc Loc,
unsigned &Opcode,
1089 uint64_t &ErrorInfo,
1090 bool MatchingInlineAsm) {
1092 unsigned MatchResult =
1093 MatchInstructionImpl(
Operands, Inst, ErrorInfo, MatchingInlineAsm);
1095 switch (MatchResult) {
1097 return emit(Inst, Loc, Out);
1098 case Match_MissingFeature:
1099 return missingFeature(Loc, ErrorInfo);
1100 case Match_InvalidOperand:
1101 return invalidOperand(Loc,
Operands, ErrorInfo);
1102 case Match_MnemonicFail:
1103 return Error(Loc,
"invalid instruction");
1109void M68kOperand::print(raw_ostream &OS,
const MCAsmInfo &MAI)
const {
1111 case KindTy::Invalid:
1116 OS <<
"token '" << Token <<
"'";
1121 Expr->evaluateAsAbsolute(
Value);
1122 OS <<
"immediate " <<
Value;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static bool isNot(const MachineRegisterInfo &MRI, const MachineInstr &MI)
#define LLVM_EXTERNAL_VISIBILITY
static bool checkRegisterClass(unsigned RegNo, bool Data, bool Address, bool SP, bool FPDR=false, bool FPCR=false)
static cl::opt< bool > RegisterPrefixOptional("m68k-register-prefix-optional", cl::Hidden, cl::desc("Enable specifying registers without the % prefix"), cl::init(false))
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeM68kAsmParser()
static unsigned getRegisterByIndex(unsigned RegisterIndex)
static unsigned getRegisterIndex(unsigned Register)
This file contains the M68k implementation of the TargetInstrInfo class.
This file contains the declarations of the M68k MCAsmInfo properties.
This file contains the M68k implementation of the TargetRegisterInfo class.
static MCRegister getReg(const MCDisassembler *D, unsigned RC, unsigned RegNo)
static bool isReg(const MCInst &MI, unsigned OpNo)
Func getContext().diagnose(DiagnosticInfoUnsupported(Func
static bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)
SMLoc getLoc() const
Get the current source location.
bool isNot(TokenKind K) const
StringRef getString() const
Get the string for the current token, this includes all characters (for example, the quotes on string...
bool is(TokenKind K) const
TokenKind getKind() const
Base class for user error types.
virtual void Initialize(MCAsmParser &Parser)
Initialize the extension for parsing using the given Parser.
Generic assembler parser interface, for use by target specific assembly parsers.
virtual void eatToEndOfStatement()=0
Skip to the end of the current statement, for error recovery.
virtual bool parseExpression(const MCExpr *&Res, SMLoc &EndLoc)=0
Parse an arbitrary expression.
const AsmToken & getTok() const
Get the current AsmToken from the stream.
virtual const AsmToken & Lex()=0
Get the next AsmToken in the stream, possibly handling file inclusion first.
static LLVM_ABI const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
Instances of this class represent a single low-level machine instruction.
void addOperand(const MCOperand Op)
Interface to description of machine instruction set.
static MCOperand createExpr(const MCExpr *Val)
static MCOperand createReg(MCRegister Reg)
static MCOperand createImm(int64_t Val)
MCParsedAsmOperand - This abstract class represents a source-level assembly instruction operand.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
MCRegister getSubReg(MCRegister Reg, unsigned Idx) const
Returns the physical register number of sub-register "Index" for physical register RegNo.
Wrapper class representing physical registers. Should be passed by value.
Streaming machine code generation interface.
virtual void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI)
Emit the given Instruction into the current section.
Generic base class for all target subtargets.
const FeatureBitset & getFeatureBits() const
MCTargetAsmParser - Generic interface to target specific assembly parsers.
Ternary parse status returned by various parse* methods.
static constexpr StatusTy Failure
constexpr bool isSuccess() const
static constexpr StatusTy Success
static constexpr StatusTy NoMatch
Wrapper class representing virtual and physical registers.
Represents a location in source code.
Represent a constant reference to a string, i.e.
LLVM_ABI std::string lower() const
StringRef drop_back(size_t N=1) const
Return a StringRef equal to 'this' but with the last N elements dropped.
LLVM_ABI bool ends_with_insensitive(StringRef Suffix) const
Check if this string ends with the given Suffix, ignoring case.
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
constexpr bool isInt(int64_t x)
Checks if an integer fits into the given bit width.
static bool isMem(const MachineInstr &MI, unsigned Op)
LLVM_ABI std::pair< StringRef, StringRef > getToken(StringRef Source, StringRef Delimiters=" \t\n\v\f\r")
getToken - This function extracts one token from source, ignoring any leading characters that appear ...
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Value
SmallVectorImpl< std::unique_ptr< MCParsedAsmOperand > > OperandVector
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
constexpr bool isUInt(uint64_t x)
Checks if an unsigned integer fits into the given bit width.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.
DWARFExpression::Operation Op
Target & getTheM68kTarget()
RegisterMCAsmParser - Helper template for registering a target specific assembly parser,...