41 ARMELFObjectWriter(
uint8_t OSABI)
51std::optional<MCFixupKind>
54#define ELF_RELOC(X, Y) .Case(#X, Y)
55#include "llvm/BinaryFormat/ELFRelocs/ARM.def"
57 .
Case(
"BFD_RELOC_NONE", ELF::R_ARM_NONE)
58 .
Case(
"BFD_RELOC_8", ELF::R_ARM_ABS8)
59 .
Case(
"BFD_RELOC_16", ELF::R_ARM_ABS16)
60 .
Case(
"BFD_RELOC_32", ELF::R_ARM_ABS32)
73 {
"fixup_arm_ldst_pcrel_12", 0, 32, 0},
74 {
"fixup_t2_ldst_pcrel_12", 0, 32, 0},
75 {
"fixup_arm_pcrel_10_unscaled", 0, 32, 0},
76 {
"fixup_arm_pcrel_10", 0, 32, 0},
77 {
"fixup_t2_pcrel_10", 0, 32, 0},
78 {
"fixup_arm_pcrel_9", 0, 32, 0},
79 {
"fixup_t2_pcrel_9", 0, 32, 0},
80 {
"fixup_arm_ldst_abs_12", 0, 32, 0},
81 {
"fixup_thumb_adr_pcrel_10", 0, 8, 0},
82 {
"fixup_arm_adr_pcrel_12", 0, 32, 0},
83 {
"fixup_t2_adr_pcrel_12", 0, 32, 0},
84 {
"fixup_arm_condbranch", 0, 24, 0},
85 {
"fixup_arm_uncondbranch", 0, 24, 0},
86 {
"fixup_t2_condbranch", 0, 32, 0},
87 {
"fixup_t2_uncondbranch", 0, 32, 0},
88 {
"fixup_arm_thumb_br", 0, 16, 0},
89 {
"fixup_arm_uncondbl", 0, 24, 0},
90 {
"fixup_arm_condbl", 0, 24, 0},
91 {
"fixup_arm_blx", 0, 24, 0},
92 {
"fixup_arm_thumb_bl", 0, 32, 0},
93 {
"fixup_arm_thumb_blx", 0, 32, 0},
94 {
"fixup_arm_thumb_cb", 0, 16, 0},
95 {
"fixup_arm_thumb_cp", 0, 8, 0},
96 {
"fixup_arm_thumb_bcc", 0, 8, 0},
99 {
"fixup_arm_movt_hi16", 0, 20, 0},
100 {
"fixup_arm_movw_lo16", 0, 20, 0},
101 {
"fixup_t2_movt_hi16", 0, 20, 0},
102 {
"fixup_t2_movw_lo16", 0, 20, 0},
103 {
"fixup_arm_thumb_upper_8_15", 0, 8, 0},
104 {
"fixup_arm_thumb_upper_0_7", 0, 8, 0},
105 {
"fixup_arm_thumb_lower_8_15", 0, 8, 0},
106 {
"fixup_arm_thumb_lower_0_7", 0, 8, 0},
107 {
"fixup_arm_mod_imm", 0, 12, 0},
108 {
"fixup_t2_so_imm", 0, 26, 0},
109 {
"fixup_bf_branch", 0, 32, 0},
110 {
"fixup_bf_target", 0, 32, 0},
111 {
"fixup_bfl_target", 0, 32, 0},
112 {
"fixup_bfc_target", 0, 32, 0},
113 {
"fixup_bfcsel_else_target", 0, 32, 0},
114 {
"fixup_wls", 0, 32, 0},
115 {
"fixup_le", 0, 32, 0},
122 {
"fixup_arm_ldst_pcrel_12", 0, 32, 0},
123 {
"fixup_t2_ldst_pcrel_12", 0, 32, 0},
124 {
"fixup_arm_pcrel_10_unscaled", 0, 32, 0},
125 {
"fixup_arm_pcrel_10", 0, 32, 0},
126 {
"fixup_t2_pcrel_10", 0, 32, 0},
127 {
"fixup_arm_pcrel_9", 0, 32, 0},
128 {
"fixup_t2_pcrel_9", 0, 32, 0},
129 {
"fixup_arm_ldst_abs_12", 0, 32, 0},
130 {
"fixup_thumb_adr_pcrel_10", 8, 8, 0},
131 {
"fixup_arm_adr_pcrel_12", 0, 32, 0},
132 {
"fixup_t2_adr_pcrel_12", 0, 32, 0},
133 {
"fixup_arm_condbranch", 8, 24, 0},
134 {
"fixup_arm_uncondbranch", 8, 24, 0},
135 {
"fixup_t2_condbranch", 0, 32, 0},
136 {
"fixup_t2_uncondbranch", 0, 32, 0},
137 {
"fixup_arm_thumb_br", 0, 16, 0},
138 {
"fixup_arm_uncondbl", 8, 24, 0},
139 {
"fixup_arm_condbl", 8, 24, 0},
140 {
"fixup_arm_blx", 8, 24, 0},
141 {
"fixup_arm_thumb_bl", 0, 32, 0},
142 {
"fixup_arm_thumb_blx", 0, 32, 0},
143 {
"fixup_arm_thumb_cb", 0, 16, 0},
144 {
"fixup_arm_thumb_cp", 8, 8, 0},
145 {
"fixup_arm_thumb_bcc", 8, 8, 0},
148 {
"fixup_arm_movt_hi16", 12, 20, 0},
149 {
"fixup_arm_movw_lo16", 12, 20, 0},
150 {
"fixup_t2_movt_hi16", 12, 20, 0},
151 {
"fixup_t2_movw_lo16", 12, 20, 0},
152 {
"fixup_arm_thumb_upper_8_15", 24, 8, 0},
153 {
"fixup_arm_thumb_upper_0_7", 24, 8, 0},
154 {
"fixup_arm_thumb_lower_8_15", 24, 8, 0},
155 {
"fixup_arm_thumb_lower_0_7", 24, 8, 0},
156 {
"fixup_arm_mod_imm", 20, 12, 0},
157 {
"fixup_t2_so_imm", 26, 6, 0},
158 {
"fixup_bf_branch", 0, 32, 0},
159 {
"fixup_bf_target", 0, 32, 0},
160 {
"fixup_bfl_target", 0, 32, 0},
161 {
"fixup_bfc_target", 0, 32, 0},
162 {
"fixup_bfcsel_else_target", 0, 32, 0},
163 {
"fixup_wls", 0, 32, 0},
164 {
"fixup_le", 0, 32, 0},
184 bool HasThumb2 = STI.
hasFeature(ARM::FeatureThumb2);
185 bool HasV8MBaselineOps = STI.
hasFeature(ARM::HasV8MBaselineOps);
193 return HasThumb2 ? (
unsigned)ARM::t2LDRpci :
Op;
197 return HasV8MBaselineOps ? (
unsigned)ARM::t2B :
Op;
212 if (Offset < Min || Offset > Max)
213 return "out of range pc-relative fixup value";
219 switch (
Fixup.getKind()) {
229 return "out of range pc-relative fixup value";
241 return "out of range pc-relative fixup value";
250 return "misaligned pc-relative fixup value";
252 return "out of range pc-relative fixup value";
261 return "will be converted to nop";
286 return "out of range label-relative fixup value";
297 unsigned FixupKind) {
300 if (!
Sym || !Asm.getContext().isELF())
319 bool Resolved)
const {
337 RelaxedOp == ARM::tHINT) {
343 Inst = std::move(Res);
354 const uint16_t Thumb1_16bitNopEncoding = 0x46c0;
355 const uint16_t Thumb2_16bitNopEncoding = 0xbf00;
356 const uint32_t ARMv4_NopEncoding = 0xe1a00000;
357 const uint32_t ARMv6T2_NopEncoding = 0xe320f000;
360 hasNOP(STI) ? Thumb2_16bitNopEncoding : Thumb1_16bitNopEncoding;
362 for (
uint64_t i = 0; i != NumNops; ++i)
370 hasNOP(STI) ? ARMv6T2_NopEncoding : ARMv4_NopEncoding;
372 for (
uint64_t i = 0; i != NumNops; ++i)
394 if (IsLittleEndian) {
398 Swapped |= (
Value & 0x0000FFFF) << 16;
405 bool IsLittleEndian) {
408 if (IsLittleEndian) {
409 Value = (SecondHalf & 0xFFFF) << 16;
410 Value |= (FirstHalf & 0xFFFF);
412 Value = (SecondHalf & 0xFFFF);
413 Value |= (FirstHalf & 0xFFFF) << 16;
424 unsigned Kind =
Fixup.getKind();
425 int64_t Addend =
Target.getConstant();
468 unsigned Hi4 = (
Value & 0xF000) >> 12;
469 unsigned Lo12 =
Value & 0x0FFF;
472 Value = (Hi4 << 16) | (Lo12);
481 unsigned Hi4 = (
Value & 0xF000) >> 12;
482 unsigned i = (
Value & 0x800) >> 11;
483 unsigned Mid3 = (
Value & 0x700) >> 8;
484 unsigned Lo8 =
Value & 0x0FF;
489 Value = (Hi4 << 16) | (i << 26) | (Mid3 << 12) | (Lo8);
494 return (
Value & 0xff000000) >> 24;
498 return (
Value & 0x00ff0000) >> 16;
502 return (
Value & 0x0000ff00) >> 8;
505 return Value & 0x000000ff;
516 if ((int64_t)
Value < 0) {
524 Value |= isAdd << 23;
537 if ((int64_t)
Value < 0) {
552 if ((int64_t)
Value < 0) {
558 out |= (
Value & 0x800) << 15;
559 out |= (
Value & 0x700) << 4;
560 out |= (
Value & 0x0FF);
572 if (!isInt<26>(
Value)) {
587 dyn_cast<MCSymbolRefExpr>(
Fixup.getValue()))
590 return 0xffffff & (
Value >> 2);
597 "cannot perform a PC-relative fixup with a non-zero "
601 if (!isInt<25>(
Value)) {
609 bool I =
Value & 0x800000;
610 bool J1 =
Value & 0x400000;
611 bool J2 =
Value & 0x200000;
618 out |= (
Value & 0x1FF800) << 5;
619 out |= (
Value & 0x0007FF);
625 if (!isInt<21>(
Value)) {
633 out |= (
Value & 0x80000) << 7;
634 out |= (
Value & 0x40000) >> 7;
635 out |= (
Value & 0x20000) >> 4;
636 out |= (
Value & 0x1F800) << 5;
637 out |= (
Value & 0x007FF);
642 if (!isInt<25>(
Value - 4) ||
646 !isInt<23>(
Value - 4))) {
655 "cannot perform a PC-relative fixup with a non-zero "
672 uint32_t signBit = (offset & 0x800000) >> 23;
673 uint32_t I1Bit = (offset & 0x400000) >> 22;
674 uint32_t J1Bit = (I1Bit ^ 0x1) ^ signBit;
675 uint32_t I2Bit = (offset & 0x200000) >> 21;
676 uint32_t J2Bit = (I2Bit ^ 0x1) ^ signBit;
677 uint32_t imm10Bits = (offset & 0x1FF800) >> 11;
678 uint32_t imm11Bits = (offset & 0x000007FF);
692 "cannot perform a PC-relative fixup with a non-zero "
707 if (
Value % 4 != 0) {
714 dyn_cast<MCSymbolRefExpr>(
Fixup.getValue()))
717 uint32_t signBit = (offset & 0x400000) >> 22;
718 uint32_t I1Bit = (offset & 0x200000) >> 21;
719 uint32_t J1Bit = (I1Bit ^ 0x1) ^ signBit;
720 uint32_t I2Bit = (offset & 0x100000) >> 20;
721 uint32_t J2Bit = (I2Bit ^ 0x1) ^ signBit;
722 uint32_t imm10HBits = (offset & 0xFFC00) >> 10;
723 uint32_t imm10LBits = (offset & 0x3FF);
736 if (!STI->
hasFeature(ARM::FeatureThumb2) && IsResolved) {
738 if (FixupDiagnostic) {
744 return ((
Value - 4) >> 2) & 0xff;
749 if ((int64_t)Value < 2 || Value > 0x82 ||
Value & 1) {
756 return ((Binary & 0x20) << 4) | ((Binary & 0x1f) << 3);
764 if (FixupDiagnostic) {
769 return ((
Value - 4) >> 1) & 0x7ff;
775 if (FixupDiagnostic) {
780 return ((
Value - 4) >> 1) & 0xff;
785 if ((int64_t)
Value < 0) {
795 return Value | (isAdd << 23);
805 if ((int64_t)
Value < 0) {
815 Value |= isAdd << 23;
832 if ((int64_t)
Value < 0) {
846 Value |= isAdd << 23;
864 if ((int64_t)
Value < 0) {
874 EncValue |= (
Value & 0x800) << 15;
875 EncValue |= (
Value & 0x700) << 4;
876 EncValue |= (
Value & 0xff);
881 if (FixupDiagnostic) {
892 if (FixupDiagnostic) {
899 out |= (((
Value - 4) >> 1) & 0x1) << 11;
900 out |= (((
Value - 4) >> 1) & 0x7fe);
901 out |= (((
Value - 4) >> 1) & HighBitMask) << 5;
911 if (FixupDiagnostic) {
921 if (FixupDiagnostic) {
928 real_value = -real_value;
929 out |= ((real_value >> 1) & 0x1) << 11;
930 out |= ((real_value >> 1) & 0x7fe);
939 const unsigned FixupKind =
Fixup.getKind();
952 return Target.getSpecifier();
1088 switch (
Fixup.getKind()) {
1107 auto Kind =
Fixup.getKind();
1118 "Invalid fixup offset!");
1121 unsigned FullSizeBytes;
1124 assert(
Fixup.getOffset() + FullSizeBytes <=
F.getSize() &&
1125 "Invalid fixup size!");
1126 assert(NumBytes <= FullSizeBytes &&
"Invalid fixup size!");
1132 for (
unsigned i = 0; i != NumBytes; ++i) {
1187 int CFARegisterOffset = 0;
1190 int FloatRegCount = 0;
1194 switch (Inst.getOperation()) {
1196 CFARegisterOffset = Inst.getOffset();
1200 CFARegisterOffset = Inst.getOffset();
1207 if (ARMMCRegisterClasses[ARM::GPRRegClassID].
contains(Reg))
1208 RegOffsets[Reg] = Inst.getOffset();
1209 else if (ARMMCRegisterClasses[ARM::DPRRegClassID].
contains(Reg)) {
1210 RegOffsets[Reg] = Inst.getOffset();
1214 llvm::dbgs() <<
".cfi_offset on unknown register="
1215 << Inst.getRegister() <<
"\n");
1226 <<
"CFI directive not compatible with compact "
1227 "unwind encoding, opcode="
1228 <<
uint8_t(Inst.getOperation()) <<
"\n");
1235 if ((CFARegister == ARM::SP) && (CFARegisterOffset == 0))
1239 if (CFARegister != ARM::R7) {
1242 <<
" instead of r7\n");
1245 int StackAdjust = CFARegisterOffset - 8;
1246 if (RegOffsets.
lookup(ARM::LR) != (-4 - StackAdjust)) {
1249 llvm::dbgs() <<
"LR not saved as standard frame, StackAdjust="
1251 <<
", CFARegisterOffset=" << CFARegisterOffset
1252 <<
", lr save at offset=" << RegOffsets[ARM::LR] <<
"\n");
1255 if (RegOffsets.
lookup(ARM::R7) != (-8 - StackAdjust)) {
1257 llvm::dbgs() <<
"r7 not saved as standard frame\n");
1263 switch (StackAdjust) {
1267 CompactUnwindEncoding |= 0x00400000;
1270 CompactUnwindEncoding |= 0x00800000;
1273 CompactUnwindEncoding |= 0x00C00000;
1277 <<
".cfi_def_cfa stack adjust ("
1278 << StackAdjust <<
") out of range\n");
1295 int CurOffset = -8 - StackAdjust;
1296 for (
auto CSReg : GPRCSRegs) {
1301 int RegOffset =
Offset->second;
1302 if (RegOffset != CurOffset - 4) {
1305 << RegOffset <<
" but only supported at "
1306 << CurOffset <<
"\n");
1309 CompactUnwindEncoding |= CSReg.Encoding;
1314 if (FloatRegCount == 0)
1315 return CompactUnwindEncoding;
1318 CompactUnwindEncoding &=
~CU::UNWIND_ARM_MODE_MASK;
1323 if (FloatRegCount > 4) {
1325 llvm::dbgs() <<
"unsupported number of D registers saved ("
1326 << FloatRegCount <<
")\n");
1333 static MCPhysReg FPRCSRegs[] = {ARM::D8, ARM::D10, ARM::D12, ARM::D14};
1334 for (
int Idx = FloatRegCount - 1;
Idx >= 0; --
Idx) {
1338 llvm::dbgs() << FloatRegCount <<
" D-regs saved, but "
1342 }
else if (
Offset->second != CurOffset - 8) {
1344 llvm::dbgs() << FloatRegCount <<
" D-regs saved, but "
1346 <<
" saved at " <<
Offset->second
1347 <<
", expected at " << CurOffset - 8
1354 return CompactUnwindEncoding | ((FloatRegCount - 1) << 8);
unsigned const MachineRegisterInfo * MRI
static unsigned getFixupKindNumBytes(unsigned Kind)
The number of bytes the fixup may change.
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static uint32_t swapHalfWords(uint32_t Value, bool IsLittleEndian)
static bool needsInterworking(const MCAssembler &Asm, const MCSymbol *Sym, unsigned FixupKind)
static unsigned getFixupKindContainerSizeBytes(unsigned Kind)
getFixupKindContainerSizeBytes - The number of bytes of the container involved in big endian.
static MCAsmBackend * createARMAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options, llvm::endianness Endian)
static uint32_t joinHalfWords(uint32_t FirstHalf, uint32_t SecondHalf, bool IsLittleEndian)
static const char * checkPCRelOffset(uint64_t Value, int64_t Min, int64_t Max)
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
PowerPC TLS Dynamic Call Fixup
static bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
#define DEBUG_WITH_TYPE(TYPE,...)
DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information.
static SymbolRef::Type getType(const Symbol *Sym)
uint64_t generateCompactUnwindEncoding(const MCDwarfFrameInfo *FI, const MCContext *Ctxt) const override
Generate compact unwind encoding for the function based on the CFI instructions.
const MachO::CPUSubTypeARM Subtype
std::optional< MCFixupKind > getFixupKind(StringRef Name) const override
Map a relocation name used in .reloc to a fixup kind.
const char * reasonForFixupRelaxation(const MCFixup &Fixup, uint64_t Value) const
bool mayNeedRelaxation(unsigned Opcode, ArrayRef< MCOperand > Operands, const MCSubtargetInfo &STI) const override
Check whether the given instruction (encoded as Opcode+Operands) may need relaxation.
bool fixupNeedsRelaxationAdvanced(const MCFragment &, const MCFixup &, const MCValue &, uint64_t, bool) const override
Target specific predicate for whether a given fixup requires the associated instruction to be relaxed...
void applyFixup(const MCFragment &, const MCFixup &, const MCValue &Target, uint8_t *Data, uint64_t Value, bool IsResolved) override
bool hasNOP(const MCSubtargetInfo *STI) const
MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override
Get information on a fixup kind.
unsigned getRelaxedOpcode(unsigned Op, const MCSubtargetInfo &STI) const
std::optional< bool > evaluateFixup(const MCFragment &, MCFixup &, MCValue &, uint64_t &) override
unsigned adjustFixupValue(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &Target, uint64_t Value, bool IsResolved, MCContext &Ctx, const MCSubtargetInfo *STI) const
bool writeNopData(raw_ostream &OS, uint64_t Count, const MCSubtargetInfo *STI) const override
Write an (optimal) nop sequence of Count bytes to the given output.
std::optional< MCFixupKind > getFixupKind(StringRef Name) const override
Map a relocation name used in .reloc to a fixup kind.
void relaxInstruction(MCInst &Inst, const MCSubtargetInfo &STI) const override
Relax the instruction in the given fragment to the next wider instruction.
bool shouldForceRelocation(const MCFixup &Fixup, const MCValue &Target)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
bool empty() const
empty - Check if the array is empty.
This class represents an Operation in the Expression.
ValueT lookup(const_arg_type_t< KeyT > Val) const
lookup - Return the entry for the specified key, or a default constructed value if no such entry exis...
iterator find(const_arg_type_t< KeyT > Val)
Generic interface to target specific assembler backends.
const llvm::endianness Endian
static const MCSubtargetInfo * getSubtargetInfo(const MCFragment &F)
virtual MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const
Get information on a fixup kind.
bool isDarwinCanonicalPersonality(const MCSymbol *Sym) const
MCContext & getContext() const
void maybeAddReloc(const MCFragment &, const MCFixup &, const MCValue &, uint64_t &Value, bool IsResolved)
LLVM_ABI bool isThumbFunc(const MCSymbol *Func) const
Check whether a given symbol has been flagged with .thumb_func.
uint64_t getFragmentOffset(const MCFragment &F) const
Context object for machine code objects.
LLVM_ABI bool emitCompactUnwindNonCanonical() const
LLVM_ABI void reportError(SMLoc L, const Twine &Msg)
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Instances of this class represent a single low-level machine instruction.
unsigned getOpcode() const
void addOperand(const MCOperand Op)
void setOpcode(unsigned Op)
static MCOperand createReg(MCRegister Reg)
static MCOperand createImm(int64_t Val)
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
const char * getName(MCRegister RegNo) const
Return the human-readable symbolic target-specific name for the specified physical register.
std::optional< MCRegister > getLLVMRegNum(uint64_t RegNum, bool isEH) const
Map a dwarf register back to a target register.
Wrapper class representing physical registers. Should be passed by value.
Generic base class for all target subtargets.
bool hasFeature(unsigned Feature) const
const Triple & getTargetTriple() const
Represent a reference to a symbol from inside an expression.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
StringRef - Represent a constant reference to a string, i.e.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
ObjectFormatType getObjectFormat() const
Get the object format for this triple.
OSType getOS() const
Get the parsed operating system type of this triple.
bool isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
bool isOSWindows() const
Tests whether the OS is Windows.
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
raw_ostream & write(unsigned char C)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
CompactUnwindEncodings
Compact unwind encoding values.
@ UNWIND_ARM_FRAME_SECOND_PUSH_R10
@ UNWIND_ARM_FRAME_FIRST_PUSH_R6
@ UNWIND_ARM_FRAME_SECOND_PUSH_R11
@ UNWIND_ARM_DWARF_SECTION_OFFSET
@ UNWIND_ARM_FRAME_FIRST_PUSH_R4
@ UNWIND_ARM_FRAME_SECOND_PUSH_R9
@ UNWIND_ARM_FRAME_SECOND_PUSH_R8
@ UNWIND_ARM_FRAME_STACK_ADJUST_MASK
@ UNWIND_ARM_FRAME_SECOND_PUSH_R12
@ UNWIND_ARM_FRAME_D_REG_COUNT_MASK
@ UNWIND_ARM_MODE_FRAME_D
@ UNWIND_ARM_FRAME_FIRST_PUSH_R5
int getSOImmVal(unsigned Arg)
getSOImmVal - Given a 32-bit immediate, if it is something that can fit into an shifter_operand immed...
int getT2SOImmVal(unsigned Arg)
getT2SOImmVal - Given a 32-bit immediate, if it is something that can fit into a Thumb-2 shifter_oper...
@ fixup_thumb_adr_pcrel_10
@ fixup_arm_thumb_upper_8_15
@ fixup_arm_thumb_lower_0_7
@ fixup_arm_pcrel_10_unscaled
@ fixup_arm_thumb_upper_0_7
@ fixup_bfcsel_else_target
@ fixup_arm_ldst_pcrel_12
@ fixup_arm_thumb_lower_8_15
bool isRelocation(MCFixupKind FixupKind)
void write(void *memory, value_type value, endianness endian)
Write a value to memory with a particular endianness.
This is an optimization pass for GlobalISel generic memory operations.
@ FK_SecRel_2
A two-byte section relative fixup.
@ FirstLiteralRelocationKind
@ FK_Data_1
A one-byte fixup.
@ FK_Data_4
A four-byte fixup.
@ FK_SecRel_4
A four-byte section relative fixup.
@ FK_Data_2
A two-byte fixup.
constexpr int64_t minIntN(int64_t N)
Gets the minimum value for a N-bit signed integer.
MCAsmBackend * createARMBEAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
MCAsmBackend * createARMLEAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
DWARFExpression::Operation Op
constexpr int64_t maxIntN(int64_t N)
Gets the maximum value for a N-bit signed integer.
const MCSymbol * Personality
std::vector< MCCFIInstruction > Instructions
Target independent information on a fixup kind.