33#define DEBUG_TYPE "asm-printer" 
   35#define PRINT_ALIAS_INSTR 
   36#include "ARMGenAsmWriter.inc" 
   43  assert((imm & ~0x1f) == 0 && 
"Invalid shift encoding");
 
 
   57  O << getShiftOpcStr(ShOpc);
 
 
   71  if (Opt == 
"reg-names-std") {
 
   72    DefaultAltIdx = ARM::NoRegAltName;
 
   75  if (Opt == 
"reg-names-raw") {
 
   76    DefaultAltIdx = ARM::RegNamesRaw;
 
 
   89  unsigned Opcode = 
MI->getOpcode();
 
   94    O << 
'\t' << 
"vlldm" << 
'\t';
 
  100  case ARM::VLLDM_T2: {
 
  102    O << 
'\t' << 
"vlldm" << 
'\t';
 
  110    O << 
'\t' << 
"vlstm" << 
'\t';
 
  116  case ARM::VLSTM_T2: {
 
  118    O << 
'\t' << 
"vlstm" << 
'\t';
 
  177  case ARM::t2STMDB_UPD:
 
  178    if (
MI->getOperand(0).getReg() == ARM::SP && 
MI->getNumOperands() > 5) {
 
  182      if (Opcode == ARM::t2STMDB_UPD)
 
  191  case ARM::STR_PRE_IMM:
 
  192    if (
MI->getOperand(2).getReg() == ARM::SP &&
 
  193        MI->getOperand(3).getImm() == -4) {
 
  206  case ARM::t2LDMIA_UPD:
 
  207    if (
MI->getOperand(0).getReg() == ARM::SP && 
MI->getNumOperands() > 5) {
 
  211      if (Opcode == ARM::t2LDMIA_UPD)
 
  220  case ARM::LDR_POST_IMM:
 
  221    if (
MI->getOperand(2).getReg() == ARM::SP &&
 
  222        MI->getOperand(4).getImm() == 4) {
 
  234  case ARM::VSTMSDB_UPD:
 
  235  case ARM::VSTMDDB_UPD:
 
  236    if (
MI->getOperand(0).getReg() == ARM::SP) {
 
  237      O << 
'\t' << 
"vpush";
 
  247  case ARM::VLDMSIA_UPD:
 
  248  case ARM::VLDMDIA_UPD:
 
  249    if (
MI->getOperand(0).getReg() == ARM::SP) {
 
  260    bool Writeback = 
true;
 
  262    for (
unsigned i = 3; i < 
MI->getNumOperands(); ++i) {
 
  263      if (
MI->getOperand(i).getReg() == BaseReg)
 
  291    bool isStore = Opcode == ARM::STREXD || Opcode == ARM::STLEXD;
 
  301          Reg, ARM::gsub_0, &
MRI.getRegClass(ARM::GPRPairRegClassID)));
 
  305      for (
unsigned i = 
isStore ? 3 : 2; i < 
MI->getNumOperands(); ++i)
 
  317    switch (
MI->getOperand(0).getImm()) {
 
 
  345  } 
else if (
Op.isImm()) {
 
  348    assert(
Op.isExpr() && 
"unknown operand kind in printOperand");
 
  353      MAI.printExpr(O, *Expr);
 
  360      int64_t TargetAddress;
 
  361      if (!
Constant->evaluateAsAbsolute(TargetAddress)) {
 
  363        MAI.printExpr(O, *Expr);
 
  366        O.write_hex(
static_cast<uint32_t>(TargetAddress));
 
  373      MAI.printExpr(O, *Expr);
 
 
  405  int32_t OffImm = (int32_t)MO1.
getImm();
 
  406  bool isSub = OffImm < 0;
 
  409  if (OffImm == INT32_MIN)
 
 
  568                                                bool AlwaysPrintImm0) {
 
 
  595template <
bool AlwaysPr
intImm0>
 
  607         "unexpected idxmode");
 
 
  634  unsigned Imm = MO.
getImm();
 
  636      << 
'#' << ((Imm & 256) ? 
"" : 
"-") << (Imm & 0xff);
 
 
  645  O << (MO2.
getImm() ? 
"" : 
"-");
 
 
  653  unsigned Imm = MO.
getImm();
 
  655      << 
'#' << ((Imm & 256) ? 
"" : 
"-") << ((Imm & 0xff) << 2);
 
 
  685template <
bool AlwaysPr
intImm0>
 
  711template <
bool AlwaysPr
intImm0>
 
  748    O << 
":" << (MO2.
getImm() << 3);
 
 
  784  assert(MO.
isImm() && 
"Not a valid bf_inv_mask_imm value!");
 
 
  793  unsigned val = 
MI->getOperand(OpNum).getImm();
 
 
  800  unsigned val = 
MI->getOperand(OpNum).getImm();
 
 
  807  unsigned val = 
MI->getOperand(OpNum).getImm();
 
 
  814  unsigned ShiftOp = 
MI->getOperand(OpNum).getImm();
 
  815  bool isASR = (ShiftOp & (1 << 5)) != 0;
 
  816  unsigned Amt = ShiftOp & 0x1f;
 
 
  829  unsigned Imm = 
MI->getOperand(OpNum).getImm();
 
  832  assert(Imm > 0 && Imm < 32 && 
"Invalid PKH shift immediate value!");
 
 
  840  unsigned Imm = 
MI->getOperand(OpNum).getImm();
 
  844  assert(Imm > 0 && Imm <= 32 && 
"Invalid PKH shift immediate value!");
 
 
  852  if (
MI->getOpcode() != ARM::t2CLRM && 
MI->getOpcode() != ARM::VSCCLRMS) {
 
  855                       return MRI.getEncodingValue(LHS.getReg()) <
 
  856                              MRI.getEncodingValue(RHS.getReg());
 
  861  for (
unsigned i = OpNum, e = 
MI->getNumOperands(); i != e; ++i) {
 
 
  897  unsigned IFlags = 
Op.getImm();
 
  898  for (
int i = 2; i >= 0; --i)
 
  899    if (IFlags & (1 << i))
 
 
  911  if (FeatureBits[ARM::FeatureMClass]) {
 
  913    unsigned SYSm = 
Op.getImm() & 0xFFF; 
 
  914    unsigned Opcode = 
MI->getOpcode();
 
  917    if (Opcode == ARM::t2MSR_M && FeatureBits[ARM::FeatureDSP]) {
 
  919      if (TheReg && TheReg->isInRequiredFeatures({ARM::FeatureDSP})) {
 
  927    if (Opcode == ARM::t2MSR_M && FeatureBits [ARM::HasV7Ops]) {
 
  950  unsigned SpecRegRBit = 
Op.getImm() >> 4;
 
  951  unsigned Mask = 
Op.getImm() & 0xf;
 
  953  if (!SpecRegRBit && (Mask == 8 || Mask == 4 || Mask == 12)) {
 
 
  991  uint32_t Banked = 
MI->getOperand(OpNum).getImm();
 
  992  auto TheReg = ARMBankedReg::lookupBankedRegByEncoding(Banked);
 
  993  assert(TheReg && 
"invalid banked register operand");
 
  994  std::string Name = TheReg->Name;
 
  996  uint32_t isSPSR = (Banked & 0x20) >> 5;
 
  998    Name.replace(0, 4, 
"SPSR"); 
 
 
 1007  if ((
unsigned)CC == 15)
 
 
 1041  if (
MI->getOperand(OpNum).getReg()) {
 
 1042    assert(
MI->getOperand(OpNum).getReg() == ARM::CPSR &&
 
 1043           "Expect ARM CPSR register!");
 
 
 1051  O << 
MI->getOperand(OpNum).getImm();
 
 
 1057  O << 
"p" << 
MI->getOperand(OpNum).getImm();
 
 
 1063  O << 
"c" << 
MI->getOperand(OpNum).getImm();
 
 
 1069  O << 
"{" << 
MI->getOperand(OpNum).getImm() << 
"}";
 
 
 1077template <
unsigned scale>
 
 1091  if (OffImm == INT32_MIN)
 
 1093  else if (OffImm < 0)
 
 1094    O << 
"#-" << -OffImm;
 
 
 1103      << 
"#" << 
formatImm(
MI->getOperand(OpNum).getImm() * 4);
 
 
 1109  unsigned Imm = 
MI->getOperand(OpNum).getImm();
 
 
 1117  unsigned Mask = 
MI->getOperand(OpNum).getImm();
 
 1119  assert(NumTZ <= 3 && 
"Invalid IT mask!");
 
 1120  for (
unsigned Pos = 3, e = NumTZ; Pos > e; --Pos) {
 
 1121    if ((Mask >> Pos) & 1)
 
 
 1165  if (
unsigned ImmOffs = MO2.
getImm()) {
 
 
 1213  assert(MO2.
isImm() && 
"Not a valid t2_so_reg value!");
 
 
 1218template <
bool AlwaysPr
intImm0>
 
 1234  int32_t OffImm = (int32_t)MO2.
getImm();
 
 1235  bool isSub = OffImm < 0;
 
 1237  if (OffImm == INT32_MIN)
 
 1242  } 
else if (AlwaysPrintImm0 || OffImm > 0) {
 
 
 1249template <
bool AlwaysPr
intImm0>
 
 1261  int32_t OffImm = (int32_t)MO2.
getImm();
 
 1262  bool isSub = OffImm < 0;
 
 1264  if (OffImm == INT32_MIN)
 
 1269  } 
else if (AlwaysPrintImm0 || OffImm > 0) {
 
 
 1276template <
bool AlwaysPr
intImm0>
 
 1293  int32_t OffImm = (int32_t)MO2.
getImm();
 
 1294  bool isSub = OffImm < 0;
 
 1296  assert(((OffImm & 0x3) == 0) && 
"Not a valid immediate!");
 
 1299  if (OffImm == INT32_MIN)
 
 1304  } 
else if (AlwaysPrintImm0 || OffImm > 0) {
 
 
 1331  int32_t OffImm = (int32_t)MO1.
getImm();
 
 1334  if (OffImm == INT32_MIN)
 
 1336  else if (OffImm < 0)
 
 1337    O << 
"#-" << -OffImm;
 
 
 1346  int32_t OffImm = (int32_t)MO1.
getImm();
 
 1348  assert(((OffImm & 0x3) == 0) && 
"Not a valid immediate!");
 
 1352  if (OffImm == INT32_MIN)
 
 1354  else if (OffImm < 0)
 
 1355    O << 
"#-" << -OffImm;
 
 
 1372  assert(MO2.
getReg() && 
"Invalid so_reg load / store address!");
 
 1376  unsigned ShAmt = MO3.
getImm();
 
 1378    assert(ShAmt <= 3 && 
"Not a valid Thumb2 addressing mode!");
 
 
 1395  unsigned EncodedImm = 
MI->getOperand(OpNum).getImm();
 
 
 1407  unsigned Imm = 
MI->getOperand(OpNum).getImm();
 
 
 1414  unsigned Imm = 
MI->getOperand(OpNum).getImm();
 
 1417  assert(Imm <= 3 && 
"illegal ror immediate!");
 
 
 1431  unsigned Bits = 
Op.getImm() & 0xFF;
 
 1432  unsigned Rot = (
Op.getImm() & 0xF00) >> 7;
 
 1434  bool PrintUnsigned = 
false;
 
 1435  switch (
MI->getOpcode()) {
 
 1438    PrintUnsigned = (
MI->getOperand(OpNum - 1).
getReg() == ARM::PC);
 
 1442    PrintUnsigned = 
true;
 
 
 1477  O << 
"[" << 
MI->getOperand(OpNum).getImm() << 
"]";
 
 
 1681template<
unsigned NumRegs>
 
 1686  const char *Prefix = 
"{";
 
 1687  for (
unsigned i = 0; i < NumRegs; i++) {
 
 
 1695template<
int64_t Angle, 
int64_t Remainder>
 
 1699  unsigned Val = 
MI->getOperand(OpNo).getImm();
 
 1700  O << 
"#" << (Val * Angle) + Remainder;
 
 
 1715  unsigned Mask = 
MI->getOperand(OpNum).getImm();
 
 1717  assert(NumTZ <= 3 && 
"Invalid VPT mask!");
 
 1718  for (
unsigned Pos = 3, e = NumTZ; Pos > e; --Pos) {
 
 1719    bool T = ((Mask >> Pos) & 1) == 0;
 
 
 1730  uint32_t Val = 
MI->getOperand(OpNum).getImm();
 
 1731  assert(Val <= 1 && 
"Invalid MVE saturate operand");
 
 1732  O << 
"#" << (Val == 1 ? 48 : 64);
 
 
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static bool isStore(int Opcode)
static void printRegImmShift(raw_ostream &O, ARM_AM::ShiftOpc ShOpc, unsigned ShImm, ARMInstPrinter &printer)
static unsigned translateShiftImm(unsigned imm)
translateShiftImm - Convert shift immediate from 0-31 to 1-32 for printing.
static uint64_t scale(uint64_t Num, uint32_t N, uint32_t D)
static unsigned getReg(const MCDisassembler *D, unsigned RC, unsigned RegNo)
void printT2AddrModeImm0_1020s4Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printMVEVectorList(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListTwoAllLanes(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printCPSIFlag(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printSBitModifierOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListFour(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printThumbAddrModeImm5S1Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printPKHASRShiftImm(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVPTPredicateOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printInstSyncBOption(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAddrMode7Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printRegisterList(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printOperand(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O)
void printSORegRegOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printComplexRotationOp(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printMveSaturateOp(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListTwo(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printFBits16(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
ARMInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
void printAM2PreOrOffsetIndexOp(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printPCLabel(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAddrMode3OffsetOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printCPSIMod(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListTwoSpaced(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printT2AddrModeImm8Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
bool applyTargetSpecificCLOption(StringRef Opt) override
Customize the printer according to a command line option.
virtual bool printAliasInstr(const MCInst *MI, uint64_t Address, const MCSubtargetInfo &STI, raw_ostream &O)
void printThumbAddrModeImm5S4Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAddrMode3Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printMveAddrModeRQOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printThumbLdrLabelOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListTwoSpacedAllLanes(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printT2SOOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAddrModeTBB(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListOne(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printThumbITMask(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printPostIdxImm8Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAddrMode6OffsetOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAddrMode5Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListThreeSpaced(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printImmPlusOneOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printTraceSyncBOption(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printInstruction(const MCInst *MI, uint64_t Address, const MCSubtargetInfo &STI, raw_ostream &O)
void printPredicateOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAddrMode2Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printGPRPairOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printT2AddrModeImm8s4OffsetOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printThumbAddrModeSPOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListFourAllLanes(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printBitfieldInvMaskImmOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printPostIdxImm8s4Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printCImmediate(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printRegName(raw_ostream &OS, MCRegister Reg) override
Print the assembler register name.
void printFBits32(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListThreeAllLanes(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printRotImmOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printMandatoryPredicateOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printMemBOption(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListThreeSpacedAllLanes(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &O) override
Print the specified MCInst to the specified raw_ostream.
void printPostIdxRegOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
static const char * getRegisterName(MCRegister Reg, unsigned AltIdx=ARM::NoRegAltName)
void printFPImmOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printT2AddrModeImm8OffsetOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printCoprocOptionImm(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printThumbAddrModeRROperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printT2AddrModeSoRegOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printShiftImmOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printMSRMaskOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printT2AddrModeImm8s4Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printSORegImmOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printPKHLSLShiftImm(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printBankedRegOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printThumbSRImm(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printModImmOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printSetendOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListOneAllLanes(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printThumbAddrModeImm5S2Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAddrMode2OffsetOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAddrMode6Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printMandatoryRestrictedPredicateOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListFourSpacedAllLanes(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printPImmediate(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printThumbS4ImmOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVPTMask(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListThree(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorListFourSpaced(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVMOVModImmOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAdrLabelOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAddrModeImm12Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAM3PreOrOffsetIndexOp(const MCInst *MI, unsigned Op, raw_ostream &O, bool AlwaysPrintImm0)
void printThumbAddrModeImm5SOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O, unsigned Scale)
void printAddrModeTBH(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printNoHashImmediate(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printVectorIndex(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printLdStmModeOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printAddrMode5FP16Operand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
void printMandatoryInvertedPredicateOperand(const MCInst *MI, unsigned OpNum, const MCSubtargetInfo &STI, raw_ostream &O)
This is an important base class in LLVM.
Container class for subtarget features.
This class is intended to be used as a base class for asm properties and features specific to the tar...
Base class for the full range of assembler expressions which are needed for parsing.
@ Constant
Constant expressions.
@ Binary
Binary expressions.
WithMarkup markup(raw_ostream &OS, Markup M)
format_object< int64_t > formatHex(int64_t Value) const
raw_ostream * CommentStream
A stream that comments can be emitted to if desired.
const MCRegisterInfo & MRI
void printAnnotation(raw_ostream &OS, StringRef Annot)
Utility function for printing annotations.
format_object< int64_t > formatImm(int64_t Value) const
Utility function to print immediates in decimal or hex.
bool getUseMarkup() const
bool PrintBranchImmAsAddress
If true, a branch immediate (e.g.
MCInstPrinter(const MCAsmInfo &mai, const MCInstrInfo &mii, const MCRegisterInfo &mri)
Instances of this class represent a single low-level machine instruction.
void addOperand(const MCOperand Op)
void setOpcode(unsigned Op)
Interface to description of machine instruction set.
Instances of this class represent operands of the MCInst class.
static MCOperand createReg(MCRegister Reg)
MCRegister getReg() const
Returns the register number.
const MCExpr * getExpr() const
MCRegisterClass - Base class of TargetRegisterClass.
bool contains(MCRegister Reg) const
contains - Return true if the specified register is included in this register class.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Wrapper class representing physical registers. Should be passed by value.
Generic base class for all target subtargets.
bool hasFeature(unsigned Feature) const
const FeatureBitset & getFeatureBits() const
StringRef - Represent a constant reference to a string, i.e.
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.
static CondCodes getOppositeCondition(CondCodes CC)
const MClassSysReg * lookupMClassSysRegBy8bitSYSmValue(unsigned SYSm)
const MClassSysReg * lookupMClassSysRegAPSRNonDeprecated(unsigned SYSm)
const MClassSysReg * lookupMClassSysRegBy12bitSYSmValue(unsigned SYSm)
unsigned char getAM3Offset(unsigned AM3Opc)
unsigned char getAM5FP16Offset(unsigned AM5Opc)
unsigned getSORegOffset(unsigned Op)
int getSOImmVal(unsigned Arg)
getSOImmVal - Given a 32-bit immediate, if it is something that can fit into an shifter_operand immed...
ShiftOpc getAM2ShiftOpc(unsigned AM2Opc)
uint64_t decodeVMOVModImm(unsigned ModImm, unsigned &EltBits)
decodeVMOVModImm - Decode a NEON/MVE modified immediate value into the element value and the element ...
unsigned getAM2IdxMode(unsigned AM2Opc)
unsigned getAM3IdxMode(unsigned AM3Opc)
unsigned getAM2Offset(unsigned AM2Opc)
const char * getAMSubModeStr(AMSubMode Mode)
float getFPImmFloat(unsigned Imm)
ShiftOpc getSORegShOp(unsigned Op)
AddrOpc getAM5Op(unsigned AM5Opc)
AddrOpc getAM5FP16Op(unsigned AM5Opc)
const char * getAddrOpcStr(AddrOpc Op)
StringRef getShiftOpcStr(ShiftOpc Op)
unsigned char getAM5Offset(unsigned AM5Opc)
AddrOpc getAM2Op(unsigned AM2Opc)
AddrOpc getAM3Op(unsigned AM3Opc)
AMSubMode getAM4SubMode(unsigned Mode)
static const char * InstSyncBOptToString(unsigned val)
static const char * MemBOptToString(unsigned val, bool HasV8)
uint64_t evaluateBranchTarget(const MCInstrDesc &InstDesc, uint64_t Addr, int64_t Imm)
static const char * IModToString(unsigned val)
static const char * IFlagsToString(unsigned val)
static const char * TraceSyncBOptToString(unsigned val)
This is an optimization pass for GlobalISel generic memory operations.
auto drop_begin(T &&RangeOrContainer, size_t N=1)
Return a range covering RangeOrContainer with the first N elements excluded.
static const char * ARMVPTPredToString(ARMVCC::VPTCodes CC)
constexpr T rotr(T V, int R)
int bit_width(T Value)
Returns the number of bits needed to represent Value if Value is nonzero.
int countr_zero(T Val)
Count number of 0's from the least significant bit to the most stopping at the first 1.
bool is_sorted(R &&Range, Compare C)
Wrapper function around std::is_sorted to check if elements in a range R are sorted with respect to a...
DWARFExpression::Operation Op
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
static const char * ARMCondCodeToString(ARMCC::CondCodes CC)