39 ~MSP430AsmBackend()
override {}
43 uint64_t
Value,
bool IsResolved,
46 std::unique_ptr<MCObjectTargetWriter>
47 createObjectTargetWriter()
const override {
51 bool fixupNeedsRelaxation(
const MCFixup &Fixup, uint64_t
Value,
57 bool fixupNeedsRelaxationAdvanced(
const MCFixup &Fixup,
bool Resolved,
61 const bool WasForced)
const override {
65 unsigned getNumFixupKinds()
const override {
74 {
"fixup_32", 0, 32, 0},
76 {
"fixup_16", 0, 16, 0},
78 {
"fixup_16_byte", 0, 16, 0},
83 {
"fixup_sym_diff", 0, 32, 0},
86 "Not all fixup kinds added to Infos array");
94 bool mayNeedRelaxation(
const MCInst &Inst,
100 MCInst &Res)
const override {}
102 bool writeNopData(
raw_ostream &OS, uint64_t Count)
const override;
108 unsigned Kind = Fixup.
getKind();
121 if (Offset < -512 || Offset > 511)
137 uint64_t Value,
bool IsResolved,
145 Value <<= Info.TargetOffset;
148 unsigned NumBytes =
alignTo(Info.TargetSize + Info.TargetOffset, 8) / 8;
150 assert(Offset + NumBytes <= Data.
size() &&
"Invalid fixup offset!");
154 for (
unsigned i = 0; i != NumBytes; ++i) {
155 Data[Offset + i] |= uint8_t((Value >> (i * 8)) & 0xff);
159 bool MSP430AsmBackend::writeNopData(
raw_ostream &OS, uint64_t Count)
const {
160 if ((Count % 2) != 0)
164 uint64_t NopCount = Count / 2;
166 OS.
write(
"\x03\x43", 2);
This class represents lattice values for constants.
This represents an "assembler immediate".
virtual const MCFixupKindInfo & getFixupKindInfo(MCFixupKind Kind) const
Get information on a fixup kind.
uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew=0)
Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Alig...
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Is this fixup kind PCrelative? This is used by the assembler backend to evaluate fixup values in a ta...
MCContext & getContext() const
Encapsulates the layout of an assembly file at a particular point in time.
This file implements a class to represent arbitrary precision integral constant values and operations...
Context object for machine code objects.
Analysis containing CSE Info
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...
A relaxable fragment holds on to its MCInst, since it may need to be relaxed during the assembler lay...
unsigned const MachineRegisterInfo * MRI
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
size_t size() const
size - Get the array size.
MCFixupKind
Extensible enumeration to represent the type of a fixup.
static uint64_t adjustFixupValue(const MCFixup &Fixup, const MCValue &Target, uint64_t Value, MCContext &Ctx, const Triple &TheTriple, bool IsResolved)
void reportError(SMLoc L, const Twine &Msg)
uint32_t getOffset() const
raw_ostream & write(unsigned char C)
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
std::unique_ptr< MCObjectTargetWriter > createMSP430ELFObjectWriter(uint8_t OSABI)
Target - Wrapper for Target specific information.
Generic base class for all target subtargets.
Target independent information on a fixup kind.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
Generic interface to target specific assembler backends.
This class implements an extremely fast bulk output stream that can only output to a stream...
MCAsmBackend * createMSP430MCAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
MCFixupKind getKind() const