27 switch (
unsigned(Kind)) {
30 return (int64_t)Value / 2;
43 SystemZMCAsmBackend(uint8_t osABI)
47 unsigned getNumFixupKinds()
const override {
52 uint64_t
Value,
bool IsPCRel)
const override;
53 bool mayNeedRelaxation(
const MCInst &Inst)
const override {
61 void relaxInstruction(
const MCInst &Inst,
MCInst &Res)
const override {
64 bool writeNopData(uint64_t Count,
MCObjectWriter *OW)
const override;
76 {
"FK_390_TLS_CALL", 0, 0, 0 }
87 void SystemZMCAsmBackend::applyFixup(
const MCFixup &
Fixup,
char *Data,
88 unsigned DataSize, uint64_t
Value,
92 unsigned Size = (getFixupKindInfo(Kind).TargetSize + 7) / 8;
94 assert(Offset + Size <= DataSize &&
"Invalid fixup offset!");
98 unsigned ShiftValue = (Size * 8) - 8;
99 for (
unsigned I = 0;
I != Size; ++
I) {
100 Data[Offset +
I] |= uint8_t(Value >> ShiftValue);
105 bool SystemZMCAsmBackend::writeNopData(uint64_t Count,
107 for (uint64_t
I = 0;
I != Count; ++
I)
116 return new SystemZMCAsmBackend(OSABI);
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
Defines the object file and target independent interfaces used by the assembler backend to write nati...
void write8(uint8_t Value)
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...
Encapsulates the layout of an assembly file at a particular point in time.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
MCAsmBackend * createSystemZMCAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU)
uint32_t getOffset() const
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...
MCFixupKind
Extensible enumeration to represent the type of a fixup.
MCObjectWriter * createSystemZObjectWriter(raw_pwrite_stream &OS, uint8_t OSABI)
MCFixupKind getKind() const
Triple - Helper class for working with autoconf configuration names.
PowerPC TLS Dynamic Call Fixup
Target - Wrapper for Target specific information.
static uint64_t extractBitsForFixup(MCFixupKind Kind, uint64_t Value)
Target independent information on a fixup kind.
An abstract base class for streams implementations that also support a pwrite operation.
const ARM::ArchExtKind Kind
LLVM Value Representation.
Generic interface to target specific assembler backends.
StringRef - Represent a constant reference to a string, i.e.
virtual const MCFixupKindInfo & getFixupKindInfo(MCFixupKind Kind) const
Get information on a fixup kind.