38 ~MSP430AsmBackend()
override {}
42 uint64_t
Value,
bool IsResolved,
45 std::unique_ptr<MCObjectTargetWriter>
46 createObjectTargetWriter()
const override {
50 bool fixupNeedsRelaxation(
const MCFixup &Fixup, uint64_t
Value,
56 bool fixupNeedsRelaxationAdvanced(
const MCFixup &Fixup,
bool Resolved,
60 const bool WasForced)
const override {
64 unsigned getNumFixupKinds()
const override {
73 {
"fixup_32", 0, 32, 0},
75 {
"fixup_16", 0, 16, 0},
77 {
"fixup_16_byte", 0, 16, 0},
82 {
"fixup_sym_diff", 0, 32, 0},
85 "Not all fixup kinds added to Infos array");
93 bool mayNeedRelaxation(
const MCInst &Inst,
99 MCInst &Res)
const override {}
101 bool writeNopData(
raw_ostream &OS, uint64_t Count)
const override;
107 unsigned Kind = Fixup.
getKind();
120 if (Offset < -512 || Offset > 511)
136 uint64_t Value,
bool IsResolved,
144 Value <<= Info.TargetOffset;
147 unsigned NumBytes =
alignTo(Info.TargetSize + Info.TargetOffset, 8) / 8;
149 assert(Offset + NumBytes <= Data.
size() &&
"Invalid fixup offset!");
153 for (
unsigned i = 0; i != NumBytes; ++i) {
154 Data[Offset + i] |= uint8_t((Value >> (i * 8)) & 0xff);
158 bool MSP430AsmBackend::writeNopData(
raw_ostream &OS, uint64_t Count)
const {
159 if ((Count % 2) != 0)
163 uint64_t NopCount = Count / 2;
165 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.
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
static RegisterPass< DebugifyFunctionPass > DF("debugify-function", "Attach debug info to a function")
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.
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
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