44 #define DEBUG_TYPE "mccodeemitter"
46 STATISTIC(MCNumEmitted,
"Number of MC instructions emitted.");
47 STATISTIC(MCNumCPRelocations,
"Number of constant pool relocations created.");
58 : MCII(mcii), CTX(ctx), IsLittleEndian(IsLittle) {
60 ARMMCCodeEmitter(
const ARMMCCodeEmitter &) =
delete;
61 ARMMCCodeEmitter &operator=(
const ARMMCCodeEmitter &) =
delete;
62 ~ARMMCCodeEmitter()
override =
default;
77 unsigned getMachineSoImmOpValue(
unsigned SoImm)
const;
81 uint64_t getBinaryCodeForInstr(
const MCInst &
MI,
98 bool EncodeAddrModeOpValues(
const MCInst &
MI,
unsigned OpIdx,
99 unsigned &
Reg,
unsigned &Imm,
232 uint32_t getAddrMode2OffsetOpValue(
const MCInst &MI,
unsigned OpIdx,
242 uint32_t getAddrMode3OffsetOpValue(
const MCInst &MI,
unsigned OpIdx,
253 uint32_t getAddrModeThumbSPOpValue(
const MCInst &MI,
unsigned OpIdx,
273 uint32_t getAddrMode5FP16OpValue(
const MCInst &MI,
unsigned OpIdx,
278 unsigned getCCOutOpValue(
const MCInst &MI,
unsigned Op,
287 unsigned getSOImmOpValue(
const MCInst &MI,
unsigned Op,
307 unsigned SoImm = MO.
getImm();
309 assert(SoImmVal != -1 &&
"Not a valid so_imm value!");
320 unsigned getModImmOpValue(
const MCInst &MI,
unsigned Op,
339 unsigned getT2SOImmOpValue(
const MCInst &MI,
unsigned Op,
352 unsigned SoImm = MO.
getImm();
354 assert(Encoded != ~0U &&
"Not a Thumb2 so_imm value?");
358 unsigned getT2AddrModeSORegOpValue(
const MCInst &MI,
unsigned OpNum,
361 unsigned getT2AddrModeImm8OpValue(
const MCInst &MI,
unsigned OpNum,
364 unsigned getT2AddrModeImm8OffsetOpValue(
const MCInst &MI,
unsigned OpNum,
369 unsigned getSORegRegOpValue(
const MCInst &MI,
unsigned Op,
372 unsigned getSORegImmOpValue(
const MCInst &MI,
unsigned Op,
375 unsigned getT2SORegOpValue(
const MCInst &MI,
unsigned Op,
379 unsigned getNEONVcvtImm32OpValue(
const MCInst &MI,
unsigned Op,
385 unsigned getBitfieldInvertedMaskOpValue(
const MCInst &MI,
unsigned Op,
389 unsigned getRegisterListOpValue(
const MCInst &MI,
unsigned Op,
392 unsigned getAddrMode6AddressOpValue(
const MCInst &MI,
unsigned Op,
395 unsigned getAddrMode6OneLane32AddressOpValue(
const MCInst &MI,
unsigned Op,
398 unsigned getAddrMode6DupAddressOpValue(
const MCInst &MI,
unsigned Op,
401 unsigned getAddrMode6OffsetOpValue(
const MCInst &MI,
unsigned Op,
405 unsigned getShiftRight8Imm(
const MCInst &MI,
unsigned Op,
408 unsigned getShiftRight16Imm(
const MCInst &MI,
unsigned Op,
411 unsigned getShiftRight32Imm(
const MCInst &MI,
unsigned Op,
414 unsigned getShiftRight64Imm(
const MCInst &MI,
unsigned Op,
418 unsigned getThumbSRImmOpValue(
const MCInst &MI,
unsigned Op,
422 unsigned NEONThumb2DataIPostEncoder(
const MCInst &MI,
423 unsigned EncodedValue,
425 unsigned NEONThumb2LoadStorePostEncoder(
const MCInst &MI,
426 unsigned EncodedValue,
428 unsigned NEONThumb2DupPostEncoder(
const MCInst &MI,
429 unsigned EncodedValue,
431 unsigned NEONThumb2V8PostEncoder(
const MCInst &MI,
432 unsigned EncodedValue,
435 unsigned VFPThumb2PostEncoder(
const MCInst &MI,
436 unsigned EncodedValue,
443 void EmitConstant(uint64_t Val,
unsigned Size,
raw_ostream &OS)
const {
445 for (
unsigned i = 0; i !=
Size; ++i) {
446 unsigned Shift = IsLittleEndian ? i * 8 : (Size - 1 - i) * 8;
447 EmitByte((Val >> Shift) & 0xff, OS);
461 unsigned ARMMCCodeEmitter::NEONThumb2DataIPostEncoder(
const MCInst &MI,
462 unsigned EncodedValue,
468 unsigned Bit24 = EncodedValue & 0x01000000;
469 unsigned Bit28 = Bit24 << 4;
470 EncodedValue &= 0xEFFFFFFF;
471 EncodedValue |= Bit28;
472 EncodedValue |= 0x0F000000;
481 unsigned ARMMCCodeEmitter::NEONThumb2LoadStorePostEncoder(
const MCInst &MI,
482 unsigned EncodedValue,
485 EncodedValue &= 0xF0FFFFFF;
486 EncodedValue |= 0x09000000;
495 unsigned ARMMCCodeEmitter::NEONThumb2DupPostEncoder(
const MCInst &MI,
496 unsigned EncodedValue,
499 EncodedValue &= 0x00FFFFFF;
500 EncodedValue |= 0xEE000000;
508 unsigned ARMMCCodeEmitter::NEONThumb2V8PostEncoder(
const MCInst &MI,
509 unsigned EncodedValue,
512 EncodedValue |= 0xC000000;
520 unsigned ARMMCCodeEmitter::
521 VFPThumb2PostEncoder(
const MCInst &MI,
unsigned EncodedValue,
524 EncodedValue &= 0x0FFFFFFF;
525 EncodedValue |= 0xE0000000;
532 unsigned ARMMCCodeEmitter::
538 unsigned RegNo = CTX.getRegisterInfo()->getEncodingValue(Reg);
544 case ARM::Q0:
case ARM::Q1:
case ARM::Q2:
case ARM::Q3:
545 case ARM::Q4:
case ARM::Q5:
case ARM::Q6:
case ARM::Q7:
546 case ARM::Q8:
case ARM::Q9:
case ARM::Q10:
case ARM::Q11:
547 case ARM::Q12:
case ARM::Q13:
case ARM::Q14:
case ARM::Q15:
550 }
else if (MO.
isImm()) {
551 return static_cast<unsigned>(MO.
getImm());
554 .bitcastToAPInt().getHiBits(32).getLimitedValue());
561 bool ARMMCCodeEmitter::
562 EncodeAddrModeOpValues(
const MCInst &MI,
unsigned OpIdx,
unsigned &Reg,
568 Reg = CTX.getRegisterInfo()->getEncodingValue(MO.
getReg());
570 int32_t SImm = MO1.
getImm();
574 if (SImm == INT32_MIN) {
599 assert(MO.
isExpr() &&
"Unexpected branch target type!");
612 uint32_t S = (offset & 0x800000) >> 23;
613 uint32_t J1 = (offset & 0x400000) >> 22;
614 uint32_t J2 = (offset & 0x200000) >> 21;
629 getThumbBLTargetOpValue(
const MCInst &MI,
unsigned OpIdx,
642 getThumbBLXTargetOpValue(
const MCInst &MI,
unsigned OpIdx,
654 getThumbBRTargetOpValue(
const MCInst &MI,
unsigned OpIdx,
661 return (MO.
getImm() >> 1);
666 getThumbBCCTargetOpValue(
const MCInst &MI,
unsigned OpIdx,
673 return (MO.
getImm() >> 1);
678 getThumbCBTargetOpValue(
const MCInst &MI,
unsigned OpIdx,
684 return (MO.
getImm() >> 1);
691 for (
int i = 0; i < NumOp-1; ++i) {
715 return getARMBranchTargetOpValue(MI, OpIdx, Fixups, STI);
721 getARMBranchTargetOpValue(
const MCInst &MI,
unsigned OpIdx,
737 getARMBLTargetOpValue(
const MCInst &MI,
unsigned OpIdx,
752 getARMBLXTargetOpValue(
const MCInst &MI,
unsigned OpIdx,
764 uint32_t ARMMCCodeEmitter::getThumbBranchTargetOpValue(
775 bool I = (Val & 0x800000);
776 bool J1 = (Val & 0x400000);
777 bool J2 = (Val & 0x200000);
794 getAdrLabelOpValue(
const MCInst &MI,
unsigned OpIdx,
801 int64_t offset = MO.
getImm();
805 if (offset == INT32_MIN) {
808 }
else if (offset < 0) {
826 assert(SoImmVal != -1 &&
"Not a valid so_imm value!");
835 getT2AdrLabelOpValue(
const MCInst &MI,
unsigned OpIdx,
842 int32_t Val = MO.
getImm();
843 if (Val == INT32_MIN)
855 getThumbAdrLabelOpValue(
const MCInst &MI,
unsigned OpIdx,
868 getThumbAddrModeRegRegOpValue(
const MCInst &MI,
unsigned OpIdx,
876 unsigned Rn = CTX.getRegisterInfo()->getEncodingValue(MO1.
getReg());
877 unsigned Rm = CTX.getRegisterInfo()->getEncodingValue(MO2.
getReg());
878 return (Rm << 3) | Rn;
883 getAddrModeImm12OpValue(
const MCInst &MI,
unsigned OpIdx,
894 Reg = CTX.getRegisterInfo()->getEncodingValue(ARM::PC);
908 ++MCNumCPRelocations;
912 if (Offset == INT32_MIN) {
915 }
else if (Offset < 0) {
922 isAdd = EncodeAddrModeOpValues(MI, OpIdx, Reg, Imm12, Fixups, STI);
928 Binary |= (Reg << 13);
935 getT2Imm8s4OpValue(
const MCInst &MI,
unsigned OpIdx,
948 bool isAdd = Imm8 >= 0;
967 getT2AddrModeImm8s4OpValue(
const MCInst &MI,
unsigned OpIdx,
978 Reg = CTX.getRegisterInfo()->getEncodingValue(ARM::PC);
982 assert(MO.
isExpr() &&
"Unexpected machine operand type!");
987 ++MCNumCPRelocations;
989 isAdd = EncodeAddrModeOpValues(MI, OpIdx, Reg, Imm8, Fixups, STI);
997 uint32_t Binary = (Imm8 >> 2) & 0xff;
1001 Binary |= (Reg << 9);
1008 getT2AddrModeImm0_1020s4OpValue(
const MCInst &MI,
unsigned OpIdx,
1015 unsigned Reg = CTX.getRegisterInfo()->getEncodingValue(MO.
getReg());
1016 unsigned Imm8 = MO1.
getImm();
1017 return (Reg << 8) |
Imm8;
1021 ARMMCCodeEmitter::getHiLo16ImmOpValue(
const MCInst &MI,
unsigned OpIdx,
1029 return static_cast<unsigned>(MO.
getImm());
1035 const ARMMCExpr *ARM16Expr = cast<ARMMCExpr>(
E);
1039 const int64_t
Value = MCE->getValue();
1040 if (Value > UINT32_MAX)
1043 switch (ARM16Expr->
getKind()) {
1045 return (int32_t(Value) & 0xffff0000) >> 16;
1047 return (int32_t(Value) & 0x0000ffff);
1052 switch (ARM16Expr->
getKind()) {
1077 getLdStSORegOpValue(
const MCInst &MI,
unsigned OpIdx,
1083 unsigned Rn = CTX.getRegisterInfo()->getEncodingValue(MO.
getReg());
1084 unsigned Rm = CTX.getRegisterInfo()->getEncodingValue(MO1.
getReg());
1088 unsigned SBits = getShiftOp(ShOp);
1092 assert((ShImm & ~0x1f) == 0 &&
"Out of range shift amount");
1103 Binary |= SBits << 5;
1104 Binary |= ShImm << 7;
1111 getAddrMode2OffsetOpValue(
const MCInst &MI,
unsigned OpIdx,
1119 unsigned Imm = MO1.
getImm();
1127 Binary |= getShiftOp(ShOp) << 5;
1128 Binary |= CTX.getRegisterInfo()->getEncodingValue(MO.
getReg());
1130 return Binary | (isAdd << 12) | (isReg << 13);
1134 getPostIdxRegOpValue(
const MCInst &MI,
unsigned OpIdx,
1141 bool isAdd = MO1.
getImm() != 0;
1142 return CTX.getRegisterInfo()->getEncodingValue(MO.
getReg()) | (isAdd << 4);
1146 getAddrMode3OffsetOpValue(
const MCInst &MI,
unsigned OpIdx,
1155 unsigned Imm = MO1.
getImm();
1157 bool isImm = MO.
getReg() == 0;
1161 Imm8 = CTX.getRegisterInfo()->getEncodingValue(MO.
getReg());
1162 return Imm8 | (isAdd << 8) | (isImm << 9);
1166 getAddrMode3OpValue(
const MCInst &MI,
unsigned OpIdx,
1180 unsigned Rn = CTX.getRegisterInfo()->getEncodingValue(ARM::PC);
1182 assert(MO.
isExpr() &&
"Unexpected machine operand type!");
1187 ++MCNumCPRelocations;
1188 return (Rn << 9) | (1 << 13);
1190 unsigned Rn = CTX.getRegisterInfo()->getEncodingValue(MO.
getReg());
1191 unsigned Imm = MO2.
getImm();
1193 bool isImm = MO1.
getReg() == 0;
1197 Imm8 = CTX.getRegisterInfo()->getEncodingValue(MO1.
getReg());
1198 return (Rn << 9) | Imm8 | (isAdd << 8) | (isImm << 13);
1203 getAddrModeThumbSPOpValue(
const MCInst &MI,
unsigned OpIdx,
1210 "Unexpected base register!");
1214 return MO1.
getImm() & 0xff;
1219 getAddrModeISOpValue(
const MCInst &MI,
unsigned OpIdx,
1227 unsigned Rn = CTX.getRegisterInfo()->getEncodingValue(MO.
getReg());
1228 unsigned Imm5 = MO1.
getImm();
1229 return ((Imm5 & 0x1f) << 3) | Rn;
1234 getAddrModePCOpValue(
const MCInst &MI,
unsigned OpIdx,
1240 return (MO.
getImm() >> 2);
1245 getAddrMode5OpValue(
const MCInst &MI,
unsigned OpIdx,
1256 Reg = CTX.getRegisterInfo()->getEncodingValue(ARM::PC);
1260 assert(MO.
isExpr() &&
"Unexpected machine operand type!");
1269 ++MCNumCPRelocations;
1271 EncodeAddrModeOpValues(MI, OpIdx, Reg, Imm8, Fixups, STI);
1279 Binary |= (Reg << 9);
1285 getAddrMode5FP16OpValue(
const MCInst &MI,
unsigned OpIdx,
1296 Reg = CTX.getRegisterInfo()->getEncodingValue(ARM::PC);
1300 assert(MO.
isExpr() &&
"Unexpected machine operand type!");
1309 ++MCNumCPRelocations;
1311 EncodeAddrModeOpValues(MI, OpIdx, Reg, Imm8, Fixups, STI);
1319 Binary |= (Reg << 9);
1323 unsigned ARMMCCodeEmitter::
1324 getSORegRegOpValue(
const MCInst &MI,
unsigned OpIdx,
1343 unsigned Binary = CTX.getRegisterInfo()->getEncodingValue(MO.
getReg());
1347 unsigned Rs = MO1.
getReg();
1363 Binary |= SBits << 4;
1368 return Binary | (CTX.getRegisterInfo()->getEncodingValue(Rs) <<
ARMII::RegRsShift);
1371 unsigned ARMMCCodeEmitter::
1372 getSORegImmOpValue(
const MCInst &MI,
unsigned OpIdx,
1388 unsigned Binary = CTX.getRegisterInfo()->getEncodingValue(MO.
getReg());
1411 Binary |= SBits << 4;
1413 assert(Offset < 32 &&
"Offset must be in range 0-31!");
1414 return Binary | (Offset << 7);
1418 unsigned ARMMCCodeEmitter::
1419 getT2AddrModeSORegOpValue(
const MCInst &MI,
unsigned OpNum,
1428 unsigned Value = CTX.getRegisterInfo()->getEncodingValue(MO1.
getReg());
1430 Value |= CTX.getRegisterInfo()->getEncodingValue(MO2.
getReg());
1437 unsigned ARMMCCodeEmitter::
1438 getT2AddrModeImm8OpValue(
const MCInst &MI,
unsigned OpNum,
1445 unsigned Value = CTX.getRegisterInfo()->getEncodingValue(MO1.
getReg());
1450 int32_t tmp = (int32_t)MO2.
getImm();
1459 unsigned ARMMCCodeEmitter::
1460 getT2AddrModeImm8OffsetOpValue(
const MCInst &MI,
unsigned OpNum,
1467 int32_t tmp = (int32_t)MO1.
getImm();
1476 unsigned ARMMCCodeEmitter::
1477 getT2SORegOpValue(
const MCInst &MI,
unsigned OpIdx,
1493 unsigned Binary = CTX.getRegisterInfo()->getEncodingValue(MO.
getReg());
1511 Binary |= SBits << 4;
1519 unsigned ARMMCCodeEmitter::
1520 getBitfieldInvertedMaskOpValue(
const MCInst &MI,
unsigned Op,
1529 assert(v != 0 && lsb < 32 && msb < 32 &&
"Illegal bitfield mask!");
1530 return lsb | (msb << 5);
1533 unsigned ARMMCCodeEmitter::
1534 getRegisterListOpValue(
const MCInst &MI,
unsigned Op,
1544 bool SPRRegs = ARMMCRegisterClasses[ARM::SPRRegClassID].contains(Reg);
1545 bool DPRRegs = ARMMCRegisterClasses[ARM::DPRRegClassID].contains(Reg);
1547 unsigned Binary = 0;
1549 if (SPRRegs || DPRRegs) {
1551 unsigned RegNo = CTX.getRegisterInfo()->getEncodingValue(Reg);
1553 Binary |= (RegNo & 0x1f) << 8;
1557 Binary |= NumRegs * 2;
1568 Binary |= 1 << RegNo;
1577 unsigned ARMMCCodeEmitter::
1578 getAddrMode6AddressOpValue(
const MCInst &MI,
unsigned Op,
1584 unsigned RegNo = CTX.getRegisterInfo()->getEncodingValue(Reg.
getReg());
1591 case 8: Align = 0x01;
break;
1592 case 16: Align = 0x02;
break;
1593 case 32: Align = 0x03;
break;
1596 return RegNo | (Align << 4);
1601 unsigned ARMMCCodeEmitter::
1602 getAddrMode6OneLane32AddressOpValue(
const MCInst &MI,
unsigned Op,
1608 unsigned RegNo = CTX.getRegisterInfo()->getEncodingValue(Reg.
getReg());
1616 case 2: Align = 0x00;
break;
1617 case 4: Align = 0x03;
break;
1620 return RegNo | (Align << 4);
1628 unsigned ARMMCCodeEmitter::
1629 getAddrMode6DupAddressOpValue(
const MCInst &MI,
unsigned Op,
1635 unsigned RegNo = CTX.getRegisterInfo()->getEncodingValue(Reg.
getReg());
1642 case 8: Align = 0x01;
break;
1643 case 16: Align = 0x03;
break;
1646 return RegNo | (Align << 4);
1649 unsigned ARMMCCodeEmitter::
1650 getAddrMode6OffsetOpValue(
const MCInst &MI,
unsigned Op,
1654 if (MO.
getReg() == 0)
return 0x0D;
1655 return CTX.getRegisterInfo()->getEncodingValue(MO.
getReg());
1658 unsigned ARMMCCodeEmitter::
1659 getShiftRight8Imm(
const MCInst &MI,
unsigned Op,
1665 unsigned ARMMCCodeEmitter::
1666 getShiftRight16Imm(
const MCInst &MI,
unsigned Op,
1672 unsigned ARMMCCodeEmitter::
1673 getShiftRight32Imm(
const MCInst &MI,
unsigned Op,
1679 unsigned ARMMCCodeEmitter::
1680 getShiftRight64Imm(
const MCInst &MI,
unsigned Op,
1686 void ARMMCCodeEmitter::
1692 uint64_t TSFlags = Desc.
TSFlags;
1702 uint32_t Binary = getBinaryCodeForInstr(MI, Fixups, STI);
1705 if (
isThumb(STI) && Size == 4) {
1706 EmitConstant(Binary >> 16, 2, OS);
1707 EmitConstant(Binary & 0xffff, 2, OS);
1709 EmitConstant(Binary, Size, OS);
1713 #include "ARMGenMCCodeEmitter.inc"
1718 return new ARMMCCodeEmitter(MCII, Ctx,
true);
1724 return new ARMMCCodeEmitter(MCII, Ctx,
false);
static bool isReg(const MCInst &MI, unsigned OpNo)
void push_back(const T &Elt)
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
static unsigned char getAM3Offset(unsigned AM3Opc)
STATISTIC(NumFunctions,"Total number of functions")
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
Describe properties that are true of each instruction in the target description file.
MachineInstrBuilder MachineInstrBuilder &DefMI const MCInstrDesc & Desc
VariantKind getKind() const
getOpcode - Get the kind of this expression.
std::size_t countLeadingZeros(T Val, ZeroBehavior ZB=ZB_Width)
Count number of 0's from the most significant bit to the least stopping at the first 1...
static Lanai::Fixups FixupKind(const MCExpr *Expr)
static bool isThumb(const MCSubtargetInfo &STI)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Base class for the full range of assembler expressions which are needed for parsing.
Reg
All possible values of the reg field in the ModR/M byte.
const MCExpr * getSubExpr() const
getSubExpr - Get the child of this expression.
This file implements a class to represent arbitrary precision integral constant values and operations...
Context object for machine code objects.
unsigned getReg() const
Returns the register number.
static int getT2SOImmVal(unsigned Arg)
getT2SOImmVal - Given a 32-bit immediate, if it is something that can fit into a Thumb-2 shifter_oper...
Instances of this class represent a single low-level machine instruction.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
static unsigned getSOImmValRot(unsigned Imm)
getSOImmValRot - Given an encoded imm field for the reg/imm form, return the rotate amount...
const MCExpr * getExpr() const
Function Alias Analysis false
unsigned const MachineRegisterInfo * MRI
std::size_t countTrailingZeros(T Val, ZeroBehavior ZB=ZB_Width)
Count number of 0's from the least significant bit to the most stopping at the first 1...
static unsigned char getAM5Offset(unsigned AM5Opc)
MCCodeEmitter - Generic instruction encoding interface.
unsigned getSize() const
Return the number of bytes in the encoding of this instruction, or zero if the encoding size cannot b...
Interface to description of machine instruction set.
MCFixupKind
Extensible enumeration to represent the type of a fixup.
static unsigned getSOImmValImm(unsigned Imm)
getSOImmValImm - Given an encoded imm field for the reg/imm form, return the 8-bit imm value...
This file declares a class to represent arbitrary precision floating point values and provide a varie...
static MCFixup create(uint32_t Offset, const MCExpr *Value, MCFixupKind Kind, SMLoc Loc=SMLoc())
static int32_t encodeThumbBLOffset(int32_t offset)
Triple - Helper class for working with autoconf configuration names.
static bool HasConditionalBranch(const MCInst &MI)
Return true if this branch has a non-always predication.
static AddrOpc getAM2Op(unsigned AM2Opc)
static unsigned getAM2Offset(unsigned AM2Opc)
const FeatureBitset & getFeatureBits() const
getFeatureBits - Return the feature bits.
unsigned getOpcode() const
static AddrOpc getAM3Op(unsigned AM3Opc)
static int getSOImmVal(unsigned Arg)
getSOImmVal - Given a 32-bit immediate, if it is something that can fit into an shifter_operand immed...
MCCodeEmitter * createARMLEMCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx)
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
llvm_unreachable("Unknown RegBank!")
unsigned getNumOperands() const
APFloat abs(APFloat X)
Returns the absolute value of the argument.
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
MCSubtargetInfo - Generic base class for all target subtargets.
const Triple & getTargetTriple() const
getTargetTriple - Return the target triple string.
static AddrOpc getAM5Op(unsigned AM5Opc)
static uint32_t getBranchTargetOpValue(const MCInst &MI, unsigned OpIdx, unsigned FixupKind, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI)
getBranchTargetOpValue - Helper function to get the branch target operand, which is either an immedia...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static ShiftOpc getAM2ShiftOpc(unsigned AM2Opc)
uint16_t getEncodingValue(unsigned RegNo) const
Returns the encoding for RegNo.
LLVM Value Representation.
static unsigned getSORegOffset(unsigned Op)
#define LLVM_FALLTHROUGH
LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
This class implements an extremely fast bulk output stream that can only output to a stream...
Target specific expression.
Instances of this class represent operands of the MCInst class.
MCCodeEmitter * createARMBEMCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx)
const MCOperand & getOperand(unsigned i) const
static ShiftOpc getSORegShOp(unsigned Op)